unknown commited on
Commit
eb19d9d
·
1 Parent(s): 3af98f2
src/f5_tts/train/finetune_gradio.py CHANGED
@@ -26,7 +26,7 @@ from transformers import pipeline
26
  from cached_path import cached_path
27
  from f5_tts.api import F5TTS
28
  from f5_tts.model.utils import convert_char_to_pinyin
29
-
30
 
31
  training_process = None
32
  system = platform.system()
@@ -36,9 +36,9 @@ last_checkpoint = ""
36
  last_device = ""
37
  last_ema = None
38
 
39
- path_basic = os.path.abspath(os.path.join(__file__, "../../../.."))
40
- path_data = os.path.join(path_basic, "data")
41
- path_project_ckpts = os.path.join(path_basic, "ckpts")
42
  file_train = "src/f5_tts/train/finetune_cli.py"
43
 
44
  device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
 
26
  from cached_path import cached_path
27
  from f5_tts.api import F5TTS
28
  from f5_tts.model.utils import convert_char_to_pinyin
29
+ from importlib.resources import files
30
 
31
  training_process = None
32
  system = platform.system()
 
36
  last_device = ""
37
  last_ema = None
38
 
39
+
40
+ path_data = str(files("f5_tts").joinpath("../../data"))
41
+ path_project_ckpts = str(files("f5_tts").joinpath("../../ckpts"))
42
  file_train = "src/f5_tts/train/finetune_cli.py"
43
 
44
  device = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"