1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00
This commit is contained in:
sayakpaul
2025-07-07 13:47:12 +05:30
parent b89b5d1338
commit 666a3d9448

View File

@@ -1163,8 +1163,8 @@ def get_1d_rotary_pos_embed(
if use_real and repeat_interleave_real:
# flux, hunyuan-dit, cogvideox
# Use dim=-1 for robust interleaving on the feature dimension
freqs_cos = freqs.cos().repeat_interleave(2, dim=-1) # Shape: [B, S, D]
freqs_sin = freqs.sin().repeat_interleave(2, dim=-1) # Shape: [B, S, D]
freqs_cos = freqs.cos().repeat_interleave(2, dim=-1).float() # Shape: [B, S, D]
freqs_sin = freqs.sin().repeat_interleave(2, dim=-1).float() # Shape: [B, S, D]
return freqs_cos, freqs_sin
elif use_real:
# stable audio, allegro