kevinwang676 commited on
Commit
d614497
1 Parent(s): 3e68967

Update usr/diff/shallow_diffusion_tts.py

Browse files
Files changed (1) hide show
  1. usr/diff/shallow_diffusion_tts.py +3 -2
usr/diff/shallow_diffusion_tts.py CHANGED
@@ -15,7 +15,7 @@ from modules.fastspeech.fs2 import FastSpeech2
15
  from modules.diffsinger_midi.fs2 import FastSpeech2MIDI
16
  from utils.hparams import hparams
17
 
18
-
19
 
20
  def exists(x):
21
  return x is not None
@@ -226,7 +226,8 @@ class GaussianDiffusion(nn.Module):
226
  raise NotImplementedError()
227
 
228
  return loss
229
-
 
230
  def forward(self, txt_tokens, mel2ph=None, spk_embed=None,
231
  ref_mels=None, f0=None, uv=None, energy=None, infer=False, **kwargs):
232
  b, *_, device = *txt_tokens.shape, txt_tokens.device
 
15
  from modules.diffsinger_midi.fs2 import FastSpeech2MIDI
16
  from utils.hparams import hparams
17
 
18
+ import spaces
19
 
20
  def exists(x):
21
  return x is not None
 
226
  raise NotImplementedError()
227
 
228
  return loss
229
+
230
+ @spaces.GPU(duration=180)
231
  def forward(self, txt_tokens, mel2ph=None, spk_embed=None,
232
  ref_mels=None, f0=None, uv=None, energy=None, infer=False, **kwargs):
233
  b, *_, device = *txt_tokens.shape, txt_tokens.device