Plachtaa / VITS-fast-fine-tuning

This repo is a pipeline of VITS finetuning for fast speaker adaptation TTS, and many-to-many voice conversion

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

纯中文模型如何转换成onnx格式

lizuobin opened this issue · comments

尝试使用aishell3的onnx转换脚本,报错如下:
warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
Traceback (most recent call last):
File "/media/nvme500/work/sda/models/pytorch/vits_chinese/export_onnx_aishell3.py", line 147, in
main()
File "/home/lzb/.local/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/media/nvme500/work/sda/models/pytorch/vits_chinese/export_onnx_aishell3.py", line 85, in main
_ = utils.load_checkpoint(checkpoint, net_g, None)
File "/media/nvme500/work/sda/models/pytorch/vits_chinese/utils.py", line 40, in load_checkpoint
model.load_state_dict(new_state_dict)
File "/home/lzb/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2152, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for SynthesizerTrn:
size mismatch for enc_p.emb.weight: copying a param with shape torch.Size([50, 192]) from checkpoint, the shape in current model is torch.Size([219, 192]).
有没有大佬指点一下,该如何转换?

可以使用sherpa-onnx