Skip to content

Commit 750dd2a

Browse files
authored
Fix: align Qwen2.5-VL inference rope index with training by passing s… (#41153)
Fix: align Qwen2.5-VL inference rope index with training by passing second_per_grid_ts
1 parent 7258ea4 commit 750dd2a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,7 @@ def prepare_inputs_for_generation(
15581558
model_inputs.get("input_ids", None),
15591559
image_grid_thw=image_grid_thw,
15601560
video_grid_thw=video_grid_thw,
1561+
second_per_grid_ts=second_per_grid_ts,
15611562
attention_mask=attention_mask,
15621563
)
15631564
self.model.rope_deltas = rope_deltas

src/transformers/models/qwen2_5_vl/modular_qwen2_5_vl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,7 @@ def prepare_inputs_for_generation(
814814
model_inputs.get("input_ids", None),
815815
image_grid_thw=image_grid_thw,
816816
video_grid_thw=video_grid_thw,
817+
second_per_grid_ts=second_per_grid_ts,
817818
attention_mask=attention_mask,
818819
)
819820
self.model.rope_deltas = rope_deltas

0 commit comments

Comments
 (0)