Merge pull request #971 from tbxark-fork/main
Browse fileschore: Update the model checkpoint path to use the cache path.
src/f5_tts/infer/speech_edit.py
CHANGED
@@ -9,6 +9,7 @@ import torch.nn.functional as F
|
|
9 |
import torchaudio
|
10 |
from hydra.utils import get_class
|
11 |
from omegaconf import OmegaConf
|
|
|
12 |
|
13 |
from f5_tts.infer.utils_infer import load_checkpoint, load_vocoder, save_spectrogram
|
14 |
from f5_tts.model import CFM
|
@@ -55,7 +56,8 @@ win_length = model_cfg.model.mel_spec.win_length
|
|
55 |
n_fft = model_cfg.model.mel_spec.n_fft
|
56 |
|
57 |
|
58 |
-
ckpt_path = str(files("f5_tts").joinpath("../../")) + f"ckpts/{exp_name}/model_{ckpt_step}.safetensors"
|
|
|
59 |
output_dir = "tests"
|
60 |
|
61 |
|
|
|
9 |
import torchaudio
|
10 |
from hydra.utils import get_class
|
11 |
from omegaconf import OmegaConf
|
12 |
+
from cached_path import cached_path
|
13 |
|
14 |
from f5_tts.infer.utils_infer import load_checkpoint, load_vocoder, save_spectrogram
|
15 |
from f5_tts.model import CFM
|
|
|
56 |
n_fft = model_cfg.model.mel_spec.n_fft
|
57 |
|
58 |
|
59 |
+
# ckpt_path = str(files("f5_tts").joinpath("../../")) + f"/ckpts/{exp_name}/model_{ckpt_step}.safetensors"
|
60 |
+
ckpt_path = str(cached_path(f"hf://SWivid/F5-TTS/{exp_name}/model_{ckpt_step}.safetensors"))
|
61 |
output_dir = "tests"
|
62 |
|
63 |
|