Skip to content

qwen3tts : guard speaker_encoder_config patch for CustomVoice variant - #29179

Merged
CISC merged 2 commits into
ggml-org:masterfrom
SIDDARTHAREDDY8:bhai-blitz2-9-llamacpp-1
Oct 7, 2026
Merged

CISC merged 2 commits into
ggml-org:masterfrom
SIDDARTHAREDDY8:bhai-blitz2-9-llamacpp-1

Conversation

@SIDDARTHAREDDY8

@SIDDARTHAREDDY8 SIDDARTHAREDDY8 commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Overview

convert_hf_to_gguf.py --mmproj crashed with KeyError: 'speaker_encoder_config' when converting the Qwen3-TTS CustomVoice variant. That variant ships no speaker encoder, so its config has no speaker_encoder_config key, but Qwen3TTSSpeakerEncoderModel.__init__ unconditionally patched hparams["speaker_encoder_config"]["n_layers"] = 4. The patch is now applied only when the key exists. Behavior for the Base variant is unchanged.

Fixes #29088.

Additional information

The regression test file (tests/test-convert-qwen3tts.py) was removed from this PR per reviewer feedback. Before removal it verified:

On the unfixed code it reproduces the exact failure from the issue:

KeyError: 'speaker_encoder_config'

With the fix, both cases pass:

PASS: CustomVoice variant (no speaker_encoder_config) converts
PASS: Base variant still gets the n_layers = 4 patch
All regression tests passed

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES - an AI coding assistant drafted the fix and the regression test under my direction. I reviewed every line, ran the test myself, and take full responsibility for the change.

@github-actions github-actions Bot added testing Everything test related conversion labels Sep 20, 2026
Comment thread tests/test-convert-qwen3tts.py Resolved
@CISC
CISC requested a review from ngxson September 20, 2026 19:07
Per reviewer feedback on PR ggml-org#29179, remove the regression test file.
The fix itself is unchanged.

Signed-off-by: SIDDARTHA REDDY <[email protected]>
@SIDDARTHAREDDY8

Copy link
Copy Markdown
Contributor Author

@CISC — following up on your review; I've replied above. Anything further you'd like changed?

@CISC

CISC commented Oct 6, 2026

Copy link
Copy Markdown
Member

@CISC — following up on your review; I've replied above. Anything further you'd like changed?

I would just like @ngxson to verify that this is ok.

@CISC
CISC merged commit 48499d2 into ggml-org:master Oct 7, 2026
5 checks passed
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 8, 2026
…ggml-org#29179)

* Fix KeyError converting Qwen3-TTS CustomVoice variant without speaker_encoder_config (fixes ggml-org#29088)

Signed-off-by: SIDDARTHA REDDY <[email protected]>

* Address review feedback: drop tests/test-convert-qwen3tts.py

Per reviewer feedback on PR ggml-org#29179, remove the regression test file.
The fix itself is unchanged.

Signed-off-by: SIDDARTHA REDDY <[email protected]>

---------

Signed-off-by: SIDDARTHA REDDY <[email protected]>
(cherry picked from commit 48499d2)
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 24, 2026
…ggml-org#29179)

* Fix KeyError converting Qwen3-TTS CustomVoice variant without speaker_encoder_config (fixes ggml-org#29088)

Signed-off-by: SIDDARTHA REDDY <[email protected]>

* Address review feedback: drop tests/test-convert-qwen3tts.py

Per reviewer feedback on PR ggml-org#29179, remove the regression test file.
The fix itself is unchanged.

Signed-off-by: SIDDARTHA REDDY <[email protected]>

---------

Signed-off-by: SIDDARTHA REDDY <[email protected]>
auRose94 pushed a commit to auRose94/llama.cpp that referenced this pull request Oct 28, 2026
…ggml-org#29179)

* Fix KeyError converting Qwen3-TTS CustomVoice variant without speaker_encoder_config (fixes ggml-org#29088)

Signed-off-by: SIDDARTHA REDDY <[email protected]>

* Address review feedback: drop tests/test-convert-qwen3tts.py

Per reviewer feedback on PR ggml-org#29179, remove the regression test file.
The fix itself is unchanged.

Signed-off-by: SIDDARTHA REDDY <[email protected]>

---------

Signed-off-by: SIDDARTHA REDDY <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conversion testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc. bug: [convert_hf_to_gguf] KeyError: 'speaker_encoder_config' when converting Qwen3-TTS CustomVoice variant

3 participants