Spaces:
Running
on
Zero
Running
on
Zero
Update cosyvoice/cli/model.py
Browse files- 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)
|