Safetensors
llava_next
alifaraz14 commited on
Commit
9394c56
·
verified ·
1 Parent(s): 0714be6

Update processor_config.json

Browse files

During 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.

Files changed (1) hide show
  1. processor_config.json +1 -1
processor_config.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "image_token": "<image>",
3
- "patch_size": null,
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
  }