Removed .detach() because not needed in inference_mode

This commit is contained in:
Peyton
2023-08-07 23:04:57 -05:00
parent a7a43f4f5d
commit 4b6197d343
-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}'