File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -271,8 +271,7 @@ def test_load_from_hub_and_save_visual_language_model(self):
271
271
else :
272
272
self .assertEqual (component .request .get_property ("PERFORMANCE_HINT" ), "LATENCY" )
273
273
274
- processor .patch_size = 16
275
- # sould be fixed in https://huggingface.co/katuni4ka/tiny-random-llava-ov/blob/main/processor_config.json#L3
274
+ processor .patch_size = loaded_model .config .vision_config .patch_size
276
275
inputs = processor (images = image , text = prompt , return_tensors = "pt" )
277
276
set_seed (SEED )
278
277
loaded_model_outputs = loaded_model (** inputs )
@@ -2247,8 +2246,9 @@ def test_llava_with_new_preprocessing(self, model_arch):
2247
2246
self .assertTrue (processor .patch_size is not None )
2248
2247
self .assertTrue (processor .vision_feature_select_strategy is not None )
2249
2248
inputs = processor (images = self .IMAGE , text = prompt , return_tensors = "pt" )
2250
- self .assertTrue (
2251
- (inputs .input_ids == ov_model .config .image_token_index ).sum (1 ).max () >= ov_model .config .image_seq_length
2249
+ self .assertGreaterEqual (
2250
+ (inputs .input_ids == ov_model .config .image_token_index ).sum ().max ().item (),
2251
+ ov_model .config .image_seq_length ,
2252
2252
)
2253
2253
set_seed (SEED )
2254
2254
with torch .no_grad ():
You can’t perform that action at this time.
0 commit comments