Skip to content

fix: avoid double resize when fetch_video receives image list#2045

Open
HT-Yuan wants to merge 1 commit intoQwenLM:mainfrom
HT-Yuan:fix/video-double-resize
Open

fix: avoid double resize when fetch_video receives image list#2045
HT-Yuan wants to merge 1 commit intoQwenLM:mainfrom
HT-Yuan:fix/video-double-resize

Conversation

@HT-Yuan
Copy link
Copy Markdown

@HT-Yuan HT-Yuan commented Feb 27, 2026

fix: avoid double resize when fetch_video receives image list

What's changed

Extract load_image from fetch_image() to handle image loading and RGB conversion without resizing.
In fetch_video's image list branch, use load_image() instead of fetch_image() so that images are only resized once (at VIDEO level with dynamic max_pixels cap).

What's fixed

Avoid the previous double resize that caused:

  1. Unnecessary computation overhead
  2. Image quality loss

Fixes #1833

@HT-Yuan HT-Yuan marked this pull request as draft March 3, 2026 12:13
@HT-Yuan HT-Yuan marked this pull request as ready for review March 3, 2026 12:13
@HT-Yuan
Copy link
Copy Markdown
Author

HT-Yuan commented Mar 3, 2026

@ShuaiBai623 Can we merge this MR? We believe it will help improve the inference speed of Qwen.

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.

Bug [qwen-vl-utils]: Double resizing and incorrect SPATIAL_MERGE_SIZE application for list-of-frames video inputs

1 participant