mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-25 13:50:15 +08:00
Merge e34525e3d0 into 1a20656448
This commit is contained in:
commit
9845895da0
10
main.py
10
main.py
@ -328,6 +328,14 @@ def setup_database():
|
|||||||
logging.error(f"Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: {e}")
|
logging.error(f"Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
def prompt_worker_failfast(*args, **kwargs):
|
||||||
|
try:
|
||||||
|
return prompt_worker(*args, **kwargs)
|
||||||
|
except Exception:
|
||||||
|
logging.critical("Unhandled exception in prompt_worker; exiting process.", exc_info=True)
|
||||||
|
os._exit(1)
|
||||||
|
|
||||||
|
|
||||||
def start_comfyui(asyncio_loop=None):
|
def start_comfyui(asyncio_loop=None):
|
||||||
"""
|
"""
|
||||||
Starts the ComfyUI server using the provided asyncio event loop or creates a new one.
|
Starts the ComfyUI server using the provided asyncio event loop or creates a new one.
|
||||||
@ -367,7 +375,7 @@ def start_comfyui(asyncio_loop=None):
|
|||||||
prompt_server.add_routes()
|
prompt_server.add_routes()
|
||||||
hijack_progress(prompt_server)
|
hijack_progress(prompt_server)
|
||||||
|
|
||||||
threading.Thread(target=prompt_worker, daemon=True, args=(prompt_server.prompt_queue, prompt_server,)).start()
|
threading.Thread(target=prompt_worker_failfast, daemon=True, args=(prompt_server.prompt_queue, prompt_server,)).start()
|
||||||
|
|
||||||
if args.quick_test_for_ci:
|
if args.quick_test_for_ci:
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user