fish-speech
fish-speech copied to clipboard
[BUG]不管是选择cpu还是gpu加载模型的时候报错
Feel free to ask any kind of questions in the issues page, but please use English since other users may find your questions valuable.
Describe the bug
看代码里没有对设置分支进行判断,而直接执行torch.cuda.synchronize()
,导致没有cuda显卡的电脑报错
# api_server.py 第86行
self.model_size = sum(
p.numel() for p in self.model.parameters() if p.requires_grad
)
torch.cuda.synchronize()
logger.info(f"Time to load model: {time.time() - self.t0:.02f} seconds")
Expected behavior 可以支持CPU推理