#8972 Higgs-audio-v3(Built-in): The size of tensor a (8208) must match the size of tensor b (264) at non-singleton dimension 1

2804**1b01 Posted at: 18 minutes ago

Higgs-audio-v3(Built-in): The size of tensor a (8208) must match the size of tensor b (264) at non-singleton dimension 1,Traceback (most recent call last):
File "/home/odelator/pyvideotrans-main/videotrans/process/higgs_tts.py", line 87, in higgs_fun

wav = model.generate_speech(

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/models/modules/transformers_modules/models_hyphen__hyphen_multimodalart_hyphen__hyphen_higgs_hyphen_audio_hyphen_v3_hyphen_tts_hyphen_4b_hyphen_transformers/1c9dab85523d953d/modeling_higgs_multimodal_qwen3.py", line 352, in generate_speech

out = self.model(inputs_embeds=inputs_embeds, use_cache=True)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl

return self._call_impl(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl

return forward_call(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/transformers/utils/generic.py", line 1040, in wrapper

output = func(self, *args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/transformers/utils/output_capturing.py", line 252, in wrapper

outputs = func(self

......
name': '/tmp/pyvideotrans/12-1795636826.7027428.wav', 'tts_type': 12, 'language': 'pt-br', 'volume': '+0%', 'pitch': '+0Hz'}
Traceback (most recent call last):
File "/home/odelator/pyvideotrans-main/videotrans/util/ListenVoice.py", line 23, in run

tts.run(

File "/home/odelator/pyvideotrans-main/videotrans/tts/__init__.py", line 154, in run

return _cls(**kwargs).run()  # type:ignore

File "/home/odelator/pyvideotrans-main/videotrans/tts/_base.py", line 98, in run

self._exec()

File "/home/odelator/pyvideotrans-main/videotrans/tts/_higgs.py", line 46, in _exec

self._new_process(callback=higgs_fun,title=title,is_cuda=self.is_cuda,kwargs=kwargs)

File "/home/odelator/pyvideotrans-main/videotrans/configure/base.py", line 300, in _new_process

raise VideoTransError(err)

videotrans.configure.excepts.VideoTransError: The size of tensor a (8208) must match the size of tensor b (264) at non-singleton dimension 1,Traceback (most recent call last):
File "/home/odelator/pyvideotrans-main/videotrans/process/higgs_tts.py", line 87, in higgs_fun

wav = model.generate_speech(

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context

return func(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/models/modules/transformers_modules/models_hyphen__hyphen_multimodalart_hyphen__hyphen_higgs_hyphen_audio_hyphen_v3_hyphen_tts_hyphen_4b_hyphen_transformers/1c9dab85523d953d/modeling_higgs_multimodal_qwen3.py", line 352, in generate_speech

out = self.model(inputs_embeds=inputs_embeds, use_cache=True)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl

return self._call_impl(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl

return forward_call(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/transformers/utils/generic.py", line 1040, in wrapper

output = func(self, *args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/transformers/utils/output_capturing.py", line 252, in wrapper

outputs = func(self, *args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/transformers/models/qwen3/modeling_qwen3.py", line 424, in forward

hidden_states = decoder_layer(

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/transformers/modeling_layers.py", line 93, in call

return super().__call__(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl

return self._call_impl(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl

return forward_call(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/accelerate/hooks.py", line 175, in new_forward

output = module._old_forward(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/transformers/models/qwen3/modeling_qwen3.py", line 316, in forward

hidden_states = self.input_layernorm(hidden_states)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl

return self._call_impl(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl

return forward_call(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/accelerate/hooks.py", line 175, in new_forward

output = module._old_forward(*args, **kwargs)

File "/home/odelator/pyvideotrans-main/.venv/lib/python3.10/site-packages/transformers/models/qwen3/modeling_qwen3.py", line 64, in forward

return self.weight * hidden_states.to(input_dtype)

RuntimeError: The size of tensor a (8208) must match the size of tensor b (264) at non-singleton dimension 1


=
system:Linux-7.0.0-28-generic-x86_64-with-glibc2.39
version:v4.19
frozen:False
language:en_US
root_dir:/home/odelator/pyvideotrans-main
Python: 3.10.19 (main, Feb 12 2026, 00:42:18) [Clang 21.1.4 ]

1 Replies

#1 DeepSeek reply at 18 minutes ago

This is not a configuration problem: the failure happens inside the Higgs-audio-v3 model's own inference code. In the bundled custom modeling file, the hidden-state width (8208) does not match the layer's weight width (264), which means that the model weights and the modeling code that is being loaded do not belong to the same or a complete version. More specifically, this is very likely a partial or corrupted model download, or a stale cached copy of transformers_modules, and it is not an out-of-VRAM issue.

Steps:

  1. Close the software completely.
  2. Delete the folder models/models--multimodalart--higgs-audio-v3-tts-4b-transformers; also delete the cached custom code folder models/modules/transformers_modules/models_hyphen__hyphen_multimodalart_hyphen__hyphen_higgs_hyphen_audio_hyphen_v3_hyphen_tts_hyphen_4b_hyphen_transformers (the one referenced in your traceback).
  3. Restart the software so that the model and the modeling code are downloaded again from scratch (or download all files manually from https://huggingface.co/multimodalart/higgs-audio-v3-tts-4b-transformers/tree/main into models/models--multimodalart--higgs-audio-v3-tts-4b-transformers, keeping the original file names and folder layout exactly).
  4. Try dubbing a single short line again. If the same tensor-size error is reported again, then the model script and the weights in this channel are incompatible in your environment; switch to another TTS channel (Edge-TTS, Qwen3-TTS, ChatterBox, etc.) and report the issue with your log.
  5. If you need this analyzed further, provide the last ~30 lines of the newest file in the logs/ folder of the software directory, plus confirmation of whether the model re-download in step 3 completed without interruption.

Please refer to the related documentation:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Related resource