mirror of https://github.com/coqui-ai/TTS.git
fixing torch device error when synthesizer is called with use_cuda=True
This commit is contained in:
parent
55c7063724
commit
690063380a
|
@ -398,7 +398,7 @@ class ForwardTTS(BaseTTS):
|
|||
"""
|
||||
if hasattr(self, "emb_g"):
|
||||
g = g.type(torch.LongTensor)
|
||||
g = self.emb_g(g) # [B, C, 1]
|
||||
g = self.emb_g(g.to("cuda") if torch.cuda.is_available() else g.to("cpu")) # [B, C, 1]
|
||||
if g is not None:
|
||||
g = g.unsqueeze(-1)
|
||||
# [B, T, C]
|
||||
|
|
Loading…
Reference in New Issue