babysor / MockingBird

🚀AI拟声: 5秒内克隆您的声音并生成任意语音内容 Clone a voice in 5 seconds to generate arbitrary speech in real-time
Other
35.43k stars 5.21k forks source link

有的时候点击合成,就出现报错 #223

Closed huankong233 closed 1 year ago

huankong233 commented 3 years ago

报错内容: Loaded encoder "pretrained.pt" trained to step 1594501 Synthesizer using device: cuda Trainable Parameters: 32.869M Traceback (most recent call last): File "C:\德丽莎\toolbox__init.py", line 123, in func = lambda: self.synthesize() or self.vocode() File "C:\德丽莎\toolbox\init__.py", line 238, in synthesize specs = self.synthesizer.synthesize_spectrograms(texts, embeds, style_idx=int(self.ui.style_slider.value()), min_stop_token=min_token, steps=int(self.ui.length_slider.value())*200) File "C:\德丽莎\synthesizer\inference.py", line 87, in synthesize_spectrograms self.load() File "C:\德丽莎\synthesizer\inference.py", line 65, in load self._model.load(self.model_fpath) File "C:\德丽莎\synthesizer\models\tacotron.py", line 547, in load self.load_state_dict(checkpoint["model_state"], strict=False) File "D:\anaconda3\envs\Theresa\lib\site-packages\torch\nn\modules\module.py", line 1482, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for Tacotron: size mismatch for gst.stl.attention.W_query.weight: copying a param with shape torch.Size([512, 256]) from checkpoint, the shape in current model is torch.Size([512, 512]).

huankong233 commented 3 years ago

然后重新生成就又可以用了

babysor commented 3 years ago

有兼容错误,最新的代码分支吗?

huankong233 commented 3 years ago

是的

babysor commented 3 years ago

用的哪个模型?

huankong233 commented 3 years ago

https://www.bilibili.com/video/BV1DL4y1q7VL 这个视频里给的

babysor commented 3 years ago

https://www.bilibili.com/video/BV1DL4y1q7VL 这个视频里给的

第三方模型嘛。。可能训练的时候用的旧代码,要切换一下