Fix Qwen2VL processor config by adding 'shortest_edge' and 'longest_edge' to size field
#1
by QuantumArjun - opened
This PR resolves a critical compatibility issue with the Qwen2VLImageProcessor used by this model.
Currently, the preprocessor_config.json defines the "size" field as:
"size": {
"max_pixels": 2116800,
"min_pixels": 3136
}```
However, this is invalid for the Qwen2VLImageProcessor used in transformers>=4.39. When loading the model with mlx-vlm, it fails with the following error: ```ValueError: size must contain 'shortest_edge' and 'longest_edge' keys.```
This PR fixes the config by replacing the size field with:
"size": {
"shortest_edge": 224,
"longest_edge": 224
} ```
This change makes the model usable in downstream applications without further user-side patching.
Thanks for the great model! Let me know if you'd like to attach logs or screenshots too β this is already sufficient for maintainers to understand the bug, fix, and verification.