File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,14 @@ def load(
100100 # instruct = True if "-Instruct" in str(model_dir) else False
101101 instruct = True
102102
103- with open (model_dir / "cosyvoice.yaml" , "r" ) as f :
103+ # 具体看 #268 ,因为 cosyvoice 改动配置文件名,所以兼容两种情况
104+ configure_path_1 = model_dir / "cosyvoice.yaml"
105+ configure_path_2 = model_dir / "cosyvoice2.yaml"
106+ configure_path = (
107+ configure_path_1 if configure_path_1 .exists () else configure_path_2
108+ )
109+
110+ with open (configure_path , "r" ) as f :
104111 configs = load_hyperpyyaml (f , overrides = self .hp_overrides )
105112
106113 frontend = CosyVoiceFrontEnd (
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ def __init__(self):
1010 required_files = [
1111 "campplus.onnx" ,
1212 "configuration.json" ,
13- "cosyvoice .yaml" ,
13+ "cosyvoice2 .yaml" ,
1414 "flow.pt" ,
1515 "hift.pt" ,
1616 "llm.pt" ,
You can’t perform that action at this time.
0 commit comments