Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
ydshieh committed Dec 17, 2024
1 parent 30f927a commit a65a9b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/models/kosmos2_5/modeling_kosmos2_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ def forward(
vision_model_output = None
projection_attentions = None
if image_embeds is None:
if flattened_patches is not None and past_key_values is None:
if flattened_patches is not None:
vision_model_output = self.vision_model(
flattened_patches=flattened_patches,
output_attentions=output_attentions,
Expand Down Expand Up @@ -2161,7 +2161,7 @@ def forward(
projection_attentions = None

if image_embeds is None:
if flattened_patches is not None and past_key_values is None:
if flattened_patches is not None:
vision_model_output = self.vision_model(
flattened_patches=flattened_patches,
output_attentions=output_attentions,
Expand Down

0 comments on commit a65a9b1

Please sign in to comment.