Spaces:
Runtime error
Runtime error
Update cosyvoice/cli/frontend.py
Browse files
cosyvoice/cli/frontend.py
CHANGED
|
@@ -51,7 +51,7 @@ class CosyVoiceFrontEnd:
|
|
| 51 |
self.campplus_session = onnxruntime.InferenceSession(campplus_model, sess_options=option, providers=["CPUExecutionProvider"])
|
| 52 |
self.speech_tokenizer_session = onnxruntime.InferenceSession(speech_tokenizer_model, sess_options=option, providers=["CUDAExecutionProvider"if torch.cuda.is_available() else "CPUExecutionProvider"])
|
| 53 |
if os.path.exists(spk2info):
|
| 54 |
-
self.spk2info = torch.load(spk2info, map_location=
|
| 55 |
self.instruct = instruct
|
| 56 |
self.allowed_special = allowed_special
|
| 57 |
self.inflect_parser = inflect.engine()
|
|
|
|
| 51 |
self.campplus_session = onnxruntime.InferenceSession(campplus_model, sess_options=option, providers=["CPUExecutionProvider"])
|
| 52 |
self.speech_tokenizer_session = onnxruntime.InferenceSession(speech_tokenizer_model, sess_options=option, providers=["CUDAExecutionProvider"if torch.cuda.is_available() else "CPUExecutionProvider"])
|
| 53 |
if os.path.exists(spk2info):
|
| 54 |
+
self.spk2info = torch.load(spk2info, map_location="cpu")
|
| 55 |
self.instruct = instruct
|
| 56 |
self.allowed_special = allowed_special
|
| 57 |
self.inflect_parser = inflect.engine()
|