Skip to content

[Misc] Update Qwen3-VL models dummy image size calculation - #34402

Closed
Isotr0py wants to merge 2 commits into
vllm-project:mainfrom
Isotr0py:fix-image-profiling
Closed

Isotr0py wants to merge 2 commits into
vllm-project:mainfrom
Isotr0py:fix-image-profiling

Conversation

@Isotr0py

@Isotr0py Isotr0py commented Feb 12, 2026 •

Copy link
Copy Markdown
Member

Purpose

  • Actually, --mm-processor-kwargs '{"size": {"longest_edge": 234881024, "shortest_edge": 4096}}' will also update Qwen3-VL image processor's max_pixels.
  • So mm_processor_kwargs.get("max_pixels", None) is not robust enough for this case.

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@mergify mergify Bot added the qwen Related to Qwen models label Feb 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request correctly updates the logic for calculating the dummy image size for Qwen-VL models. Instead of trying to get max_pixels directly from mm_processor_kwargs, it now correctly initializes the image processor with the provided kwargs and then retrieves the longest_edge from the processor's size attribute. This is a more robust approach. I have one minor suggestion for code simplification in qwen3_vl.py to improve consistency.

Comment thread vllm/model_executor/models/qwen3_vl.py Outdated
video_overrides = mm_options.get("video") if mm_options else None

mm_processor_kwargs = mm_processor_kwargs or {}
image_processor = self.info.get_image_processor(**(mm_processor_kwargs or {}))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The or {} here is redundant, as mm_processor_kwargs is guaranteed to be a dictionary by the preceding line (mm_processor_kwargs = mm_processor_kwargs or {}). Removing it will make the code cleaner and more consistent with the changes in the other files in this pull request.

Suggested change
image_processor = self.info.get_image_processor(**(mm_processor_kwargs or {}))
image_processor = self.info.get_image_processor(**mm_processor_kwargs)

Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
@Isotr0py Isotr0py closed this Feb 12, 2026
@Isotr0py
Isotr0py deleted the fix-image-profiling branch February 12, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qwen Related to Qwen models

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant