Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -359,8 +359,6 @@ def infer_compo(style_description, ref_style_file, caption, ref_sub_file, progre
|
|
359 |
return sampled_image # Return the sampled_image PIL image
|
360 |
|
361 |
finally:
|
362 |
-
models_to(sam_model, device="cpu")
|
363 |
-
models_to(sam_model.sam, device="cpu")
|
364 |
# Clear CUDA cache
|
365 |
torch.cuda.empty_cache()
|
366 |
gc.collect()
|
|
|
359 |
return sampled_image # Return the sampled_image PIL image
|
360 |
|
361 |
finally:
|
|
|
|
|
362 |
# Clear CUDA cache
|
363 |
torch.cuda.empty_cache()
|
364 |
gc.collect()
|