Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

MLU memory optimization (#7470)

BiologicalExplosion2222cf67fdb2
diff --git a/comfy/model_management.py b/comfy/model_management.py
index 84a260fc4..19e6c8dff 100644
--- a/comfy/model_management.py
+++ b/comfy/model_management.py
@@ -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()