Skip to content

Commit

Permalink
add image embed
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaizzy committed Apr 30, 2024
1 parent 57c5b75 commit 07228b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlx_vlm/models/idefics2/idefics2.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ def _prepare_inputs_for_multimodal(self, image_features, inputs_embeds, input_id
return inputs_embeds

def __call__(self, input_ids: mx.array, pixel_values: mx.array, cache=None):
# input_embeddings = self.get_input_embeddings(input_ids, pixel_values)
input_embeddings = self.get_input_embeddings(input_ids, pixel_values)
logits, cache = self.language_model(
inputs=input_ids, cache=cache, inputs_embeds=None
inputs=input_ids, cache=cache, inputs_embeds=input_embeddings
)
return logits, cache

Expand Down

0 comments on commit 07228b6

Please sign in to comment.