From 12909f3b90b6919c64f2118c43aadfe41bb99f75 Mon Sep 17 00:00:00 2001 From: WesKwong Date: Wed, 24 Sep 2025 17:21:05 +0800 Subject: [PATCH 1/2] fix: Resolve unexpected video frame dropping for multi-video inputs This commit addresses a bug where the InternVL preprocessor would incorrectly drop one video frame from subsequent videos in a multi-video input. This issue was reported in: https://github.com/OpenGVLab/InternVL/issues/1178 --- .../models/internvl/processing_internvl.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/transformers/models/internvl/processing_internvl.py b/src/transformers/models/internvl/processing_internvl.py index 12e6a6163ba8..7c3434174763 100644 --- a/src/transformers/models/internvl/processing_internvl.py +++ b/src/transformers/models/internvl/processing_internvl.py @@ -98,7 +98,7 @@ def _insert_media_placeholders( video_num_patches: list[int], image_num_patches_indices: np.ndarray, video_num_patches_indices: np.ndarray, - video_patch_indices: np.ndarray, + video_frame_indices: np.ndarray, ): """ Processes interleaved text with and