Spaces:
Running
on
Zero
Running
on
Zero
fixing continue_music one more time
Browse files
app.py
CHANGED
|
@@ -216,7 +216,8 @@ def continue_music(input_audio_path, prompt_duration, musicgen_model, num_iterat
|
|
| 216 |
prompt_audio = current_audio[start_time:]
|
| 217 |
|
| 218 |
# Convert the prompt audio to a PyTorch tensor
|
| 219 |
-
|
|
|
|
| 220 |
prompt_waveform = prompt_waveform.to(device)
|
| 221 |
|
| 222 |
# Prepare the audio slice for generation
|
|
|
|
| 216 |
prompt_audio = current_audio[start_time:]
|
| 217 |
|
| 218 |
# Convert the prompt audio to a PyTorch tensor
|
| 219 |
+
prompt_bytes = prompt_audio.export(format="wav").read()
|
| 220 |
+
prompt_waveform, _ = torchaudio.load(io.BytesIO(prompt_bytes))
|
| 221 |
prompt_waveform = prompt_waveform.to(device)
|
| 222 |
|
| 223 |
# Prepare the audio slice for generation
|