Torch.size mismatch in encoder and decoder. using pretrained model.
利用的是@miven的预训练模型
报错信息如下: RuntimeError: Error(s) in loading state_dict for Tacotron: 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])
还有就是,我是小白,想问下tag 0.0.1去哪找啊...不是太懂这个tag 0.0.1是什么意思。
https://user-images.githubusercontent.com/42199191/156316338-56e63a74-c8a4-4421-a18a-cfe961d2c407.png)
https://user-images.githubusercontent.com/42199191/156316338-56e63a74-c8a4-4421-a18a-cfe961d2c407.png)
It does not work. Same error still be there
really? you can try this: https://github.com/babysor/MockingBird/tags
really? you can try this: https://github.com/babysor/MockingBird/tags
It seems it will work if uncomment "characters =...1240..." as the replacement in the synthesizer/utils/symbols.py for the model from @FawenYo
and more over the accent is decoded to Taiwan Mandarin
same for @miven model , this model spec is blur, quality is not good
sorrry,Your description is not clear. Did you encounter any mistakes?
I guess you're new.This may have been put forward before. You can refer to https://github.com/babysor/MockingBird/issues/37
I guess you're new.This may have been put forward before. You can refer to #37
Well, I have the same problem, even after I've done what are stated in that issue to solve that problem. And the problem in issue #37 is not the same problem as this.
let me state how I've run this program. I'm running it with docker on Win11.
First, I downloaded all of the codes and saved into the defalt download folder, then I opened up a terminal under that direction.
Second, I did some changes in Dockerfile. I changed images of apt to mirrors.ustc.edu.cn and images of pip to pypi.tuna.tsinghua.edu.cn due to the slow downloading speed in China. Then I deleted the line COPY ./requirements.txt /workspace/requirements.txt and moved the line COPY . /workspace up into this direction, as this may eliminate one layer of docker image, because the file requirements.txt will be copied if the whole program is copied into the docker image, right? So this is just some normal changes that didn't change the program itself, right?
Now this is my content of Dockerfile.
`
FROM pytorch/pytorch:latest
ARG DEBIAN_FRONTEND=noninteractive USER root
RUN mv /etc/apt/sources.list /etc/apt/sources_backup.list &&
echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal main restricted " >> /etc/apt/sources.list &&
echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted " >> /etc/apt/sources.list &&
echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal universe " >> /etc/apt/sources.list &&
echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-updates universe " >> /etc/apt/sources.list &&
echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal multiverse " >> /etc/apt/sources.list &&
echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-updates multiverse " >> /etc/apt/sources.list &&
echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse " >> /etc/apt/sources.list &&
echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted " >> /etc/apt/sources.list &&
echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-security universe " >> /etc/apt/sources.list &&
echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-security multiverse " >> /etc/apt/sources.list &&
echo "deb http://archive.canonical.com/ubuntu focal partner " >> /etc/apt/sources.list &&
apt-get update && apt-get install -y build-essential ffmpeg parallel aria2 && apt-get clean
COPY . /workspace
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple &&
pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn &&
pip install -r requirements.txt && pip install webrtcvad-wheels
VOLUME [ "/datasets", "/workspace/synthesizer/saved_models/" ]
ENV DATASET_MIRROR=default FORCE_RETRAIN=false TRAIN_DATASETS=aidatatang_200zh\ magicdata\ aishell3\ data_aishell TRAIN_SKIP_EXISTING=true
EXPOSE 8080
ENTRYPOINT [ "/workspace/docker-entrypoint.sh" ] `
Third, as my computer is not with a GPU, so I DELETED the block
deploy: resources: reservations: devices: - driver: nvidia device_ids: [ '0' ] capabilities: [ gpu ]
in docker-compose.yml.
Nothing special, right? and if I didn't do so, there will be some error, which says:
Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy' nvidia-container-cli: initialization error: WSL environment detected but no adapters were found: unknown
Fourth, I downloaded the pretrained synthesizer of @FawenYo, who have posted his model on Googledrive and teknik.io, and copied both of them to synthesizer\saved_models as told in the totorial in wiki. Then, I made some changes just as told in issue #37: I added a hashtag in the front of line 11 and deleted the hashtag in the front of line 13.
Finally, I just ran the command docker compose up -d in the terminal that I've opened under the folder of the program that I've downloaded directly in github.
And the program just ran without error as expected.
NOTHING STATED ABOVE DOES NOT REALLY MATTERS, BECAUSE I BELIEVE THAT I HAVE DONE NOTHING WRONG!
OK, now that I've pulled up the docker container and ran the program successfully, which means I can access this program with my browser by visit localhost:8080 and successfully see the webpage, I just click the synthesize button and
The problem occured just the same as what this issue states.
I guess you're new.This may have been put forward before. You can refer to #37
Well, I have the same problem, even after I've done what are stated in that issue to solve that problem. And the problem in issue #37 is not the same problem as this.
let me state how I've run this program. I'm running it with docker on Win11.
First, I downloaded all of the codes and saved into the defalt download folder, then I opened up a terminal under that direction.
Second, I did some changes in
Dockerfile. I changed images ofapttomirrors.ustc.edu.cnand images ofpiptopypi.tuna.tsinghua.edu.cndue to the slow downloading speed in China. Then I deleted the lineCOPY ./requirements.txt /workspace/requirements.txtand moved the lineCOPY . /workspaceup into this direction, as this may eliminate one layer of docker image, because the filerequirements.txtwill be copied if the whole program is copied into the docker image, right? So this is just some normal changes that didn't change the program itself, right? Now this is my content ofDockerfile. ` FROM pytorch/pytorch:latestARG DEBIAN_FRONTEND=noninteractive USER root
RUN mv /etc/apt/sources.list /etc/apt/sources_backup.list && echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal main restricted " >> /etc/apt/sources.list && echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted " >> /etc/apt/sources.list && echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal universe " >> /etc/apt/sources.list && echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-updates universe " >> /etc/apt/sources.list && echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal multiverse " >> /etc/apt/sources.list && echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-updates multiverse " >> /etc/apt/sources.list && echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse " >> /etc/apt/sources.list && echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted " >> /etc/apt/sources.list && echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-security universe " >> /etc/apt/sources.list && echo "deb http://mirrors.ustc.edu.cn/ubuntu/ focal-security multiverse " >> /etc/apt/sources.list && echo "deb http://archive.canonical.com/ubuntu focal partner " >> /etc/apt/sources.list && apt-get update && apt-get install -y build-essential ffmpeg parallel aria2 && apt-get clean
COPY . /workspace
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn && pip install -r requirements.txt && pip install webrtcvad-wheels
VOLUME [ "/datasets", "/workspace/synthesizer/saved_models/" ]
ENV DATASET_MIRROR=default FORCE_RETRAIN=false TRAIN_DATASETS=aidatatang_200zh\ magicdata\ aishell3\ data_aishell TRAIN_SKIP_EXISTING=true
EXPOSE 8080
ENTRYPOINT [ "/workspace/docker-entrypoint.sh" ] `
Third, as my computer is not with a GPU, so I DELETED the block
deploy: resources: reservations: devices: - driver: nvidia device_ids: [ '0' ] capabilities: [ gpu ]indocker-compose.yml. Nothing special, right? and if I didn't do so, there will be some error, which says:Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy' nvidia-container-cli: initialization error: WSL environment detected but no adapters were found: unknownFourth, I downloaded the pretrained synthesizer of @FawenYo, who have posted his model on Googledrive and teknik.io, and copied both of them to
synthesizer\saved_modelsas told in the totorial in wiki. Then, I made some changes just as told in issue #37: I added a hashtag in the front ofline 11and deleted the hashtag in the front ofline 13.Finally, I just ran the command
docker compose up -din the terminal that I've opened under the folder of the program that I've downloaded directly in github.And the program just ran without error as expected.
NOTHING STATED ABOVE DOES NOT REALLY MATTERS, BECAUSE I BELIEVE THAT I HAVE DONE NOTHING WRONG! OK, now that I've pulled up the docker container and ran the program successfully, which means I can access this program with my browser by visit
localhost:8080and successfully see the webpage, I just click thesynthesizebutton and The problem occured just the same as what this issue states.
OK, problem solved. please refer this solution https://github.com/babysor/MockingBird/issues/360#issue-1114156389, and my solution uphere, do remember to DOWNLOAD ALL OF THE PRETRAINED MODELS in the table in the description below the source code page, ESPECIALLY the model of @miven, and copy them all DIRECTLY INTO the program directory.