Skip to content

Commit

Permalink
stft window fn requires device
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Nov 19, 2023
1 parent 2587134 commit e7b845a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion audiolm_pytorch/soundstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,14 @@ def forward(self, x, return_intermediates = False):
H = 256 samples
'''

stft_window = self.stft_window_fn(self.win_length, device = x.device)

x = torch.stft(
x,
self.n_fft,
hop_length = self.hop_length,
win_length = self.win_length,
window = self.stft_window_fn(self.win_length),
window = stft_window,
normalized = self.stft_normalized,
return_complex = True
)
Expand Down
2 changes: 1 addition & 1 deletion audiolm_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.8.0'
__version__ = '1.8.1'

0 comments on commit e7b845a

Please sign in to comment.