Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模型的张量不一致怎么办 #95

Open
HCl0vo opened this issue Sep 21, 2023 · 4 comments
Open

模型的张量不一致怎么办 #95

HCl0vo opened this issue Sep 21, 2023 · 4 comments

Comments

@HCl0vo
Copy link

HCl0vo commented Sep 21, 2023

(env) ysl@PrimeAI:~/doc/Digital_Life_Server-master$ python SocketServer.py --chatVer 3 --stream False --character paimon --model gpt-3.5-turbo
2023-09-21 11:43:10,596 INFO Initializing Server...
2023-09-21 11:43:10,596 INFO Initializing ASR Service...
2023-09-21 11:43:11,842 INFO Initializing ChatGPT Service...
2023-09-21 11:43:11,842 INFO chatGPT prompt: paimon35.txt
2023-09-21 11:43:11,844 INFO machine identifier: 08:bf:b8:9d:73:06
2023-09-21 11:43:11,882 INFO using custom API proxy, with rate limit.
2023-09-21 11:43:11,996 INFO API Chatbot initialized.
2023-09-21 11:43:11,996 INFO Initializing TTS Service for character_paimon...
2023-09-21 11:43:12,363 ERROR Error(s) in loading state_dict for SynthesizerTrn:
size mismatch for enc_p.emb.weight: copying a param with shape torch.Size([52, 192]) from checkpoint, the shape in current model is torch.Size([178, 192]).
2023-09-21 11:43:12,363 ERROR Traceback (most recent call last):
File "/home/ysl/doc/Digital_Life_Server-master/SocketServer.py", line 198, in
s = Server(args)
File "/home/ysl/doc/Digital_Life_Server-master/SocketServer.py", line 88, in init
self.tts = TTService.TTService(*self.char_name[args.character])
File "/home/ysl/doc/Digital_Life_Server-master/TTS/TTService.py", line 42, in init
_ = utils.load_checkpoint(model, self.net_g, None)
File "/home/ysl/doc/Digital_Life_Server-master/TTS/vits/utils.py", line 40, in load_checkpoint
model.load_state_dict(new_state_dict)
File "/home/ysl/miniconda3/envs/env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2041, 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([52, 192]) from checkpoint, the shape in current model is torch.Size([178, 192]).

Traceback (most recent call last):
File "/home/ysl/doc/Digital_Life_Server-master/SocketServer.py", line 203, in
raise e
File "/home/ysl/doc/Digital_Life_Server-master/SocketServer.py", line 198, in
s = Server(args)
File "/home/ysl/doc/Digital_Life_Server-master/SocketServer.py", line 88, in init
self.tts = TTService.TTService(*self.char_name[args.character])
File "/home/ysl/doc/Digital_Life_Server-master/TTS/TTService.py", line 42, in init
_ = utils.load_checkpoint(model, self.net_g, None)
File "/home/ysl/doc/Digital_Life_Server-master/TTS/vits/utils.py", line 40, in load_checkpoint
model.load_state_dict(new_state_dict)
File "/home/ysl/miniconda3/envs/env/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2041, 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([52, 192]) from checkpoint, the shape in current model is torch.Size([178, 192]).

@sanqiuu
Copy link

sanqiuu commented Oct 14, 2023

我也是这样

@sanqiuu
Copy link

sanqiuu commented Oct 15, 2023

解决了 下载项目时加上 --recursive 参数 才能下载完整项目

@qingxuanlin
Copy link

能讲一下咋解决这个问题吗?我也遇到了这个问题

@sanqiuu
Copy link

sanqiuu commented Oct 16, 2023

能讲一下咋解决这个问题吗?我也遇到了这个问题

重新下载项目 使用这个命令 git clone https://github.com/zixiiu/Digital_Life_Server.git --recursive

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants