模型的张量不一致怎么办
HCl0vo opened this issue · comments
(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]).
我也是这样
解决了 下载项目时加上 --recursive 参数 才能下载完整项目
能讲一下咋解决这个问题吗?我也遇到了这个问题
能讲一下咋解决这个问题吗?我也遇到了这个问题
重新下载项目 使用这个命令 git clone https://github.com/zixiiu/Digital_Life_Server.git --recursive