Describe the bug
PS F:\AI\Bert-VITS\TTS\recipes\ljspeech\xtts_v2> Python .\train_gpt_xtts.py
Traceback (most recent call last):
File "F:\AI\Bert-VITS\TTS\recipes\ljspeech\xtts_v2\train_gpt_xtts.py", line 176, in
main()
File "F:\AI\Bert-VITS\TTS\recipes\ljspeech\xtts_v2\train_gpt_xtts.py", line 148, in main
model = GPTTrainer.init_from_config(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tianj\AppData\Local\Programs\Python\Python311\Lib\site-packages\TTS\tts\layers\xtts\trainer\gpt_trainer.py", line 500, in init_from_config
return GPTTrainer(config)
^^^^^^^^^^^^^^^^^^
File "C:\Users\tianj\AppData\Local\Programs\Python\Python311\Lib\site-packages\TTS\tts\layers\xtts\trainer\gpt_trainer.py", line 84, in init
self.load_checkpoint(self.config, self.args.xtts_checkpoint, eval=False, strict=False)
File "C:\Users\tianj\AppData\Local\Programs\Python\Python311\Lib\site-packages\TTS\tts\layers\xtts\trainer\gpt_trainer.py", line 484, in load_checkpoint
self.xtts.load_state_dict(state, strict=strict)
File "C:\Users\tianj\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 2152, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Xtts:
size mismatch for gpt.text_embedding.weight: copying a param with shape torch.Size([6681, 1024]) from checkpoint, the shape in current model is torch.Size([6153, 1024]).
size mismatch for gpt.text_head.weight: copying a param with shape torch.Size([6681, 1024]) from checkpoint, the shape in current model is torch.Size([6153, 1024]).
size mismatch for gpt.text_head.bias: copying a param with shape torch.Size([6681]) from checkpoint, the shape in current model is torch.Size([6153]).
To Reproduce
PS F:\AI\Bert-VITS\TTS\recipes\ljspeech\xtts_v2> Python .\train_gpt_xtts.py
Traceback (most recent call last):
File "F:\AI\Bert-VITS\TTS\recipes\ljspeech\xtts_v2\train_gpt_xtts.py", line 176, in
main()
File "F:\AI\Bert-VITS\TTS\recipes\ljspeech\xtts_v2\train_gpt_xtts.py", line 148, in main
model = GPTTrainer.init_from_config(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\tianj\AppData\Local\Programs\Python\Python311\Lib\site-packages\TTS\tts\layers\xtts\trainer\gpt_trainer.py", line 500, in init_from_config
return GPTTrainer(config)
^^^^^^^^^^^^^^^^^^
File "C:\Users\tianj\AppData\Local\Programs\Python\Python311\Lib\site-packages\TTS\tts\layers\xtts\trainer\gpt_trainer.py", line 84, in init
self.load_checkpoint(self.config, self.args.xtts_checkpoint, eval=False, strict=False)
File "C:\Users\tianj\AppData\Local\Programs\Python\Python311\Lib\site-packages\TTS\tts\layers\xtts\trainer\gpt_trainer.py", line 484, in load_checkpoint
self.xtts.load_state_dict(state, strict=strict)
File "C:\Users\tianj\AppData\Local\Programs\Python\Python311\Lib\site-packages\torch\nn\modules\module.py", line 2152, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Xtts:
size mismatch for gpt.text_embedding.weight: copying a param with shape torch.Size([6681, 1024]) from checkpoint, the shape in current model is torch.Size([6153, 1024]).
size mismatch for gpt.text_head.weight: copying a param with shape torch.Size([6681, 1024]) from checkpoint, the shape in current model is torch.Size([6153, 1024]).
size mismatch for gpt.text_head.bias: copying a param with shape torch.Size([6681]) from checkpoint, the shape in current model is torch.Size([6153]).
Expected behavior
No response
Logs
No response
Environment
PS F:\AI\Bert-VITS\TTS\TTS\bin> python collect_env_info.py
{
"CUDA": {
"GPU": [
"NVIDIA GeForce RTX 2070 SUPER"
],
"available": true,
"version": "12.1"
},
"Packages": {
"PyTorch_debug": false,
"PyTorch_version": "2.1.1+cu121",
"TTS": "0.21.3",
"numpy": "1.24.3"
},
"System": {
"OS": "Windows",
"architecture": [
"64bit",
"WindowsPE"
],
"processor": "Intel64 Family 6 Model 165 Stepping 5, GenuineIntel",
"python": "3.11.7",
"version": "10.0.22631"
}
}
Additional context
No response