From 322bf716ef86fdbf463e05f868f2b3223193bb83 Mon Sep 17 00:00:00 2001 From: Meisoftcoltd <38667978+Meisoftcoltd@users.noreply.github.com> Date: Sun, 28 Jun 2026 20:14:59 +0000 Subject: [PATCH] fix(core): remove broken decorator and use standard ComfyUI registration for LazyGate --- __init__.py | 4 ++++ test_import.py | 34 ++++++++++++++++++++++++++++++++++ tools.py | 1 - 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 test_import.py diff --git a/__init__.py b/__init__.py index 102e501..1876e37 100644 --- a/__init__.py +++ b/__init__.py @@ -52,4 +52,8 @@ NODE_DISPLAY_NAME_MAPPINGS.update({ "Meisoft_LazyGate": "🚦 Meisoft Lazy Gate", }) +NODE_CLASS_MAPPINGS.update({ + "Meisoft_LazyGate": tools.Meisoft_LazyGate, +}) + __all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS'] diff --git a/test_import.py b/test_import.py new file mode 100644 index 0000000..426f9bf --- /dev/null +++ b/test_import.py @@ -0,0 +1,34 @@ +import sys +import os + +from types import ModuleType + +class DummyModule(ModuleType): + def __getattr__(self, name): + if name == "__path__": + return [] + if name == "__file__": + return "dummy.py" + return DummyModule(f"{self.__name__}.{name}") + def __call__(self, *args, **kwargs): + return self + +comfy_module = DummyModule("comfy") +sys.modules["comfy"] = comfy_module +comfy_utils_module = DummyModule("comfy.utils") +sys.modules["comfy.utils"] = comfy_utils_module +comfy_mm_module = DummyModule("comfy.model_management") +sys.modules["comfy.model_management"] = comfy_mm_module + +folder_paths_module = DummyModule("folder_paths") +folder_paths_module.get_output_directory = lambda: "." +folder_paths_module.get_filename_list = lambda x: [] +sys.modules["folder_paths"] = folder_paths_module + +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) +import importlib.util +spec = importlib.util.spec_from_file_location("ComfyUI_Sequential_Batcher", "__init__.py") +module = importlib.util.module_from_spec(spec) +sys.modules["ComfyUI_Sequential_Batcher"] = module +spec.loader.exec_module(module) +print("Import success!") diff --git a/tools.py b/tools.py index f7cea19..1ed1318 100644 --- a/tools.py +++ b/tools.py @@ -582,7 +582,6 @@ class LTXVSingleFrameInjector: return ({"samples": samples, "noise_mask": mask},) -@register_node(display_name="🚦 Meisoft Lazy Gate") class Meisoft_LazyGate: @classmethod def INPUT_TYPES(s):