Skip to content

Commit a3dcd98

Browse files
authored
[core] make qwen hidden states contiguous to make torchao happy. (#13081)
make qwen hidden states contiguous to make torchao happy.
1 parent 9fe0a9c commit a3dcd98

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/diffusers/models/transformers/transformer_qwenimage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,11 +561,11 @@ def __call__(
561561
img_attn_output = joint_hidden_states[:, seq_txt:, :] # Image part
562562

563563
# Apply output projections
564-
img_attn_output = attn.to_out[0](img_attn_output)
564+
img_attn_output = attn.to_out[0](img_attn_output.contiguous())
565565
if len(attn.to_out) > 1:
566566
img_attn_output = attn.to_out[1](img_attn_output) # dropout
567567

568-
txt_attn_output = attn.to_add_out(txt_attn_output)
568+
txt_attn_output = attn.to_add_out(txt_attn_output.contiguous())
569569

570570
return img_attn_output, txt_attn_output
571571

0 commit comments

Comments
 (0)