Skip to content

Commit 000b1ac

Browse files
remove unnecessary
1 parent bb5ee65 commit 000b1ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/openvino/test_modeling.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,7 @@ def test_load_from_hub_and_save_visual_language_model(self):
271271
else:
272272
self.assertEqual(component.request.get_property("PERFORMANCE_HINT"), "LATENCY")
273273

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
276275
inputs = processor(images=image, text=prompt, return_tensors="pt")
277276
set_seed(SEED)
278277
loaded_model_outputs = loaded_model(**inputs)
@@ -2247,8 +2246,9 @@ def test_llava_with_new_preprocessing(self, model_arch):
22472246
self.assertTrue(processor.patch_size is not None)
22482247
self.assertTrue(processor.vision_feature_select_strategy is not None)
22492248
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,
22522252
)
22532253
set_seed(SEED)
22542254
with torch.no_grad():

0 commit comments

Comments
 (0)