Skip to content

Commit

Permalink
Merge pull request #63 from rhymes-ai/pixel_mask
Browse files Browse the repository at this point in the history
fix: add pixel_mask support to generation
  • Loading branch information
xffxff authored Nov 12, 2024
2 parents c850cfa + a8600ca commit 8aea96f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aria/model/modeling_aria.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def prepare_inputs_for_generation(
past_key_values=None,
inputs_embeds=None,
pixel_values=None,
pixel_mask=None,
attention_mask=None,
cache_position=None,
num_logits_to_keep=None,
Expand All @@ -351,5 +352,6 @@ def prepare_inputs_for_generation(
# If we're in cached decoding stage, pixel values should be None because input ids do not contain special image token anymore
# Otherwise we need pixel values to be passed to model
model_inputs["pixel_values"] = pixel_values
model_inputs["pixel_mask"] = pixel_mask

return model_inputs

0 comments on commit 8aea96f

Please sign in to comment.