Commit 48499d2e1 for llama.cpp
commit 48499d2e1c86c1d5fe7a05f8bf083156e7069cc0
Author: SIDDARTHA REDDY <75976672+SIDDARTHAREDDY8@users.noreply.github.com>
Date: Wed Oct 7 06:57:48 2026 -0400
qwen3tts : guard speaker_encoder_config patch for CustomVoice variant (#29179)
* Fix KeyError converting Qwen3-TTS CustomVoice variant without speaker_encoder_config (fixes #29088)
Signed-off-by: SIDDARTHA REDDY <75976672+SIDDARTHAREDDY8@users.noreply.github.com>
* Address review feedback: drop tests/test-convert-qwen3tts.py
Per reviewer feedback on PR #29179, remove the regression test file.
The fix itself is unchanged.
Signed-off-by: SIDDARTHA REDDY <75976672+SIDDARTHAREDDY8@users.noreply.github.com>
---------
Signed-off-by: SIDDARTHA REDDY <75976672+SIDDARTHAREDDY8@users.noreply.github.com>
diff --git a/conversion/qwen3tts.py b/conversion/qwen3tts.py
index 2c35799f7..cdb1e0c9b 100644
--- a/conversion/qwen3tts.py
+++ b/conversion/qwen3tts.py
@@ -218,8 +218,10 @@ class Qwen3TTSSpeakerEncoderModel(MmprojModel):
if hparams is None:
hparams = ModelBase.load_hparams(dir_model, is_mistral_format=False)
hparams["text_config"] = {"hidden_size": hparams["talker_config"]["hidden_size"]}
- # ECAPA-TDNN has a fixed 4-stage backbone, but MmprojModel.__init__ needs a n_block_keys
- hparams["speaker_encoder_config"]["n_layers"] = 4
+ # ECAPA-TDNN has a fixed 4-stage backbone, but MmprojModel.__init__ needs a n_block_keys.
+ # The CustomVoice variant ships no speaker encoder, so its config lacks this key entirely.
+ if "speaker_encoder_config" in hparams:
+ hparams["speaker_encoder_config"]["n_layers"] = 4
super().__init__(dir_model, *args, hparams=hparams, **kwargs)
self._wav_config_cache = None