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 13, 22:00 UTC
[Bugfix] Fix Qwen Omni audio inference (#27920)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Cyrus Leung committed
Nov 2, 2025 at 13:06 UTC
853a8eb53b89f9f3468ab553e86a964cb4e6cd1e
2 files changed
+2
-10
vllm/model_executor/models/qwen2_5_omni_thinker.py
+2
-7
@@ -130,6 +130,8 @@ class Qwen2_5OmniAudioFeatureInputs(TensorSchema):
130
TensorShape("nmb", "tsl", dynamic_dims={"tsl"}),
131
]
132
133
+ audio_feature_lengths: Annotated[torch.Tensor, TensorShape("na")]
134
+
135
feature_attention_mask: Annotated[
136
torch.Tensor | list[torch.Tensor],
137
TensorShape("na", "msl", dynamic_dims={"msl"}),
@@ -732,13 +734,6 @@ class Qwen2_5OmniConditionalGenerationMixin:
734
input_features = audio_input["input_features"]
735
audio_feature_lengths = audio_input["audio_feature_lengths"]
736
735
- if audio_feature_lengths.shape[0] == 1:
736
- audio_feature_lengths = audio_feature_lengths.squeeze(0)
737
- elif audio_feature_lengths.shape[1] == 1:
738
- audio_feature_lengths = audio_feature_lengths.squeeze(1)
739
- else:
740
- raise AssertionError(audio_feature_lengths.shape)
741
-
737
audio_feat_lengths, audio_output_lengths = (
738
self.audio_tower._get_feat_extract_output_lengths(audio_feature_lengths)
739
)
vllm/model_executor/models/qwen3_omni_moe_thinker.py
-3
@@ -99,7 +99,6 @@ from .utils import (
99
AutoWeightsLoader,
100
WeightsMapper,
101
_merge_multimodal_embeddings,
102
- flatten_bn,
102
maybe_prefix,
103
)
104
from .vision import (
@@ -1065,8 +1064,6 @@ class Qwen3OmniMoeConditionalGenerationMixin(Qwen2_5OmniConditionalGenerationMix
1064
input_features = audio_input["input_features"]
1065
audio_feature_lengths = audio_input["audio_feature_lengths"]
1066
1068
- audio_feature_lengths = flatten_bn(audio_feature_lengths, concat=True)
1069
-
1067
audio_feat_lengths, audio_output_lengths = _get_feat_extract_output_lengths(
1068
audio_feature_lengths
1069
)