Skip to content

Commit 931ff44

Browse files
committed
updated
1 parent 346a146 commit 931ff44

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

onevision_encoder/configuration_onevision_encoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(
7777
attention_dropout=0.0,
7878
initializer_range=0.02,
7979
rope_theta=10000.0,
80-
rope_temporal_size=None,
80+
rope_temporal_size=64,
8181
use_head=True,
8282
**kwargs,
8383
):

onevision_encoder/modeling_onevision_encoder.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,7 @@ def forward(
547547
# Determine video dimensions for RoPE
548548
# Note: pixel_values passed to embeddings can be 4D or 5D
549549
if pixel_values.dim() == 5:
550-
# fix: use config.rope_temporal_size if set, otherwise use actual frames
551-
# legacy behavior was hardcoded t_frames=64 (for padded 64-frame videos)
552-
actual_frames = pixel_values.shape[2]
553-
t_frames = self.config.rope_temporal_size if self.config.rope_temporal_size else actual_frames
550+
t_frames = self.config.rope_temporal_size
554551
height = pixel_values.shape[3]
555552
width = pixel_values.shape[4]
556553
else:

0 commit comments

Comments
 (0)