mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-07-21 21:01:24 +08:00
launch
This commit is contained in:
parent
9966142391
commit
cc37423f65
16
webui.py
16
webui.py
@ -1,4 +1,6 @@
|
||||
from __future__ import annotations
|
||||
if __name__ == "__main__":
|
||||
raise SystemError("Call launch.py instead")
|
||||
|
||||
|
||||
import os
|
||||
import time
|
||||
@ -9,7 +11,6 @@ from fastapi.encoders import jsonable_encoder
|
||||
from fastapi.responses import JSONResponse
|
||||
|
||||
from modules import initialize, initialize_util, timer
|
||||
from modules_forge import main_thread
|
||||
from modules_forge.initialization import initialize_forge
|
||||
|
||||
startup_timer = timer.startup_timer
|
||||
@ -187,14 +188,3 @@ def api_only():
|
||||
|
||||
def webui():
|
||||
Thread(target=webui_worker, daemon=True).start()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
from modules.shared_cmd_options import cmd_opts
|
||||
|
||||
if cmd_opts.nowebui:
|
||||
api_only()
|
||||
else:
|
||||
webui()
|
||||
|
||||
main_thread.loop()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user