Lens: remove redundant memory optimisation

This commit is contained in:
kijai 2026-05-26 09:27:44 +03:00
parent d16fea7105
commit 893915b949

View File

@ -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)