🚨[Fast Image Processor] Force Fast Image Processor for Qwen2_VL/2_5_VL + Refactor (#39591)

* init

* Force qwen2VL image proc to fast

* refactor qwen2 vl fast

* fix copies

* Update after PR review and update tests to use return_tensors="pt"

* fix processor tests

* add BC for min pixels/max pixels
This commit is contained in:
Yoni Gozlan
2025-07-25 11:11:28 -04:00
committed by GitHub
parent f90de364c2
commit 17f02102c5
11 changed files with 222 additions and 283 deletions

View File

@@ -937,7 +937,7 @@ class ProcessorTesterMixin:
"video", batch_size, return_tensors, "videos_input_name", "video_processor", MODALITY_INPUT_DATA["videos"]
)
@parameterized.expand([(1, "np"), (1, "pt"), (2, "np"), (2, "pt")])
@parameterized.expand([(1, "pt"), (2, "pt")]) # fast image processors supports only torchvision
def test_apply_chat_template_image(self, batch_size: int, return_tensors: str):
self._test_apply_chat_template(
"image", batch_size, return_tensors, "images_input_name", "image_processor", MODALITY_INPUT_DATA["images"]