Skip to content

Conversation

@Elon7069
Copy link

Fixes #41709

This PR fixes how Qwen3-VL Processor handles multiple images per sample.
Previously, all images were flattened across the batch, causing shape mismatches in model forward passes.

Changes:

  • Updated Qwen3VLProcessor to preserve per-sample image grouping.
  • Added test to verify batch dimension consistency.

@github-actions
Copy link
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: qwen3_vl

@Elon7069
Copy link
Author

Hi, this PR fixes the issue where Qwen3VLProcessor was flattening multi-image batches. It now preserves per-sample grouping and passes the added unit test.

@Rocketknight1
Copy link
Member

cc @zucchini-nlp

Copy link
Member

@zucchini-nlp zucchini-nlp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Qwen models, the pixel shape must be NxD. We don't need a PR, thanks for working on it though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Qwen3-VL Processor combined images in the same batch as one message

3 participants