Skip to content

Commit d1b69c9

Browse files
committed
Fix missing .unsqueeze(1) in attention mask for HunyuanVideo VAE
1 parent 5f3ea22 commit d1b69c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/models/autoencoders/autoencoder_kl_hunyuanvideo15.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
145145
frames, height * width, query.dtype, query.device, batch_size=batch_size
146146
)
147147

148-
x = nn.functional.scaled_dot_product_attention(query, key, value, attn_mask=attention_mask)
148+
x = nn.functional.scaled_dot_product_attention(query, key, value, attn_mask=attention_mask.unsqueeze(1))
149149

150150
# batch_size, 1, frames * height * width, channels
151151

0 commit comments

Comments
 (0)