Merge pull request #3 from pydn/2023-08-07_add_inference_mode

Removed .detach() because not needed in inference_mode
This commit is contained in:
Peyton DeNiro
2023-08-07 23:12:57 -05:00
committed by GitHub
2 changed files with 1 additions and 3 deletions
+1 -1
View File
@@ -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]
)
-2
View File
@@ -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}'