A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 10, 16:30 UTC
[Bugfix]: avoid overriding audio/text kwargs (Qwen3-Omni) (#31790)
Signed-off-by: Zhongze Jiang <jiangzhongze.jzz@ant-intl.com>
Jzz1943 committed
Jan 6, 2026 at 20:59 UTC
2c1a4f2488da2bb3c60dcbbb5df61a370e39ee27
1 file changed
+8
-6
vllm/model_executor/models/qwen3_omni_moe_thinker.py
+8
-6
@@ -750,18 +750,20 @@ class Qwen3OmniMoeThinkerMultiModalProcessor(
750
# https://github.com/huggingface/transformers/pull/41473
751
mm_kwargs = dict(mm_kwargs)
752
tok_kwargs = dict(tok_kwargs)
753
+ mm_kwargs["audio_kwargs"] = dict(mm_kwargs.get("audio_kwargs") or {})
754
+ mm_kwargs["text_kwargs"] = dict(mm_kwargs.get("text_kwargs") or {})
755
if Version(TRANSFORMERS_VERSION) < Version("4.58.0"):
756
# Extract audio_sample_rate before restructuring
757
audio_sample_rate = mm_kwargs.pop("audio_sample_rate", None)
758
759
# move truncation to audio_kwargs level to avoid conflict
760
# with tok_kwargs
759
- mm_kwargs["audio_kwargs"] = {
760
- "truncation": mm_kwargs.pop("truncation", False)
761
- }
762
- mm_kwargs["text_kwargs"] = {
763
- "truncation": tok_kwargs.pop("truncation", False)
764
- }
761
+ mm_kwargs["audio_kwargs"].setdefault(
762
+ "truncation", mm_kwargs.pop("truncation", False)
763
+ )
764
+ mm_kwargs["text_kwargs"].setdefault(
765
+ "truncation", tok_kwargs.pop("truncation", False)
766
+ )
767
768
# Validate and conditionally pass audio_sample_rate
769
# WhisperFeatureExtractor has a fixed sampling rate, and vLLM's