Fabrice-TIERCELIN commited on
Commit
b30841e
1 Parent(s): 86aeaeb

Duration 20s

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -58,6 +58,7 @@ class Tango:
58
  def generate(self, prompt, steps = 100, guidance = 3, samples = 1, disable_progress = True):
59
  # Generate audio for a single prompt string
60
  with torch.no_grad():
 
61
  latents = self.model.inference([prompt], self.scheduler, steps, guidance, samples, disable_progress = disable_progress)
62
  mel = self.vae.decode_first_stage(latents)
63
  wave = self.vae.decode_to_waveform(mel)
 
58
  def generate(self, prompt, steps = 100, guidance = 3, samples = 1, disable_progress = True):
59
  # Generate audio for a single prompt string
60
  with torch.no_grad():
61
+ self.model.set_generation_params(duration=20)
62
  latents = self.model.inference([prompt], self.scheduler, steps, guidance, samples, disable_progress = disable_progress)
63
  mel = self.vae.decode_first_stage(latents)
64
  wave = self.vae.decode_to_waveform(mel)