diff --git a/src/f5_tts/infer/speech_edit.py b/src/f5_tts/infer/speech_edit.py index b724258..4902edb 100644 --- a/src/f5_tts/infer/speech_edit.py +++ b/src/f5_tts/infer/speech_edit.py @@ -9,6 +9,7 @@ import torch.nn.functional as F import torchaudio from hydra.utils import get_class from omegaconf import OmegaConf +from cached_path import cached_path from f5_tts.infer.utils_infer import load_checkpoint, load_vocoder, save_spectrogram from f5_tts.model import CFM @@ -55,7 +56,8 @@ win_length = model_cfg.model.mel_spec.win_length n_fft = model_cfg.model.mel_spec.n_fft -ckpt_path = str(files("f5_tts").joinpath("../../")) + f"ckpts/{exp_name}/model_{ckpt_step}.safetensors" +# ckpt_path = str(files("f5_tts").joinpath("../../")) + f"/ckpts/{exp_name}/model_{ckpt_step}.safetensors" +ckpt_path = str(cached_path(f"hf://SWivid/F5-TTS/{exp_name}/model_{ckpt_step}.safetensors")) output_dir = "tests"