From e16e72cbbd3c9be823adc3e89dcdc560f93d84b2 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sun, 4 Aug 2024 22:39:13 +0900 Subject: [PATCH] feat: config.ini - `skip_migration_check` is supported. --- README.md | 3 +++ glob/manager_core.py | 3 +++ glob/manager_server.py | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 51a47c3d..09f2ad9b 100644 --- a/README.md +++ b/README.md @@ -320,6 +320,9 @@ NODE_CLASS_MAPPINGS.update({ * Use `aria2` as downloader * [howto](docs/en/use_aria2.md) +* If you add the item `skip_migration_check = True` to `config.ini`, it will not check whether there are nodes that can be migrated at startup. + * This option can be used if performance issues occur in a Colab+GDrive environment. + ## Scanner When you run the `scan.sh` script: diff --git a/glob/manager_core.py b/glob/manager_core.py index 60a764a3..fc5303c1 100644 --- a/glob/manager_core.py +++ b/glob/manager_core.py @@ -1397,6 +1397,7 @@ def write_config(): 'model_download_by_agent': get_config()['model_download_by_agent'], 'downgrade_blacklist': get_config()['downgrade_blacklist'], 'security_level': get_config()['security_level'], + 'skip_migration_check': get_config()['skip_migration_check'], } with open(config_path, 'w') as configfile: config.write(configfile) @@ -1431,6 +1432,7 @@ def read_config(): 'windows_selector_event_loop_policy': default_conf['windows_selector_event_loop_policy'].lower() == 'true' if 'windows_selector_event_loop_policy' in default_conf else False, 'model_download_by_agent': default_conf['model_download_by_agent'].lower() == 'true' if 'model_download_by_agent' in default_conf else False, 'downgrade_blacklist': default_conf['downgrade_blacklist'] if 'downgrade_blacklist' in default_conf else '', + 'skip_migration_check': default_conf['skip_migration_check'].lower() == 'true' if 'skip_migration_check' in default_conf else False, 'security_level': security_level } @@ -1449,6 +1451,7 @@ def read_config(): 'windows_selector_event_loop_policy': False, 'model_download_by_agent': False, 'downgrade_blacklist': '', + 'skip_migration_check': False, 'security_level': 'normal', } diff --git a/glob/manager_server.py b/glob/manager_server.py index 9332eb3e..d0c731d3 100644 --- a/glob/manager_server.py +++ b/glob/manager_server.py @@ -1723,7 +1723,11 @@ async def default_cache_update(): e = get_cache("github-stats.json") await asyncio.gather(a, b, c, d, e) - await core.check_need_to_migrate() + + if not core.get_config()['skip_migration_check']: + await core.check_need_to_migrate() + else: + print("[ComfyUI-Manager] Migration check is skipped...") threading.Thread(target=lambda: asyncio.run(default_cache_update())).start()