aboutsummaryrefslogtreecommitdiff
path: root/webui.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-08 14:58:33 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2023-07-08 14:58:33 +0300
commit18256c5f0174126cb103afece2b39b6b831e034a (patch)
tree1831e4793ae6845b2ef450b1bb8111dc5bcfac58 /webui.py
parent211c3398f64b56a9297e831f4662b483793760d6 (diff)
fix for #11478
Diffstat (limited to 'webui.py')
-rw-r--r--webui.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/webui.py b/webui.py
index b02ae7a5..34c2fd18 100644
--- a/webui.py
+++ b/webui.py
@@ -43,7 +43,7 @@ warnings.filterwarnings(action="ignore", category=UserWarning, module="torchvisi
startup_timer.record("import torch")
-import gradio
+import gradio # noqa: F401
startup_timer.record("import gradio")
import ldm.modules.encoders.modules # noqa: F401
@@ -413,7 +413,7 @@ def webui():
"docs_url": "/docs",
"redoc_url": "/redoc",
},
- root_path = f"/{cmd_opts.subpath}",
+ root_path=f"/{cmd_opts.subpath}" if cmd_opts.subpath else "",
)
# after initial launch, disable --autolaunch for subsequent restarts