added torch.mps.empty_cache() to torch_gc()

changed a bunch of places that use torch.cuda.empty_cache() to use torch_gc() instead
This commit is contained in:
AUTOMATIC1111
2023-07-08 17:13:18 +03:00
parent e161b5a025
commit da8916f926
6 changed files with 10 additions and 13 deletions

View File

@@ -590,7 +590,6 @@ def unload_model_weights(sd_model=None, info=None):
sd_model = None
gc.collect()
devices.torch_gc()
torch.cuda.empty_cache()
print(f"Unloaded weights {timer.summary()}.")