Skip to content

Commit 3c70b54

Browse files
committed
update
1 parent bbc5892 commit 3c70b54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/models/transformers/transformer_mochi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def _get_positions(
451451
return positions
452452

453453
def _create_rope(self, freqs: torch.Tensor, pos: torch.Tensor) -> torch.Tensor:
454-
with torch.autocast(self.device.type, torch.float32):
454+
with torch.autocast(freqs.device.type, torch.float32):
455455
# Always run ROPE freqs computation in FP32
456456
freqs = torch.einsum("nd,dhf->nhf", pos.to(torch.float32), freqs.to(torch.float32))
457457

0 commit comments

Comments
 (0)