feat: add Qwen3-VL support with image and video token calculation#16
Merged
thisisiron merged 2 commits intomainfrom Jan 8, 2026
Merged
feat: add Qwen3-VL support with image and video token calculation#16thisisiron merged 2 commits intomainfrom
thisisiron merged 2 commits intomainfrom
Conversation
- Implement Qwen3VLAnalyst with proper video token calculation logic - Add smart_resize_video() for Qwen3-VL's video preprocessing - Add qwen3-vl tests for both image and video token counting - Qwen3-VL uses different video processing: min_frames=4, max_frames=768 and video_processor settings for pixel limits
Owner
Author
|
/style |
Contributor
|
Style fixes have been applied and pushed! |
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.
Summary
Qwen3VLAnalystwith proper video token calculation logicsmart_resize_video()function for Qwen3-VL's video preprocessingChanges
src/vt_calculator/analysts/analyst.pyQwen3VLAnalystclass that overridescalculate_video()methodmin_frames=4,max_frames=768video_processor.sizefor pixel limits instead ofimage_processorASSUMED_SOURCE_FPS=24.0for fallback when video fps is unknownsrc/vt_calculator/analysts/tools.pysmart_resize_video()function that handles temporal dimension in video resizingtests/test_analysts.pyQwen3VLAnalystimportqwen3-vltest case for image token countingqwen3-vl-videotest case for video token countingTest Results
All 8 tests pass: