[Bugfix] Schedule failure due to wrong get_image_size_with_most_features (#29692)

This commit is contained in:
Jaehwang Jung
2025-12-12 19:27:20 +09:00
committed by GitHub
parent 302b2c1eb9
commit f90319d5d1
4 changed files with 117 additions and 9 deletions

View File

@@ -237,8 +237,9 @@ class Gemma3ProcessingInfo(BaseProcessingInfo):
)
max_num_crops = images_kwargs["pan_and_scan_max_num_crops"]
# Result in the max possible feature size (h:w = max_num_crops:1)
return ImageSize(height=50 * max_num_crops, width=50)
vision_config = self.get_hf_config().vision_config
native_size = vision_config.image_size
return ImageSize(height=native_size * max_num_crops, width=native_size)
class Gemma3DummyInputsBuilder(BaseDummyInputsBuilder[Gemma3ProcessingInfo]):