babysor / babysor/MockingBird

新人刚学,用的社区模型一直出来的是杂音,还会经常有以下报错,求大佬解决

Open
#820 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
36.9k
Forks
5.2k
PR merge metrics
No merged PRs in 30d

Description

Building hifigan
Loading 'vocoder\saved_models\pretrained\g_hifigan.pt'
Complete.
Removing weight norm...
Synthesizer using device: cuda
Trainable Parameters: 0.000M
Traceback (most recent call last):
File "Z:\MockingBird-main\MockingBird-main\toolbox\__init__.py", line 143, in
func = lambda: self.synthesize() or self.vocode()
File "Z:\MockingBird-main\MockingBird-main\toolbox\__init__.py", line 259, 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 "Z:\MockingBird-main\MockingBird-main\synthesizer\inference.py", line 93, in synthesize_spectrograms
self.load()
File "Z:\MockingBird-main\MockingBird-main\synthesizer\inference.py", line 71, in load
self._model.load(self.model_fpath, self.device)
File "Z:\MockingBird-main\MockingBird-main\synthesizer\models\base.py", line 51, in load
self.load_state_dict(checkpoint["model_state"], strict=False)
File "C:\ProgramData\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1482, 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.embedding.weight: copying a param with shape torch.Size([75, 512]) from checkpoint, the shape in current model is torch.Size([70, 512]).
size mismatch for gst.stl.attention.W_query.weight: copying a param with shape torch.Size([512, 256]) from checkpoint, the shape in current model is torch.Size([512, 512]).

模型用的是:
![ccb4e6ba33e40436d42ef99c4c6774a](https://user-images.githubusercontent.com/124339534/216531904-0f590ec8-e87a-4ea9-90c2-454ef7e90a23.png)

![5be6e36b8de89ea6484a60c320f7ebe](https://user-images.githubusercontent.com/124339534/216532040-65b78bd6-9c6a-402c-8eb7-9ad9175c8f84.png)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with synthesizer/inference.py and synthesizer/models/base.py, then trace the call from toolbox/__init__.py. Reproduce the load failure and compare the checkpoint dimensions shown in the traceback with the current Tacotron and GST configuration. Done means the selected community model loads successfully and synthesis no longer produces the reported errors or persistent noise.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.