MeloTTS icon indicating copy to clipboard operation
MeloTTS copied to clipboard

When infer the local model, RuntimeError: Error(s) in loading state_dict for SynthesizerTrn

Open SRbone opened this issue 10 months ago • 2 comments

model = TTS(language='ZH_MIX_EN', device='cpu') File "D:\melo\api.py", line 60, in init self.model.load_state_dict(checkpoint_dict['model'], strict=True) File "C:\Users\lib\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 emb_g.weight: copying a param with shape torch.Size([256, 256]) from checkpoint, the shape in current model is torch.Size([1, 256]).

SRbone avatar Apr 22 '24 10:04 SRbone

I have also met the question when conduct "python infer.py"

UltramanSleepless avatar Jul 11 '24 08:07 UltramanSleepless

so, what can i do to solve the problem

UltramanSleepless avatar Jul 11 '24 08:07 UltramanSleepless