fffiloni commited on
Commit
d679844
1 Parent(s): 1a6b2a7

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -1
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
- find_and_move_object_to_cpu()
 
 
 
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