错误详情: File "/mnt/data/RAG_LX/ChatTTS/ChatTTS/core.py", line 105, in _load assert os.path.exists(spk_stat_path), f'Missing spk_stat.pt: {spk_stat_path}' AssertionError: Missing spk_stat.pt: /mnt/data/RAG_LX/models/chatTTS/asset/spk_stat.pt 魔塔社区权重文件中没有asset/spk_stat.pt这个pt文件啊 没明白core.py文件为什么有: if gpt_config_path: cfg = OmegaConf.load(gpt_config_path) gpt = GPT_warpper(**cfg).to(device).eval() assert gpt_ckpt_path, 'gpt_ckpt_path should not be None' gpt.load_state_dict(torch.load(gpt_ckpt_path, map_location='cpu')) if compile: gpt.gpt.forward = torch.compile(gpt.gpt.forward, backend='inductor', dynamic=True) self.pretrain_models['gpt'] = gpt spk_stat_path = os.path.join(os.path.dirname(gpt_ckpt_path), 'spk_stat.pt') assert os.path.exists(spk_stat_path), f'Missing spk_stat.pt: {spk_stat_path}' self.pretrain_models['spk_stat'] = torch.load(spk_stat_path).to(device) self.logger.log(logging.INFO, 'gpt loaded.') 是权重文件名和代码函数者写错了吗
Q
[2noise/ChatTTS]加载权重文件报错:AssertionError
3
A
回答
8
huggingface上更新了,modelscope是群友在维护可能没update
4
这有办法可以解决吗
6
readme上已经写明了:
源码部署启动后,会先从 modelscope下载模型,但modelscope缺少spk_stat.pt,会报错,请点击链接 https://huggingface.co/2Noise/ChatTTS/blob/main/asset/spk_stat.pt 下载 spk_stat.pt,将该文件复制到 项目目录/models/pzc163/chatTTS/asset/ 文件夹内