Update processor_config.json
Browse filesDuring the HF inference procedure, due to the patch size being null in processor_config.json, I'm getting this error:
Traceback (most recent call last):
...
model_inputs = processor(
File "/home/user/miniconda3/envs/pangea/lib/python3.10/site-packages/transformers/models/llava_next/processing_llava_next.py", line 166, in __call__
num_image_tokens = self._get_number_of_features(orig_height, orig_width, height, width)
File "/home/user/miniconda3/envs/pangea/lib/python3.10/site-packages/transformers/models/llava_next/processing_llava_next.py", line 194, in _get_number_of_features
patches_height = height // self.patch_size
TypeError: unsupported operand type(s) for //: 'int' and 'NoneType'
The solution to this is to set patch_size to 14. I've made the change. Kindly accept the PR.
- processor_config.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"image_token": "<image>",
|
| 3 |
-
"patch_size":
|
| 4 |
"processor_class": "LlavaNextProcessor",
|
| 5 |
"vision_feature_select_strategy": null
|
| 6 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"image_token": "<image>",
|
| 3 |
+
"patch_size": 14,
|
| 4 |
"processor_class": "LlavaNextProcessor",
|
| 5 |
"vision_feature_select_strategy": null
|
| 6 |
}
|