diff --git a/README.md b/README.md index 12d41ee..f2930a8 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ def main(): ) saveimage_19 = saveimage.save_images( - filename_prefix="ComfyUI", images=vaedecode_17[0].detach() + filename_prefix="ComfyUI", images=vaedecode_17[0] ) 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}'