Refactor image processor phi4 (#36976)

* refactor image processor phi4

* nits fast image proc

* add image tests phi4

* Fix image processing tests

* update integration tests

* remove revision and add comment in integration tests
This commit is contained in:
Yoni Gozlan
2025-05-12 15:13:40 -04:00
committed by GitHub
parent 4143f94d51
commit e3b70b0d1c
5 changed files with 436 additions and 128 deletions

View File

@@ -279,7 +279,7 @@ class ImageProcessingTestMixin:
saved_file = image_processor_first.save_pretrained(tmpdirname)[0]
check_json_file_has_correct_format(saved_file)
use_fast = i == 1
use_fast = i == 1 or not self.test_slow_image_processor
image_processor_second = AutoImageProcessor.from_pretrained(tmpdirname, use_fast=use_fast)
self.assertEqual(image_processor_second.to_dict(), image_processor_first.to_dict())