Unverified Commit 738d0a28 authored by Chengyu Fang's avatar Chengyu Fang Committed by GitHub
Browse files

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


Signed-off-by: default avatarchengyufang <cnyvfang@outlook.com>
parent 70b81c4f
...@@ -767,7 +767,7 @@ class Qwen3VLProcessingInfo(Qwen2VLProcessingInfo): ...@@ -767,7 +767,7 @@ class Qwen3VLProcessingInfo(Qwen2VLProcessingInfo):
sampled_num_frames: int | None = None, sampled_num_frames: int | None = None,
) -> list[int]: ) -> list[int]:
video_processor = self.get_video_processor() video_processor = self.get_video_processor()
merge_size = video_processor.merge_size temporal_patch_size = video_processor.temporal_patch_size
indices = metadata["frames_indices"] indices = metadata["frames_indices"]
# metadata["fps"] refers to the true fps of the input video. # metadata["fps"] refers to the true fps of the input video.
...@@ -806,7 +806,7 @@ class Qwen3VLProcessingInfo(Qwen2VLProcessingInfo): ...@@ -806,7 +806,7 @@ class Qwen3VLProcessingInfo(Qwen2VLProcessingInfo):
.astype(int) .astype(int)
.tolist() .tolist()
) )
timestamps = self._calculate_timestamps(indices, video_fps, merge_size) timestamps = self._calculate_timestamps(indices, video_fps, temporal_patch_size)
return timestamps return timestamps
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment