[data] fix internvl plugin when using PIL images (#8129)

This commit is contained in:
Kingsley 2025-05-22 01:32:59 +08:00 committed by GitHub
parent 763fbc294b
commit a9211a730e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -525,14 +525,14 @@ class InternVLPlugin(BasePlugin):
mm_inputs = {}
image_video_patches = []
if len(images) != 0 and isinstance(images[0], str):
if len(images) != 0:
images = self._regularize_images(
images,
image_max_pixels=getattr(processor, "image_max_pixels", 1024 * 1024),
image_min_pixels=getattr(processor, "image_min_pixels", 32 * 32),
)["images"]
if len(videos) != 0 and isinstance(videos[0], str):
if len(videos) != 0:
videos = self._regularize_videos(
videos,
image_max_pixels=getattr(processor, "video_max_pixels", 256 * 256),