kevinwang676 commited on
Commit
0314c66
·
verified ·
1 Parent(s): 7d71fca

Update cosyvoice/cli/frontend.py

Browse files
Files changed (1) hide show
  1. cosyvoice/cli/frontend.py +1 -1
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=self.device)
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()