aluminumbox commited on
Commit
f2399c0
·
verified ·
1 Parent(s): d9ae5a5

Update cosyvoice/cli/model.py

Browse files
Files changed (1) hide show
  1. cosyvoice/cli/model.py +1 -0
cosyvoice/cli/model.py CHANGED
@@ -62,6 +62,7 @@ class CosyVoiceModel:
62
  self.hift_cache_dict = {}
63
 
64
  def load(self, llm_model, flow_model, hift_model):
 
65
  self.llm.load_state_dict(torch.load(llm_model, map_location=self.device), strict=True)
66
  self.llm.to(self.device).eval()
67
  self.flow.load_state_dict(torch.load(flow_model, map_location=self.device), strict=True)
 
62
  self.hift_cache_dict = {}
63
 
64
  def load(self, llm_model, flow_model, hift_model):
65
+ self.device = 'cuda'
66
  self.llm.load_state_dict(torch.load(llm_model, map_location=self.device), strict=True)
67
  self.llm.to(self.device).eval()
68
  self.flow.load_state_dict(torch.load(flow_model, map_location=self.device), strict=True)