Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -300,7 +300,10 @@ def execute_task(args, trainer, device, dtype, shape, enable_grad, settings, pip
|
|
300 |
best_image.save(f"{save_dir}/best_image.png")
|
301 |
#init_image.save(f"{save_dir}/init_image.png")
|
302 |
|
303 |
-
|
|
|
|
|
|
|
304 |
|
305 |
clear_gpu()
|
306 |
|
|
|
300 |
best_image.save(f"{save_dir}/best_image.png")
|
301 |
#init_image.save(f"{save_dir}/init_image.png")
|
302 |
|
303 |
+
# Move the pipe back to CPU
|
304 |
+
if args.model != "flux":
|
305 |
+
# Call the function to find and move object to CPU
|
306 |
+
find_and_move_object_to_cpu()
|
307 |
|
308 |
clear_gpu()
|
309 |
|