mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-10 06:57:03 +08:00
MLU memory optimization
This commit is contained in:
parent
ab5413351e
commit
d3a2ee5ced
@ -1237,6 +1237,8 @@ def soft_empty_cache(force=False):
|
|||||||
torch.xpu.empty_cache()
|
torch.xpu.empty_cache()
|
||||||
elif is_ascend_npu():
|
elif is_ascend_npu():
|
||||||
torch.npu.empty_cache()
|
torch.npu.empty_cache()
|
||||||
|
elif is_mlu():
|
||||||
|
torch.mlu.empty_cache()
|
||||||
elif torch.cuda.is_available():
|
elif torch.cuda.is_available():
|
||||||
torch.cuda.empty_cache()
|
torch.cuda.empty_cache()
|
||||||
torch.cuda.ipc_collect()
|
torch.cuda.ipc_collect()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user