ComfyUI Support - IndexTTS-2 processor error: Failed to load IndexTTS-2 model: Error(s) in loading state_dict for UnifiedVoice
Hello, is there any solution for this error?
´´´✅ QwenEmotion model loaded - text emotion support enabled
🔄 IndexTTS-2: Loading GPT model...
❌ IndexTTS-2 processor error: Failed to load IndexTTS-2 model: Error(s) in loading state_dict for UnifiedVoice:
size mismatch for text_embedding.weight: copying a param with shape torch.Size([6001, 1280]) from checkpoint, the shape in current model is torch.Size([12001, 1280]).
size mismatch for text_head.weight: copying a param with shape torch.Size([6001, 1280]) from checkpoint, the shape in current model is torch.Size([12001, 1280]).
size mismatch for text_head.bias: copying a param with shape torch.Size([6001]) from checkpoint, the shape in current model is torch.Size([12001]).
Traceback (most recent call last):
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\utils\models\unified_model_interface.py", line 688, in index_tts_factory
engine = IndexTTS2(
^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\engines\index_tts\indextts\infer_v2.py", line 153, in init
load_checkpoint(self.gpt, self.gpt_path)
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\engines\index_tts\indextts\utils\checkpoint.py", line 28, in load_checkpoint
model.load_state_dict(checkpoint, strict=True)
File "C:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 2624, in load_state_dict
raise RuntimeError(
RuntimeError: Error(s) in loading state_dict for UnifiedVoice:
size mismatch for text_embedding.weight: copying a param with shape torch.Size([6001, 1280]) from checkpoint, the shape in current model is torch.Size([12001, 1280]).
size mismatch for text_head.weight: copying a param with shape torch.Size([6001, 1280]) from checkpoint, the shape in current model is torch.Size([12001, 1280]).
size mismatch for text_head.bias: copying a param with shape torch.Size([6001]) from checkpoint, the shape in current model is torch.Size([12001]).
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\engines\processors\index_tts_processor.py", line 511, in process_text
result = self.pause_processor.generate_audio_with_pauses(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\utils\text\pause_processor.py", line 126, in generate_audio_with_pauses
audio = tts_generate_func(content, **generation_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\engines\processors\index_tts_processor.py", line 507, in tts_generate_with_params
return tts_generate_func(text_content, segment_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\engines\processors\index_tts_processor.py", line 333, in tts_generate_func
segment_result = self.adapter.generate(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\engines\adapters\index_tts_adapter.py", line 278, in generate
audio = self.engine.generate(
^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\engines\index_tts\index_tts.py", line 213, in generate
self._ensure_model_loaded()
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\engines\index_tts\index_tts.py", line 153, in _ensure_model_loaded
self._tts_engine = unified_model_interface.load_model(self._model_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\utils\models\unified_model_interface.py", line 150, in load_model
wrapper = tts_model_manager.load_model(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\utils\models\comfyui_model_wrapper\model_manager.py", line 235, in load_model
model = model_factory_func(config)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ComfyUI_windows_portable\ComfyUI\custom_nodes\tts_audio_suite\utils\models\unified_model_interface.py", line 704, in index_tts_factory
raise RuntimeError(f"Failed to load IndexTTS-2 model: {e}")
RuntimeError: Failed to load IndexTTS-2 model: Error(s) in loading state_dict for UnifiedVoice:
size mismatch for text_embedding.weight: copying a param with shape torch.Size([6001, 1280]) from checkpoint, the shape in current model is torch.Size([12001, 1280]).
size mismatch for text_head.weight: copying a param with shape torch.Size([6001, 1280]) from checkpoint, the shape in current model is torch.Size([12001, 1280]).
size mismatch for text_head.bias: copying a param with shape torch.Size([6001]) from checkpoint, the shape in current model is torch.Size([12001]).
✅ Index_Tts generation complete. Default narrator: narrator
Prompt executed in 13.71 seconds´´´
These are the custom nodes that can load and run IndexTTS-2 directly on ComfyUI: https://github.com/diodiogod/TTS-Audio-Suite
I'm using this version "36000+6000x8x6cycle_steps.pth"