mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-06-10 13:32:08 +08:00
Renamed 'EXECUTE' class method to 'execute'
This commit is contained in:
parent
d79a3cf990
commit
2197b6cbf3
@ -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
|
||||
|
||||
|
||||
|
@ -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"):
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user