From a1f3589f1b0903c0acced423cd90f6c0efc3343f Mon Sep 17 00:00:00 2001 From: LAOGOU-666 <441059767@qq.com> Date: Sun, 16 Mar 2025 06:45:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=92=E9=99=A4=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E6=90=9E=E4=B8=A2=E4=BA=86BUG-=5F-!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __init__.py | 14 ++++++++++++++ config.json | 12 +++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/__init__.py b/__init__.py index 587ecba..016ae40 100644 --- a/__init__.py +++ b/__init__.py @@ -57,6 +57,20 @@ async def update_exclude_modules(request): return web.json_response({"status": "success"}) except Exception as e: return web.json_response({"status": "error", "message": str(e)}, status=500) + +@PromptServer.instance.routes.get("/hotreload/get_all_modules") +async def get_all_modules(request): + try: + modules = [] + for item in os.listdir(CUSTOM_NODE_ROOT[0]): + item_path = os.path.join(CUSTOM_NODE_ROOT[0], item) + if os.path.isdir(item_path) and not item.startswith('.'): + if os.path.exists(os.path.join(item_path, '__init__.py')): + modules.append(item) + return web.json_response({"modules": modules}) + except Exception as e: + return web.json_response({"status": "error", "message": str(e)}, status=500) + if (HOTRELOAD_EXCLUDE := os.getenv("HOTRELOAD_EXCLUDE", None)) is not None: EXCLUDE_MODULES.update(x for x in HOTRELOAD_EXCLUDE.split(',') if x) HOTRELOAD_OBSERVE_ONLY: set[str] = set(x for x in os.getenv("HOTRELOAD_OBSERVE_ONLY", '').split(',') if x) diff --git a/config.json b/config.json index bccd3a3..38278c8 100644 --- a/config.json +++ b/config.json @@ -3,12 +3,14 @@ "ComfyUI-IF_AI_tools", "rgthree-comfy", "comfyui-kjnodes", - "ComfyUI-LG_HotReload", - "AIGODLIKE-ComfyUI-Translation", - "comfyui_layerstyle", "ComfyUI-Manager", + "ComfyUI-Depth-Pro", + "ComfyUI-Depth-Anything-Tensorrt", + "comfyui_layerstyle", "ComfyUI-Crystools", - "ComfyUI_Custom_Nodes_AlekPet", - "Comfyui-LG_Relight" + "AIGODLIKE-ComfyUI-Translation", + "ComfyUI-LG_HotReload", + "ComfyUI-Easy-Use", + "ComfyUI_Custom_Nodes_AlekPet" ] } \ No newline at end of file