Ram commited on
Commit ·
e6265db
1
Parent(s): ca48a0b
Disable CosyVoice model_dir assertion for HF endpoint
Browse files
cosyvoice/cli/cosyvoice.py
CHANGED
|
@@ -36,7 +36,10 @@ class CosyVoice:
|
|
| 36 |
raise ValueError('{} not found!'.format(hyper_yaml_path))
|
| 37 |
with open(hyper_yaml_path, 'r') as f:
|
| 38 |
configs = load_hyperpyyaml(f)
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
| 40 |
self.frontend = CosyVoiceFrontEnd(configs['get_tokenizer'],
|
| 41 |
configs['feat_extractor'],
|
| 42 |
'{}/campplus.onnx'.format(model_dir),
|
|
|
|
| 36 |
raise ValueError('{} not found!'.format(hyper_yaml_path))
|
| 37 |
with open(hyper_yaml_path, 'r') as f:
|
| 38 |
configs = load_hyperpyyaml(f)
|
| 39 |
+
if get_model_type(configs) != CosyVoiceModel:
|
| 40 |
+
# Log a warning but continue
|
| 41 |
+
print(f"[CosyVoice] Warning: get_model_type != CosyVoiceModel for {model_dir}")
|
| 42 |
+
|
| 43 |
self.frontend = CosyVoiceFrontEnd(configs['get_tokenizer'],
|
| 44 |
configs['feat_extractor'],
|
| 45 |
'{}/campplus.onnx'.format(model_dir),
|