babysor / MockingBird

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

Model shape mismatch #948

Closed firstprayer closed 10 months ago

firstprayer commented 10 months ago

Summary[问题简述(一句话)] 用Pretrain模型(https://yisiou-my.sharepoint.com/:u:/g/personal/lawrence_cheng_fawenyo_onmicrosoft_com/EWFWDHzee-NNg9TWdKckCc4BC7bK2j9cCbOWn0-_tK0nOg?e=n0gGgC),加载模型的时候出现shape mismatch

Env & To Reproduce[复现与环境] 模型链接如上 在Mac M1 Pro,环境Python3.9

Screenshots[截图(如有)]

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]).

这已经是按照https://github.com/babysor/MockingBird/issues/37 修复过一轮了,否则还要再多一个类似的error。

firstprayer commented 10 months ago

Resolved after using the latest retrained model