Skip to content

Commit 30ab84e

Browse files
wulipc松灵
authored andcommitted
[bugfix] Qwen3-VL fix video incorrect timestamp calculations while do_sample_frames=True (vllm-project#27104)
Co-authored-by: 松灵 <wpf272043@alibaba-inc.com> Signed-off-by: Alberto Perdomo <aperdomo@redhat.com>
1 parent 37855db commit 30ab84e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vllm/model_executor/models/qwen3_vl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,9 @@ def _get_video_second_idx(
735735
if do_sample_frames:
736736
# here video_fps is the fps of the sampled video, and
737737
# metadata["fps"] refers to the fps of the original video.
738-
video_fps = sampled_fps if sampled_fps else video_processor.fps
738+
sampled_fps = sampled_fps if sampled_fps else video_processor.fps
739739
total_num_frames = metadata["total_num_frames"]
740-
num_frames = int(total_num_frames / metadata["fps"] * video_fps)
740+
num_frames = int(total_num_frames / metadata["fps"] * sampled_fps)
741741
num_frames = min(
742742
min(
743743
max(num_frames, video_processor.min_frames),

0 commit comments

Comments
 (0)