Skip to content

Commit 335dd96

Browse files
caohch-1QuKa
andauthored
Fix Step3.7 vision RoPE spatial W/H axis order (#50547)
* Fix Step3.7 vision RoPE spatial axis order * Remove synthetic RoPE unit test --------- Co-authored-by: QuKa <caohongchen.chc@antgroup.com>
1 parent 34ac6a5 commit 335dd96

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/transformers/models/step3p7/modeling_step3p7.py‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/transformers/models/step3p7/modular_step3p7.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,8 @@ def recomposition_frequencies(self, freq):
603603
"""
604604
Recompose the frequencies into the final spatial layout used per each grid.
605605
"""
606-
freq_hw = freq.flatten(1)
607-
return torch.cat((freq_hw, freq_hw), dim=-1)
606+
freq_wh = freq.flip(1).flatten(1)
607+
return torch.cat((freq_wh, freq_wh), dim=-1)
608608

609609

610610
class Step3p7VisionMLP(MiniMaxM3VLVisionMLP):

0 commit comments

Comments
 (0)