Skip to content

Commit

Permalink
fix: add necessary vocoder output device check
Browse files Browse the repository at this point in the history
  • Loading branch information
jaketae committed Aug 10, 2023
1 parent 586e5be commit 0fa95a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TTS/utils/synthesizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def tts(
# run vocoder model
# [1, T, C]
waveform = self.vocoder_model.inference(vocoder_input.to(vocoder_device))
if not use_gl and waveform.device != torch.device("cpu"):
if waveform.device != torch.device("cpu") and not use_gl:
waveform = waveform.cpu()
if not use_gl:
waveform = waveform.numpy()
Expand Down Expand Up @@ -474,7 +474,7 @@ def tts(
# run vocoder model
# [1, T, C]
waveform = self.vocoder_model.inference(vocoder_input.to(vocoder_device))
if not use_gl and waveform.device != torch.device("cpu"):
if waveform.device != torch.device("cpu"):
waveform = waveform.cpu()
if not use_gl:
waveform = waveform.numpy()
Expand Down

0 comments on commit 0fa95a2

Please sign in to comment.