Merge pull request #4201 from aliencaocao/fix_nowebui_arg

Fix nowebui arg being ignored
This commit is contained in:
AUTOMATIC1111 2022-11-04 11:03:02 +03:00 committed by GitHub
commit 91c7659dc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -238,12 +238,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()