From dabc863ca321c49c4e5768883969826e5e548d92 Mon Sep 17 00:00:00 2001 From: Robonau <30987265+Robonau@users.noreply.github> Date: Fri, 4 Apr 2025 03:07:09 +0100 Subject: [PATCH] fix js loading --- __init__.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/__init__.py b/__init__.py index fc5340a..8a3c647 100644 --- a/__init__.py +++ b/__init__.py @@ -1,23 +1,9 @@ import os -import shutil +import nodes -comfy_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -failfast_path = os.path.abspath(os.path.dirname(__file__)) - -def setup_js(): - try: - js_dest_path = os.path.join(comfy_path, "web", "extensions", "failfast-comfyui-extensions") - js_src_path = os.path.join(failfast_path, "extensions") - print(js_src_path) - print(js_dest_path) - if os.path.exists(js_dest_path): - shutil.rmtree(js_dest_path) - - shutil.copytree(js_src_path, js_dest_path) - - except Exception as e: - print(f"An error occurred: {e}") - -setup_js() +# WEB_DIRECTORY = "./extensions" +nodes.EXTENSION_WEB_DIRS["blibla-comfyui-extensions"] = os.path.join( + os.path.dirname(os.path.realpath(__file__)), "extensions" +) NODE_CLASS_MAPPINGS = {}