thecollabagepatch commited on
Commit
9a31575
1 Parent(s): 8263fa6

fixing continue_music one more time

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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
- prompt_waveform, _ = torchaudio.load(io.BytesIO(prompt_audio.export(format="wav")))
 
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