[Bugfix] Fix incorrect use of merge_size in Qwen3-VL video timestamp calculation (#37439)

Signed-off-by: chengyufang <cnyvfang@outlook.com>
This commit is contained in:
Chengyu Fang
2026-03-19 02:36:34 +08:00
committed by GitHub
parent 70b81c4f3d
commit 738d0a281f

View File

@@ -767,7 +767,7 @@ class Qwen3VLProcessingInfo(Qwen2VLProcessingInfo):
sampled_num_frames: int | None = None,
) -> list[int]:
video_processor = self.get_video_processor()
merge_size = video_processor.merge_size
temporal_patch_size = video_processor.temporal_patch_size
indices = metadata["frames_indices"]
# metadata["fps"] refers to the true fps of the input video.
@@ -806,7 +806,7 @@ class Qwen3VLProcessingInfo(Qwen2VLProcessingInfo):
.astype(int)
.tolist()
)
timestamps = self._calculate_timestamps(indices, video_fps, merge_size)
timestamps = self._calculate_timestamps(indices, video_fps, temporal_patch_size)
return timestamps