From 893915b949487691ecf8a7126ac6d627ba491669 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Tue, 26 May 2026 09:27:44 +0300 Subject: [PATCH] Lens: remove redundant memory optimisation --- comfy/ldm/lens/model.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/comfy/ldm/lens/model.py b/comfy/ldm/lens/model.py index 7bff7f6af..08b649843 100644 --- a/comfy/ldm/lens/model.py +++ b/comfy/ldm/lens/model.py @@ -149,8 +149,6 @@ class LensJointAttention(nn.Module): txt_q, txt_k, txt_v = txt_qkv.unbind(dim=2) txt_q = self.norm_added_q(txt_q) txt_k = self.norm_added_k(txt_k) - txt_v = txt_v.contiguous() - del txt_qkv # [B, S, H, D] → [B, H, S, D] for attention, dels to avoid VRAM peaks q = torch.cat([img_q, txt_q], dim=1).transpose(1, 2)