Upload processor_config.json
Browse files## Fix: Add missing `spatial_merge_size` to processor config
### Problem
Missing `spatial_merge_size` parameter causes vision inference to crash:
ValueError: Number of image token positions (5476) does not match number of image features (1369)
### Solution
Add `"spatial_merge_size": 2` to `processor_config.json`:
```json
{
"image_break_token": "[IMG_BREAK]",
"image_end_token": "[IMG_END]",
"image_token": "[IMG]",
"patch_size": 14,
"processor_class": "PixtralProcessor",
"spatial_merge_size": 2
}
This matches the original https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Instruct-2503/blob/main/processor_config.json and config.json.
✅ Tested on M2 Max 64GB - vision inference works after fix.
Same fixes needed for: -4bit, -6bit, -8bit, -bf16 (all 0.1.19 conversions)
```
- processor_config.json +2 -1
|
@@ -3,5 +3,6 @@
|
|
| 3 |
"image_end_token": "[IMG_END]",
|
| 4 |
"image_token": "[IMG]",
|
| 5 |
"patch_size": 14,
|
| 6 |
-
"processor_class": "PixtralProcessor"
|
|
|
|
| 7 |
}
|
|
|
|
| 3 |
"image_end_token": "[IMG_END]",
|
| 4 |
"image_token": "[IMG]",
|
| 5 |
"patch_size": 14,
|
| 6 |
+
"processor_class": "PixtralProcessor",
|
| 7 |
+
"spatial_merge_size": 2
|
| 8 |
}
|