[Bugfix] Fix check_interleaved_audio_video false positive for batched non-interleaved requests#35487
Merged
vllm-bot merged 3 commits intovllm-project:mainfrom Feb 27, 2026
Conversation
…rleaved requests Signed-off-by: linyueqian <linyueqian@outlook.com>
1 task
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses a bug in check_interleaved_audio_video that caused false positives for batched non-interleaved requests, which could lead to a crash. The fix correctly introduces a density check to ensure that a truly interleaved sequence has no gaps in its combined audio/video token span. The addition of a regression test validates this behavior. The overall change is correct and effective. I have included one suggestion to optimize the new density check for improved efficiency and clarity.
Signed-off-by: linyueqian <linyueqian@outlook.com>
5 tasks
EanWang211123
pushed a commit
to EanWang211123/vllm
that referenced
this pull request
Mar 2, 2026
… non-interleaved requests (vllm-project#35487) Signed-off-by: linyueqian <linyueqian@outlook.com> Co-authored-by: Roger Wang <hey@rogerw.io> Signed-off-by: EanWang211123 <wangyiheng@sangfor.com.cn>
Copilot AI
pushed a commit
to machov/vllm
that referenced
this pull request
Mar 10, 2026
… non-interleaved requests (vllm-project#35487) Signed-off-by: linyueqian <linyueqian@outlook.com> Co-authored-by: Roger Wang <hey@rogerw.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #35394.
Problem
check_interleaved_audio_videoused a simple range-overlap check to detect theuse_audio_in_video=Truecase. This produces a false positive when multiple non-interleaved requests are batched together: audio tokens from request N fall between video tokens of request N and request N+1, making global position ranges overlap even though each individual request is non-interleaved.The false positive caused
embed_input_idsto route tomerge_interleaved_embeddings, which then crashed with a shape mismatch becausemm_embedswere assembled for the non-interleaved path.Fix
Add a density check: for true
use_audio_in_videointerleaving, every position in the combined V/A span is a video or audio token (no gaps). Batched non-interleaved requests have text/image tokens at batch boundaries that create gaps.Both Qwen2.5-Omni and Qwen3-Omni are covered since
qwen3_omni_moe_thinker.pyimportscheck_interleaved_audio_videofromqwen2_5_omni_thinker.py.Test
Added
test_batched_non_interleaved_no_false_positiveto the existing test file, which batches 5 identical non-interleaved mixed-modality requests and asserts the function correctly returnsFalse.