mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-27 16:26:39 +00:00
Renamed prepare_class_clone to PREPARE_CLASS_CLONE
This commit is contained in:
parent
039a64be76
commit
a19ca62354
@ -1178,7 +1178,7 @@ class ComfyNodeV3:
|
|||||||
raise Exception(f"Invalid return type from node: {type(to_return)}")
|
raise Exception(f"Invalid return type from node: {type(to_return)}")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def prepare_class_clone(cls, hidden_inputs: dict) -> type[ComfyNodeV3]:
|
def PREPARE_CLASS_CLONE(cls, hidden_inputs: dict) -> type[ComfyNodeV3]:
|
||||||
"""Creates clone of real node class to prevent monkey-patching."""
|
"""Creates clone of real node class to prevent monkey-patching."""
|
||||||
c_type: type[ComfyNodeV3] = cls if is_class(cls) else type(cls)
|
c_type: type[ComfyNodeV3] = cls if is_class(cls) else type(cls)
|
||||||
type_clone: type[ComfyNodeV3] = shallow_clone_class(c_type)
|
type_clone: type[ComfyNodeV3] = shallow_clone_class(c_type)
|
||||||
|
@ -229,12 +229,12 @@ def _map_node_over_list(obj, input_data_all, func, allow_interrupt=False, execut
|
|||||||
if is_class(obj):
|
if is_class(obj):
|
||||||
type_obj = obj
|
type_obj = obj
|
||||||
obj.VALIDATE_CLASS()
|
obj.VALIDATE_CLASS()
|
||||||
class_clone = obj.prepare_class_clone(hidden_inputs)
|
class_clone = obj.PREPARE_CLASS_CLONE(hidden_inputs)
|
||||||
# otherwise, use class instance to populate/reuse some fields
|
# otherwise, use class instance to populate/reuse some fields
|
||||||
else:
|
else:
|
||||||
type_obj = type(obj)
|
type_obj = type(obj)
|
||||||
type_obj.VALIDATE_CLASS()
|
type_obj.VALIDATE_CLASS()
|
||||||
class_clone = type_obj.prepare_class_clone(hidden_inputs)
|
class_clone = type_obj.PREPARE_CLASS_CLONE(hidden_inputs)
|
||||||
# NOTE: this is a mock of state management; for local, just stores NodeStateLocal on node instance
|
# NOTE: this is a mock of state management; for local, just stores NodeStateLocal on node instance
|
||||||
if hasattr(obj, "local_state"):
|
if hasattr(obj, "local_state"):
|
||||||
if obj.local_state is None:
|
if obj.local_state is None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user