From e6919a582a1f9b9b4f0f526d88bb8955d0d9747d Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sun, 30 Jul 2023 11:51:05 +0900 Subject: [PATCH] bugfix: Bug fix for the issue where enable/disable of the web extension was not working. --- README.md | 7 ++++--- __init__.py | 13 ++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b3c957a..8b63625 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,10 @@ You can execute ComfyUI by running either `./run_gpu.sh` or `./run_cpu.sh` depen # Changes -* **0.17** Support preview method setting feature -* **0.14** Support robust update -* **0.13** Support additional 'pip' section for install spec +* **0.17.1** Bug fix for the issue where enable/disable of the web extension was not working. +* **0.17** Support preview method setting feature. +* **0.14** Support robust update. +* **0.13** Support additional 'pip' section for install spec. * **0.12** Better installation support for Windows. * **0.9** Support keyword search in installer menu. * **V0.7.1** Bug fix for the issue where updates were not being applied on Windows. diff --git a/__init__.py b/__init__.py index 1d7bc7f..11c3848 100644 --- a/__init__.py +++ b/__init__.py @@ -33,7 +33,7 @@ sys.path.append('../..') from torchvision.datasets.utils import download_url # ensure .js -print("### Loading: ComfyUI-Manager (V0.17)") +print("### Loading: ComfyUI-Manager (V0.17.1)") comfy_ui_revision = "Unknown" @@ -357,7 +357,14 @@ def check_a_custom_node_installed(item, do_fetch=False): elif item['install_type'] == 'copy' and len(item['files']) == 1: dir_name = os.path.basename(item['files'][0]) - base_path = custom_nodes_path if item['files'][0].endswith('.py') else js_path + + if item['files'][0].endswith('.py'): + base_path = custom_nodes_path + elif 'js_path' in item: + base_path = os.path.join(js_path, item['js_path']) + else: + base_path = js_path + file_path = os.path.join(base_path, dir_name) if os.path.exists(file_path): item['installed'] = 'True' @@ -893,7 +900,7 @@ async def install_custom_node(request): if install_type == "git-clone": res = gitclone_set_active(json_data['files'], not is_disabled) elif install_type == "copy": - res = copy_set_active(json_data['files'], not is_disabled) + res = copy_set_active(json_data['files'], not is_disabled, json_data.get('js_path', None)) if res: return web.json_response({}, content_type='application/json')