mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-28 08:46:35 +00:00
Renamed 'EXECUTE' class method to 'execute'
This commit is contained in:
parent
d79a3cf990
commit
2197b6cbf3
@ -586,9 +586,9 @@ class ComfyNodeV3(ABC):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def EXECUTE(cls, **kwargs) -> NodeOutput:
|
def execute(cls, **kwargs) -> NodeOutput:
|
||||||
pass
|
pass
|
||||||
EXECUTE = None
|
execute = None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def GET_SERIALIZERS(cls) -> list[Serializer]:
|
def GET_SERIALIZERS(cls) -> list[Serializer]:
|
||||||
@ -601,7 +601,7 @@ class ComfyNodeV3(ABC):
|
|||||||
def VALIDATE_CLASS(cls):
|
def VALIDATE_CLASS(cls):
|
||||||
if not callable(cls.DEFINE_SCHEMA):
|
if not callable(cls.DEFINE_SCHEMA):
|
||||||
raise Exception(f"No DEFINE_SCHEMA function was defined for node class {cls.__name__}.")
|
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__}.")
|
raise Exception(f"No execute function was defined for node class {cls.__name__}.")
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
@ -894,7 +894,7 @@ class TestNode(ComfyNodeV3):
|
|||||||
def DEFINE_SCHEMA(cls):
|
def DEFINE_SCHEMA(cls):
|
||||||
return cls.SCHEMA
|
return cls.SCHEMA
|
||||||
|
|
||||||
def EXECUTE(**kwargs):
|
def execute(**kwargs):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ class V3TestNode(ComfyNodeV3):
|
|||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@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"):
|
if hasattr(cls, "hahajkunless"):
|
||||||
raise Exception("The 'cls' variable leaked instance state between runs!")
|
raise Exception("The 'cls' variable leaked instance state between runs!")
|
||||||
if hasattr(cls, "doohickey"):
|
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):
|
if isinstance(obj, ComfyNodeV3):
|
||||||
type(obj).VALIDATE_CLASS()
|
type(obj).VALIDATE_CLASS()
|
||||||
class_clone = prepare_class_clone(obj)
|
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
|
# V1
|
||||||
else:
|
else:
|
||||||
results.append(getattr(obj, func)(**inputs))
|
results.append(getattr(obj, func)(**inputs))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user