From 38d04775034ab7350fa48a518275a56b47eb112a Mon Sep 17 00:00:00 2001 From: kevin314 Date: Mon, 1 Jun 2026 02:48:00 +0000 Subject: [PATCH] Fix STFT dtype mismatch --- fastvideo/models/audio/ltx2_audio_vae.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastvideo/models/audio/ltx2_audio_vae.py b/fastvideo/models/audio/ltx2_audio_vae.py index 0e7670292e..28772210c6 100644 --- a/fastvideo/models/audio/ltx2_audio_vae.py +++ b/fastvideo/models/audio/ltx2_audio_vae.py @@ -1634,7 +1634,7 @@ def forward(self, y: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]: y = y.unsqueeze(1) left_pad = max(0, self.win_length - self.hop_length) y = F.pad(y, (left_pad, 0)) - spec = F.conv1d(y, self.forward_basis, stride=self.hop_length, padding=0) + spec = F.conv1d(y, self.forward_basis.to(y.dtype), stride=self.hop_length, padding=0) n_freqs = spec.shape[1] // 2 real, imag = spec[:, :n_freqs], spec[:, n_freqs:] magnitude = torch.sqrt(real**2 + imag**2)