Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,13 +7,12 @@ import spaces
|
|
| 7 |
|
| 8 |
# Load the StableAudio pipeline model
|
| 9 |
pipe = StableAudioPipeline.from_pretrained("stabilityai/stable-audio-open-1.0", torch_dtype=torch.float16)
|
| 10 |
-
|
| 11 |
|
| 12 |
# Define the function to generate the sound based on a text prompt
|
| 13 |
@spaces.GPU
|
| 14 |
def generate_sound(prompt, negative_prompt, seed, inference_steps, duration, waveforms):
|
| 15 |
-
|
| 16 |
-
|
| 17 |
# Set the seed for reproducibility
|
| 18 |
generator = torch.Generator("cuda").manual_seed(seed)
|
| 19 |
|
|
|
|
| 7 |
|
| 8 |
# Load the StableAudio pipeline model
|
| 9 |
pipe = StableAudioPipeline.from_pretrained("stabilityai/stable-audio-open-1.0", torch_dtype=torch.float16)
|
| 10 |
+
pipe = pipe.to("cuda")
|
| 11 |
|
| 12 |
# Define the function to generate the sound based on a text prompt
|
| 13 |
@spaces.GPU
|
| 14 |
def generate_sound(prompt, negative_prompt, seed, inference_steps, duration, waveforms):
|
| 15 |
+
|
|
|
|
| 16 |
# Set the seed for reproducibility
|
| 17 |
generator = torch.Generator("cuda").manual_seed(seed)
|
| 18 |
|