aboutsummaryrefslogtreecommitdiffstats
path: root/launch.py
diff options
context:
space:
mode:
authorBilly Cao <aliencaocao@gmail.com>2022-11-03 05:08:11 +0000
committerBilly Cao <aliencaocao@gmail.com>2022-11-03 05:08:11 +0000
commitfb1374791bf4b4c9b49de5378f29b12fdabcac97 (patch)
tree8454091ab41776720b3ba02f64a55488593b9487 /launch.py
parent1a4ff2de6a835cd8cc1590bbc1a8dedb5ad37e5b (diff)
downloadstable-diffusion-webui-gfx803-fb1374791bf4b4c9b49de5378f29b12fdabcac97.tar.gz
stable-diffusion-webui-gfx803-fb1374791bf4b4c9b49de5378f29b12fdabcac97.tar.bz2
stable-diffusion-webui-gfx803-fb1374791bf4b4c9b49de5378f29b12fdabcac97.zip
Fix --nowebui argument being ineffective
Diffstat (limited to 'launch.py')
-rw-r--r--launch.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/launch.py b/launch.py
index 958336f2..b061bce6 100644
--- a/launch.py
+++ b/launch.py
@@ -217,12 +217,15 @@ def tests(argv):
proc.kill()
-def start_webui():
- print(f"Launching Web UI with arguments: {' '.join(sys.argv[1:])}")
+def start():
+ print(f"Launching {'API server' if '--nowebui' in sys.argv else 'Web UI'} with arguments: {' '.join(sys.argv[1:])}")
import webui
- webui.webui()
+ if '--nowebui' in sys.argv:
+ webui.api_only()
+ else:
+ webui.webui()
if __name__ == "__main__":
prepare_enviroment()
- start_webui()
+ start()