Skip to content

Commit

Permalink
[Bugfix] Update InternVL input mapper to support image embeds (vllm-p…
Browse files Browse the repository at this point in the history
…roject#9351)

Signed-off-by: Sumit Dubey <sumit.dubey2@ibm.com>
  • Loading branch information
hhzhang16 authored and sumitd2 committed Nov 14, 2024
1 parent 5d38a0e commit bffb11b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vllm/model_executor/models/internvl.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ def input_mapper(
elif is_list_of(data, Image.Image):
# we can't stack here because images may have different num_patches
data = [image_pixel_values_mapper(img) for img in data]
else:
return MultiModalInputs({"image_embeds": data})
model_config = ctx.model_config
tokenizer = cached_get_tokenizer(
model_config.tokenizer,
Expand Down

0 comments on commit bffb11b

Please sign in to comment.