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.

Fix an OOM issue.

comfyanonymous09f1d76ed88e
diff --git a/comfy/ldm/modules/diffusionmodules/openaimodel.py b/comfy/ldm/modules/diffusionmodules/openaimodel.py
index 1769cc00d..9054a1c2e 100644
--- a/comfy/ldm/modules/diffusionmodules/openaimodel.py
+++ b/comfy/ldm/modules/diffusionmodules/openaimodel.py
@@ -786,6 +786,7 @@ class UNetModel(nn.Module):
if control is not None:
hsp += control.pop()
h = th.cat([h, hsp], dim=1)
+ del hsp
h = module(h, emb, context)
h = h.type(x.dtype)
if self.predict_codebook_ids: