mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 18:02:58 +08:00
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.
This commit is contained in:
parent
a0b14d4127
commit
e26927a881
@ -809,7 +809,7 @@ class UnifiedManager:
|
|||||||
dont_wait = True
|
dont_wait = True
|
||||||
|
|
||||||
# reload 'cnr_map' and 'repo_cnr_map'
|
# 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:
|
for x in cnrs:
|
||||||
self.cnr_map[x['id']] = x
|
self.cnr_map[x['id']] = x
|
||||||
|
|||||||
@ -1754,9 +1754,10 @@ async def default_cache_update():
|
|||||||
if core.get_config()['network_mode'] == 'private':
|
if core.get_config()['network_mode'] == 'private':
|
||||||
logging.info("[ComfyUI-Manager] The private comfyregistry is not yet supported in `network_mode=private`.")
|
logging.info("[ComfyUI-Manager] The private comfyregistry is not yet supported in `network_mode=private`.")
|
||||||
else:
|
else:
|
||||||
# load at least once
|
# use configured db_mode for startup data loading
|
||||||
await core.unified_manager.reload('remote', dont_wait=False)
|
db_mode = core.get_config()['db_mode']
|
||||||
await core.unified_manager.get_custom_nodes(channel_url, 'remote')
|
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.")
|
logging.info("[ComfyUI-Manager] All startup tasks have been completed.")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user