Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -107,7 +107,7 @@ def _do_predictions(texts, melodies, duration, progress=False, **gen_kwargs):
|
|
107 |
sr, melody = melody[0], torch.from_numpy(melody[1]).to(MODEL.device).float().t()
|
108 |
if melody.dim() == 1:
|
109 |
melody = melody[None]
|
110 |
-
|
111 |
if melody.size(0) != target_sr:
|
112 |
melody = convert_audio(melody, sr, target_sr)
|
113 |
processed_melodies.append(melody[None])
|
|
|
107 |
sr, melody = melody[0], torch.from_numpy(melody[1]).to(MODEL.device).float().t()
|
108 |
if melody.dim() == 1:
|
109 |
melody = melody[None]
|
110 |
+
melody = melody.to(target_ac).to(MODEL.device).float()
|
111 |
if melody.size(0) != target_sr:
|
112 |
melody = convert_audio(melody, sr, target_sr)
|
113 |
processed_melodies.append(melody[None])
|