Merge branch 'comfyanonymous:master' into master

This commit is contained in:
patientx 2025-01-02 19:55:49 +03:00 committed by GitHub
commit c523c36aef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1134,9 +1134,8 @@ def soft_empty_cache(force=False):
elif is_ascend_npu():
torch.npu.empty_cache()
elif torch.cuda.is_available():
if force or is_nvidia(): #This seems to make things worse on ROCm so I only do it for cuda
torch.cuda.empty_cache()
torch.cuda.ipc_collect()
torch.cuda.empty_cache()
torch.cuda.ipc_collect()
def unload_all_models():
free_memory(1e30, get_torch_device())