dev: Everything is Assets

This commit is contained in:
bigcat88
2025-08-19 19:56:59 +03:00
parent c708d0a433
commit f92307cd4c
22 changed files with 1650 additions and 977 deletions

View File

@@ -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)