Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -210,7 +210,8 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
|
|
210 |
with torch.inference_mode():
|
211 |
# Ensure all inputs are on the same device as ema_model
|
212 |
audio = audio.to(ema_model.device) # Match ema_model's device
|
213 |
-
final_text_list = [t.to(ema_model.device) if isinstance(t, torch.Tensor) else t for t in final_text_list]
|
|
|
214 |
cond=audio,
|
215 |
text=final_text_list,
|
216 |
duration=duration,
|
|
|
210 |
with torch.inference_mode():
|
211 |
# Ensure all inputs are on the same device as ema_model
|
212 |
audio = audio.to(ema_model.device) # Match ema_model's device
|
213 |
+
final_text_list = [t.to(ema_model.device) if isinstance(t, torch.Tensor) else t for t in final_text_list]
|
214 |
+
generated, _ = ema_model.sample(
|
215 |
cond=audio,
|
216 |
text=final_text_list,
|
217 |
duration=duration,
|