[2noise/ChatTTS]加载权重文件报错:AssertionError

2024-06-12 446 views
9

错误详情: 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.') 是权重文件名和代码函数者写错了吗

回答

8

huggingface上更新了,modelscope是群友在维护可能没update

1

这有办法可以解决吗