100% reproduce results from unoptimized codebase

This commit is contained in:
layerdiffusion
2024-08-08 16:40:15 -07:00
parent 9b4922cfca
commit 10e4a3779d

View File

@@ -218,7 +218,7 @@ class DoubleStreamBlock(nn.Module):
del txt_v, img_v
attn = attention(q, k, v, pe=pe)
txt_attn, img_attn = attn[:, :, :txt.shape[1], :], attn[:, :, txt.shape[1]:, :]
txt_attn, img_attn = attn[:, :txt.shape[1]], attn[:, txt.shape[1]:]
del attn
img = img + img_mod1_gate * self.img_attn.proj(img_attn)