aboutsummaryrefslogtreecommitdiff
path: root/webui.py
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-06-06 00:25:28 +0900
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-06-06 01:09:30 +0900
commit1411a6e74b2fa07ecfc2117d774520f957651145 (patch)
treef2f4a7a00b696c6cc2c7a87a97fdec0fe406cdf8 /webui.py
parent18acc0b30d9184702a772287ed8197385e0aed98 (diff)
rework-disable-autolaunch
Diffstat (limited to 'webui.py')
-rw-r--r--webui.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/webui.py b/webui.py
index 254fada3..1ee0e41d 100644
--- a/webui.py
+++ b/webui.py
@@ -396,7 +396,7 @@ def webui():
ssl_verify=cmd_opts.disable_tls_verify,
debug=cmd_opts.gradio_debug,
auth=gradio_auth_creds,
- inbrowser=cmd_opts.autolaunch,
+ inbrowser=cmd_opts.autolaunch and os.getenv('SD_WEBUI_DISABLE_AUTOLAUNCH') != '1',
prevent_thread_lock=True,
allowed_paths=cmd_opts.gradio_allowed_path,
app_kwargs={
@@ -407,9 +407,6 @@ def webui():
if cmd_opts.add_stop_route:
app.add_route("/_stop", stop_route, methods=["POST"])
- # after initial launch, disable --autolaunch for subsequent restarts
- cmd_opts.autolaunch = False
-
startup_timer.record("gradio launch")
# gradio uses a very open CORS policy via app.user_middleware, which makes it possible for