Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -209,14 +209,14 @@ def infer_batch(ref_audio, ref_text, gen_text_batches, exp_name, remove_silence,
|
|
209 |
# inference
|
210 |
with torch.inference_mode():
|
211 |
# Ensure all inputs are on the same device as ema_model
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
)
|
221 |
|
222 |
# Process generated tensor
|
|
|
209 |
# inference
|
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] generated, _ = ema_model.sample(
|
214 |
+
cond=audio,
|
215 |
+
text=final_text_list,
|
216 |
+
duration=duration,
|
217 |
+
steps=nfe_step,
|
218 |
+
cfg_strength=cfg_strength,
|
219 |
+
sway_sampling_coef=sway_sampling_coef,
|
220 |
)
|
221 |
|
222 |
# Process generated tensor
|