From a19ca623547bd80af14eb9d666c96c0f175f11a6 Mon Sep 17 00:00:00 2001 From: "kosinkadink1@gmail.com" Date: Mon, 14 Jul 2025 02:59:59 -0500 Subject: [PATCH] Renamed prepare_class_clone to PREPARE_CLASS_CLONE --- comfy_api/v3/io.py | 2 +- execution.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/comfy_api/v3/io.py b/comfy_api/v3/io.py index d7f6137f3..e1657563b 100644 --- a/comfy_api/v3/io.py +++ b/comfy_api/v3/io.py @@ -1178,7 +1178,7 @@ class ComfyNodeV3: raise Exception(f"Invalid return type from node: {type(to_return)}") @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.""" c_type: type[ComfyNodeV3] = cls if is_class(cls) else type(cls) type_clone: type[ComfyNodeV3] = shallow_clone_class(c_type) diff --git a/execution.py b/execution.py index 8b1792c29..1d2055ac1 100644 --- a/execution.py +++ b/execution.py @@ -229,12 +229,12 @@ def _map_node_over_list(obj, input_data_all, func, allow_interrupt=False, execut if is_class(obj): type_obj = obj 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 else: type_obj = type(obj) 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 if hasattr(obj, "local_state"): if obj.local_state is None: