Compare commits

...

2 Commits

Author SHA1 Message Date
Mark Merritt
3b5375e96b
Merge e26927a881 into 5c475e3c15 2025-12-05 15:26:51 -06:00
Mark Merritt
e26927a881 use configured db_mode instead of hardcoded 'remote' at startup
This allows users to set db_mode='cache' in config to avoid downloading
fresh data on every startup, which should help with startup performance
and reduce unnecessary network requests.
2025-09-16 12:41:36 -07:00
2 changed files with 5 additions and 4 deletions

View File

@ -811,7 +811,7 @@ class UnifiedManager:
dont_wait = True
# reload 'cnr_map' and 'repo_cnr_map'
cnrs = await cnr_utils.get_cnr_data(cache_mode=cache_mode=='cache', dont_wait=dont_wait)
cnrs = await cnr_utils.get_cnr_data(cache_mode=True, dont_wait=dont_wait)
for x in cnrs:
self.cnr_map[x['id']] = x

View File

@ -1796,9 +1796,10 @@ async def default_cache_update():
if core.get_config()['network_mode'] == 'private':
logging.info("[ComfyUI-Manager] The private comfyregistry is not yet supported in `network_mode=private`.")
else:
# load at least once
await core.unified_manager.reload('remote', dont_wait=False)
await core.unified_manager.get_custom_nodes(channel_url, 'remote')
# use configured db_mode for startup data loading
db_mode = core.get_config()['db_mode']
await core.unified_manager.reload(db_mode, dont_wait=False)
await core.unified_manager.get_custom_nodes(channel_url, db_mode)
logging.info("[ComfyUI-Manager] All startup tasks have been completed.")