Repository navigation
fix: Qwen3-VL embedders, reranker and UEmbed size video frames like qwen-vl-utils - #5766
Merged
Samoed merged 2 commits intoOct 25, 2026
Conversation
AdnanElAssadi
force-pushed
the
fix/qwen-vl-video-frame-size
branch
from
October 24, 2026 05:30
ea11dab to
252eaa7
Compare
Samoed
reviewed
Oct 24, 2026
AdnanElAssadi
force-pushed
the
fix/qwen-vl-video-frame-size
branch
from
October 24, 2026 23:12
252eaa7 to
5e9d48a
Compare
Samoed
approved these changes
Oct 25, 2026
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.
The official Qwen3-VL-Embedding and Qwen3-VL-Reranker scripts resize video frames with qwen-vl-utils: each frame is fitted to the patch grid, then the clip to a
total_pixelsbudget at 128–768 tokens per frame. mteb lets the transformers video processor resize instead. It spends one budget on the whole clip, so frames of short clips keep near-native size and small frames are not upscaled. Itscap_pixels_per_frame=Trueoption is closer, but still matches the official size on only 11–31 of the 60 videos below.This moves UEmbed's tensor resize from #5651 into a shared
resize_videoand adds the per-frame step it skipped. The Qwen3-VL wrappers go through sentence-transformers, so the resize runs in a smallQwen3VLVideoProcessorsubclass before the usual processing, withdo_resize=False, the same as UEmbed does.Patch grid equal to the official one, 60 real videos from 10 MVEB tasks:
Embedding cosine to the official qwen-vl-utils path, 12 videos:
Scores on 32-item slices: