From 2197b6cbf39cb10d7a3ea4ae0e927ca745577e21 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Thu, 5 Jun 2025 16:42:51 -0700 Subject: [PATCH] Renamed 'EXECUTE' class method to 'execute' --- comfy_api/v3/io.py | 8 ++++---- comfy_extras/nodes_v3_test.py | 2 +- execution.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/comfy_api/v3/io.py b/comfy_api/v3/io.py index 41fa13dea..b8867f3d0 100644 --- a/comfy_api/v3/io.py +++ b/comfy_api/v3/io.py @@ -586,9 +586,9 @@ class ComfyNodeV3(ABC): @classmethod @abstractmethod - def EXECUTE(cls, **kwargs) -> NodeOutput: + def execute(cls, **kwargs) -> NodeOutput: pass - EXECUTE = None + execute = None @classmethod def GET_SERIALIZERS(cls) -> list[Serializer]: @@ -601,7 +601,7 @@ class ComfyNodeV3(ABC): def VALIDATE_CLASS(cls): if not callable(cls.DEFINE_SCHEMA): raise Exception(f"No DEFINE_SCHEMA function was defined for node class {cls.__name__}.") - if not callable(cls.EXECUTE): + if not callable(cls.execute): raise Exception(f"No execute function was defined for node class {cls.__name__}.") ############################################# @@ -894,7 +894,7 @@ class TestNode(ComfyNodeV3): def DEFINE_SCHEMA(cls): return cls.SCHEMA - def EXECUTE(**kwargs): + def execute(**kwargs): pass diff --git a/comfy_extras/nodes_v3_test.py b/comfy_extras/nodes_v3_test.py index 5c514d42a..5e2109355 100644 --- a/comfy_extras/nodes_v3_test.py +++ b/comfy_extras/nodes_v3_test.py @@ -55,7 +55,7 @@ class V3TestNode(ComfyNodeV3): ) @classmethod - def EXECUTE(cls, image: torch.Tensor, some_int: int, combo: str, xyz=None, mask: torch.Tensor=None): + def execute(cls, image: torch.Tensor, some_int: int, combo: str, xyz=None, mask: torch.Tensor=None): if hasattr(cls, "hahajkunless"): raise Exception("The 'cls' variable leaked instance state between runs!") if hasattr(cls, "doohickey"): diff --git a/execution.py b/execution.py index bbba08952..5d5d698d3 100644 --- a/execution.py +++ b/execution.py @@ -187,7 +187,7 @@ def _map_node_over_list(obj, input_data_all, func, allow_interrupt=False, execut if isinstance(obj, ComfyNodeV3): type(obj).VALIDATE_CLASS() class_clone = prepare_class_clone(obj) - results.append(type(obj).EXECUTE.__func__(class_clone, **inputs)) + results.append(type(obj).execute.__func__(class_clone, **inputs)) # V1 else: results.append(getattr(obj, func)(**inputs))