@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 35fb0b8613
Fork 0

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 9, 12:30 UTC

Don't use `min_pixels`/`max_pixels` from Qwen2VL's processor (#33208)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

Harry Mellor committed Jan 28, 2026 at 05:02 UTC 35fb0b8613742f39e68b3ac8a0060a55fde3abb2
1 file changed +3 -5
vllm/model_executor/models/qwen2_vl.py
+3 -5
@@ -841,8 +841,8 @@ class Qwen2VLProcessingInfo(BaseProcessingInfo):
841 height=image_height,
842 width=image_width,
843 factor=patch_size * merge_size,
844 - min_pixels=image_processor.min_pixels,
845 - max_pixels=image_processor.max_pixels,
844 + min_pixels=image_processor.size["shortest_edge"],
845 + max_pixels=image_processor.size["longest_edge"],
846 )
847 preprocessed_size = ImageSize(width=resized_width, height=resized_height)
848 else:
@@ -914,9 +914,7 @@ class Qwen2VLProcessingInfo(BaseProcessingInfo):
914 merge_size = vision_config.spatial_merge_size
915 if max_pixels is None:
916 image_processor = self.get_image_processor()
917 - max_pixels = (
918 - image_processor.max_pixels or image_processor.size["longest_edge"]
919 - )
917 + max_pixels = image_processor.size["longest_edge"]
918 unit = patch_size * merge_size
919 max_seq_len = max_pixels // (unit * unit)
920