stardate69 commited on
Commit
2a12840
·
verified ·
1 Parent(s): 5c7fb80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -41,12 +41,6 @@ def generate_audio():
41
  # Generate the audio using StableAudioPipeline
42
  generator = torch.Generator(device)
43
  generator.manual_seed(seed)
44
-
45
- latent_noise = torch.randn(
46
- (1, 2, pipe.vae.latent_dim, pipe.vae.latent_dim), # Use dimensions compatible with the VAE
47
- device=device,
48
- generator=generator
49
- )
50
 
51
  audio_output = pipe(
52
  prompt=prompt,
@@ -55,8 +49,7 @@ def generate_audio():
55
  guidance_scale=10.0,
56
  audio_end_in_s=1,
57
  num_waveforms_per_prompt=1,
58
- generator=generator,
59
- latents = latent_noise
60
  ).audios
61
 
62
  # Convert audio to BytesIO in memory
 
41
  # Generate the audio using StableAudioPipeline
42
  generator = torch.Generator(device)
43
  generator.manual_seed(seed)
 
 
 
 
 
 
44
 
45
  audio_output = pipe(
46
  prompt=prompt,
 
49
  guidance_scale=10.0,
50
  audio_end_in_s=1,
51
  num_waveforms_per_prompt=1,
52
+ generator=generator
 
53
  ).audios
54
 
55
  # Convert audio to BytesIO in memory