From 4b6197d3430a48d00313eb9fb41109b79df91200 Mon Sep 17 00:00:00 2001 From: Peyton Date: Mon, 7 Aug 2023 23:04:57 -0500 Subject: [PATCH] Removed .detach() because not needed in inference_mode --- comfyui_to_python.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/comfyui_to_python.py b/comfyui_to_python.py index 7e79674..6a5ba4c 100644 --- a/comfyui_to_python.py +++ b/comfyui_to_python.py @@ -149,8 +149,6 @@ def create_function_call_code(obj_name: str, func: str, variable_name: str, is_l elif isinstance(value, str): value = value.replace("\n", "\\n") return f'{key}="{value}"' - elif key == 'images' and "saveimage" in obj_name and isinstance(value, dict) and 'variable_name' in value: - return f'{key}={value["variable_name"]}.detach()' elif isinstance(value, dict) and 'variable_name' in value: return f'{key}={value["variable_name"]}' return f'{key}={value}'