Skip to content

Commit c4b912a

Browse files
authored
fix: manually move hann window to device (#87)
1 parent 745cba2 commit c4b912a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

audio_separator/separator/uvr_lib_v5/bs_roformer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ def forward(
475475

476476
raw_audio, batch_audio_channel_packed_shape = pack_one(raw_audio, '* t')
477477

478-
stft_window = self.stft_window_fn(device=device)
478+
stft_window = self.stft_window_fn().to(device)
479479

480480
stft_repr = torch.stft(raw_audio, **self.stft_kwargs, window=stft_window, return_complex=True)
481481
stft_repr = torch.view_as_real(stft_repr)

audio_separator/separator/uvr_lib_v5/mel_band_roformer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def forward(
407407

408408
raw_audio, batch_audio_channel_packed_shape = pack_one(raw_audio, '* t')
409409

410-
stft_window = self.stft_window_fn(device=device)
410+
stft_window = self.stft_window_fn().to(device)
411411

412412
stft_repr = torch.stft(raw_audio, **self.stft_kwargs, window=stft_window, return_complex=True)
413413
stft_repr = torch.view_as_real(stft_repr)

0 commit comments

Comments
 (0)