Repository navigation
Conversation
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn>
There was a problem hiding this comment.
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.
| 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 {})) |
There was a problem hiding this comment.
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.
| image_processor = self.info.get_image_processor(**(mm_processor_kwargs or {})) | |
| image_processor = self.info.get_image_processor(**mm_processor_kwargs) |
Purpose
--mm-processor-kwargs '{"size": {"longest_edge": 234881024, "shortest_edge": 4096}}'will also update Qwen3-VL image processor's max_pixels.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
supported_models.mdandexamplesfor a new model.