babysor / MockingBird

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Synthesize and vocode时报错RuntimeError

Rundll86 opened this issue · comments

Summary[问题简述(一句话)]
使用Synthesize and vocode时控制台报错

Traceback (most recent call last):
  File "D:\Project\MockingBird-main\control\toolbox\__init__.py", line 144, in <lambda>
    func = lambda: self.synthesize() or self.vocode()
  File "D:\Project\MockingBird-main\control\toolbox\__init__.py", line 260, 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 "D:\Project\MockingBird-main\models\synthesizer\inference.py", line 91, in synthesize_spectrograms
    self.load()
  File "D:\Project\MockingBird-main\models\synthesizer\inference.py", line 69, in load
    self._model.load(self.model_fpath, self.device)
  File "D:\Project\MockingBird-main\models\synthesizer\models\base.py", line 55, in load
    self.load_state_dict(state, strict=False)
  File "C:\Users\dwx19\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 2153, 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 encoder_proj.weight: copying a param with shape torch.Size([128, 512]) from checkpoint, the shape in current model is torch.Size([128, 1024]).
        size mismatch for decoder.attn_rnn.weight_ih: copying a param with shape torch.Size([384, 768]) from checkpoint, the shape in current model is torch.Size([384, 1280]).
        size mismatch for decoder.rnn_input.weight: copying a param with shape torch.Size([1024, 640]) from checkpoint, the shape in current model is torch.Size([1024, 1152]).
        size mismatch for decoder.stop_proj.weight: copying a param with shape torch.Size([1, 1536]) from checkpoint, the shape in current model is torch.Size([1, 2048]).

Env & To Reproduce[复现与环境]
Windows11,12核i5-12400F,rtx3050,python3.10.11,非conda,用的是my_run8_25k.pt
ffmpeg与pytorch安装均正常

pip install requirements.txt
pip install webrtcvad-wheels

demo_toolbox.py与web.py报错均是如此