Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
beece7d8
Commit
beece7d8
authored
Sep 06, 2022
by
AUTOMATIC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow import as library for #72
parent
4cb47bbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
webui.py
webui.py
+13
-13
No files found.
webui.py
View file @
beece7d8
...
@@ -160,20 +160,20 @@ modules.sd_hijack.model_hijack.hijack(shared.sd_model)
...
@@ -160,20 +160,20 @@ modules.sd_hijack.model_hijack.hijack(shared.sd_model)
modules
.
scripts
.
load_scripts
(
os
.
path
.
join
(
script_path
,
"scripts"
))
modules
.
scripts
.
load_scripts
(
os
.
path
.
join
(
script_path
,
"scripts"
))
if
__name__
==
"__main__"
:
# make the program just exit at ctrl+c without waiting for anything
def
sigint_handler
(
sig
,
frame
):
print
(
f
'Interrupted with singal {sig} in {frame}'
)
os
.
_exit
(
0
)
# make the program just exit at ctrl+c without waiting for anything
def
sigint_handler
(
sig
,
frame
):
print
(
f
'Interrupted with singal {sig} in {frame}'
)
os
.
_exit
(
0
)
signal
.
signal
(
signal
.
SIGINT
,
sigint_handler
)
signal
.
signal
(
signal
.
SIGINT
,
sigint_handler
)
demo
=
modules
.
ui
.
create_ui
(
txt2img
=
wrap_gradio_gpu_call
(
modules
.
txt2img
.
txt2img
),
img2img
=
wrap_gradio_gpu_call
(
modules
.
img2img
.
img2img
),
run_extras
=
wrap_gradio_gpu_call
(
run_extras
),
run_pnginfo
=
run_pnginfo
)
demo
=
modules
.
ui
.
create_ui
(
demo
.
launch
(
share
=
cmd_opts
.
share
,
server_name
=
"0.0.0.0"
if
cmd_opts
.
listen
else
None
)
txt2img
=
wrap_gradio_gpu_call
(
modules
.
txt2img
.
txt2img
),
img2img
=
wrap_gradio_gpu_call
(
modules
.
img2img
.
img2img
),
run_extras
=
wrap_gradio_gpu_call
(
run_extras
),
run_pnginfo
=
run_pnginfo
)
demo
.
launch
(
share
=
cmd_opts
.
share
,
server_name
=
"0.0.0.0"
if
cmd_opts
.
listen
else
None
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment