mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-02 19:59:52 +00:00
dev: Everything is Assets
This commit is contained in:
9
main.py
9
main.py
@@ -278,11 +278,11 @@ def cleanup_temp():
|
||||
if os.path.exists(temp_dir):
|
||||
shutil.rmtree(temp_dir, ignore_errors=True)
|
||||
|
||||
def setup_database():
|
||||
async def setup_database():
|
||||
try:
|
||||
from app.database.db import init_db, dependencies_available
|
||||
from app.database.db import init_db_engine, dependencies_available
|
||||
if dependencies_available():
|
||||
init_db()
|
||||
await init_db_engine()
|
||||
except Exception as 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}")
|
||||
|
||||
@@ -309,6 +309,8 @@ def start_comfyui(asyncio_loop=None):
|
||||
asyncio.set_event_loop(asyncio_loop)
|
||||
prompt_server = server.PromptServer(asyncio_loop)
|
||||
|
||||
asyncio_loop.run_until_complete(setup_database())
|
||||
|
||||
hook_breaker_ac10a0.save_functions()
|
||||
asyncio_loop.run_until_complete(nodes.init_extra_nodes(
|
||||
init_custom_nodes=(not args.disable_all_custom_nodes) or len(args.whitelist_custom_nodes) > 0,
|
||||
@@ -317,7 +319,6 @@ def start_comfyui(asyncio_loop=None):
|
||||
hook_breaker_ac10a0.restore_functions()
|
||||
|
||||
cuda_malloc_warning()
|
||||
setup_database()
|
||||
|
||||
prompt_server.add_routes()
|
||||
hijack_progress(prompt_server)
|
||||
|
||||
Reference in New Issue
Block a user