kevinwang676 commited on
Commit
2969413
1 Parent(s): 048f0ae

Update cosyvoice/cli/frontend.py

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