Spaces:
Running
on
Zero
Running
on
Zero
add cpuruntime in provider
Browse files
cosyvoice/cli/frontend.py
CHANGED
@@ -42,7 +42,7 @@ class CosyVoiceFrontEnd:
|
|
42 |
option.graph_optimization_level = onnxruntime.GraphOptimizationLevel.ORT_ENABLE_ALL
|
43 |
option.intra_op_num_threads = 1
|
44 |
self.campplus_session = onnxruntime.InferenceSession(campplus_model, sess_options=option, providers=["CPUExecutionProvider"])
|
45 |
-
self.speech_tokenizer_session = onnxruntime.InferenceSession(speech_tokenizer_model, sess_options=option, providers=["CUDAExecutionProvider"])
|
46 |
if os.path.exists(spk2info):
|
47 |
self.spk2info = torch.load(spk2info, map_location=self.device)
|
48 |
self.instruct = instruct
|
|
|
42 |
option.graph_optimization_level = onnxruntime.GraphOptimizationLevel.ORT_ENABLE_ALL
|
43 |
option.intra_op_num_threads = 1
|
44 |
self.campplus_session = onnxruntime.InferenceSession(campplus_model, sess_options=option, providers=["CPUExecutionProvider"])
|
45 |
+
self.speech_tokenizer_session = onnxruntime.InferenceSession(speech_tokenizer_model, sess_options=option, providers=["CUDAExecutionProvider", "CPUExecutionProvider"])
|
46 |
if os.path.exists(spk2info):
|
47 |
self.spk2info = torch.load(spk2info, map_location=self.device)
|
48 |
self.instruct = instruct
|