kevinwang676 commited on
Commit
ae15622
·
verified ·
1 Parent(s): 44d17ea

Update usr/diff/shallow_diffusion_tts.py

Browse files
Files changed (1) hide show
  1. usr/diff/shallow_diffusion_tts.py +2 -1
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
@@ -171,6 +171,7 @@ class GaussianDiffusion(nn.Module):
171
  Use the PLMS method from [Pseudo Numerical Methods for Diffusion Models on Manifolds](https://arxiv.org/abs/2202.09778).
172
  """
173
 
 
174
  def get_x_pred(x, noise_t, t):
175
  a_t = extract(self.alphas_cumprod, t, x.shape)
176
  if t[0] < interval:
 
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
 
171
  Use the PLMS method from [Pseudo Numerical Methods for Diffusion Models on Manifolds](https://arxiv.org/abs/2202.09778).
172
  """
173
 
174
+ @spaces.GPU(duration=8)
175
  def get_x_pred(x, noise_t, t):
176
  a_t = extract(self.alphas_cumprod, t, x.shape)
177
  if t[0] < interval: