CjangCjengh / MoeGoe

Executable file for VITS inference
MIT License
2.32k stars 251 forks source link

RuntimeError: Error(s) in loading state_dict for SynthesizerTrn:size mismatch for enc_p.emb.weight: copying a param with shape torch.Size([43, 192]) from checkpoint, the shape in current model is torch.Size([40, 192]). #28

Closed HIBIKl closed 1 year ago

HIBIKl commented 1 year ago

Hi, I used the newest version of vits in your repositories to train my own dataset, and the training process went well. However, when I tried to use MoeGoe to test my own model I encountered this error. I found that the "symbols" in _japanesebase.json has only 40 values, but MoeGoe said it needs 43 values. Maybe the model and code version don't match? If so or not, how can I solve this problem? :(

Anyway, thank you in advance.

HIBIKl commented 1 year ago

Finally I solved this problem by using the japanese_cleaners2 symbols in ./text/symbols.py, and it works well.

QFDG commented 1 year ago

Hi i recently met the same problem.But in diffrence,i have used chinese_cleaner to train my dataset.So your ways to solve the problem seems not valid in my situation. Which way do you think is possible to deal with it? I am looking forward to your reply. Thanks.

HIBIKl commented 1 year ago

Hi i recently met the same problem.But in diffrence,i have used chinese_cleaner to train my dataset.So your ways to solve the problem seems not valid in my situation. Which way do you think is possible to deal with it? I am looking forward to your reply. Thanks.

对于你的问题,要使用训练代码symbols.py中的chinese_cleaners: For your problems, you should check the _chinesecleaners in ./text/symbols.py:

image

把xxx.json中symbols的字符改为chinese_cleaners中的字符,注意要把字符转换为Unicode编码。希望能帮到你。 Then change the characters in symbols in xxx.json to characters in chinese_cleaners, pay attention to convert the characters to Unicode encoding. hope this helps.

QFDG commented 1 year ago

兄弟,爱死你了! 我现在才发现我是chinese cleaners后面三个点忘记去掉了,那时候我还奇怪为什么chinese不变绿,上面的korean绿了,但是因为这个是生成那个数据集的cleaned文件,我看到正常生成后就没在意,以为不是这个原因。然后又去重新配置和设置其他参数去了,唯独没在意这个。我知道导致这个的原因可能很傻逼,但是我没想到这么傻逼。我宣布,我是宇宙无敌究极大傻逼