mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-11 18:03:39 +00:00
MLU memory optimization (#7470)
Co-authored-by: huzhan <huzhan@cambricon.com>
This commit is contained in:
parent
ab5413351e
commit
2222cf67fd
@ -1237,6 +1237,8 @@ def soft_empty_cache(force=False):
|
||||
torch.xpu.empty_cache()
|
||||
elif is_ascend_npu():
|
||||
torch.npu.empty_cache()
|
||||
elif is_mlu():
|
||||
torch.mlu.empty_cache()
|
||||
elif torch.cuda.is_available():
|
||||
torch.cuda.empty_cache()
|
||||
torch.cuda.ipc_collect()
|
||||
|
Loading…
Reference in New Issue
Block a user