[babysor/MockingBird]web端无法正常合成

2024-07-16 533 views
0

Summary[问题简述(一句话)] web端无法正常合成

Env & To Reproduce[复现与环境] Linux **** SMP Tue Jun 1 16:14:33 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux 版本:commit 3fe0690cc6c3b88a77c6036ac09a1fbbedeac3f9 模型:ceshi.pf

错误信息 [2022-03-14 15:07:39,920] ERROR in app: Exception on /api/synthesize [POST] Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1518, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python3.9/site-packages/flask_restx/api.py", line 672, in error_router return original_handler(e) File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.9/site-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/root/RemoteWorking/web/init.py", line 108, in synthesize specs = current_synt.synthesize_spectrograms(texts, embeds) File "/root/RemoteWorking/synthesizer/inference.py", line 93, in synthesize_spectrograms self.load() File "/root/RemoteWorking/synthesizer/inference.py", line 71, in load self._model.load(self.model_fpath, self.device) File "/root/RemoteWorking/synthesizer/models/tacotron.py", line 547, in load self.load_state_dict(checkpoint["model_state"], strict=False) File "/usr/local/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1497, 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([70, 512]) from checkpoint, the shape in current model is torch.Size([75, 512]). 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]).

回答

3

切换到 tag0.0.1分支。

1

切换后,时而正常,时而异常,错误如下: RuntimeError: Error(s) in loading state_dict for Tacotron: size mismatch for encoder.embedding.weight: copying a param with shape torch.Size([70, 512]) from checkpoint, the shape in current model is torch.Size([75, 512]).

9
37
7

切换到tag0.0.1版本 并按照说明修改ynthesizer/utils/symbols.py第11行代码后,启动web.py又无法访问了,这是为什么呢?