Spaces:
Running
on
Zero
Running
on
Zero
Update inference_gradio.py
Browse files- inference_gradio.py +4 -2
inference_gradio.py
CHANGED
|
@@ -11,7 +11,7 @@ import torch
|
|
| 11 |
import torchaudio
|
| 12 |
import soundfile as sf
|
| 13 |
from pathlib import Path
|
| 14 |
-
|
| 15 |
from cached_path import cached_path
|
| 16 |
|
| 17 |
from lemas_tts.api import TTS, PRETRAINED_ROOT, CKPTS_ROOT
|
|
@@ -198,7 +198,9 @@ def get_available_projects():
|
|
| 198 |
print("project_list:", project_list)
|
| 199 |
return project_list
|
| 200 |
|
| 201 |
-
|
|
|
|
|
|
|
| 202 |
def infer(
|
| 203 |
project, file_checkpoint, exp_name, ref_text, ref_audio, denoise_audio, gen_text, nfe_step, use_ema, separate_langs, frontend, speed, cfg_strength, use_acc_grl, ref_ratio, no_ref_audio, sway_sampling_coef, use_prosody_encoder, seed
|
| 204 |
):
|
|
|
|
| 11 |
import torchaudio
|
| 12 |
import soundfile as sf
|
| 13 |
from pathlib import Path
|
| 14 |
+
import spaces
|
| 15 |
from cached_path import cached_path
|
| 16 |
|
| 17 |
from lemas_tts.api import TTS, PRETRAINED_ROOT, CKPTS_ROOT
|
|
|
|
| 198 |
print("project_list:", project_list)
|
| 199 |
return project_list
|
| 200 |
|
| 201 |
+
@spaces.GPU
|
| 202 |
+
@torch.no_grad()
|
| 203 |
+
@torch.inference_mode()
|
| 204 |
def infer(
|
| 205 |
project, file_checkpoint, exp_name, ref_text, ref_audio, denoise_audio, gen_text, nfe_step, use_ema, separate_langs, frontend, speed, cfg_strength, use_acc_grl, ref_ratio, no_ref_audio, sway_sampling_coef, use_prosody_encoder, seed
|
| 206 |
):
|