mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-01 11:12:50 +08:00
[data] fix internvl plugin when using PIL images (#8129)
This commit is contained in:
parent
763fbc294b
commit
a9211a730e
@ -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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user