Skip to content

Commit e381396

Browse files
hhzhang16garg-amit
authored andcommitted
[Bugfix] Update InternVL input mapper to support image embeds (vllm-project#9351)
Signed-off-by: Amit Garg <[email protected]>
1 parent 1254ce2 commit e381396

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

vllm/model_executor/models/internvl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,8 @@ def input_mapper(
342342
elif is_list_of(data, Image.Image):
343343
# we can't stack here because images may have different num_patches
344344
data = [image_pixel_values_mapper(img) for img in data]
345+
else:
346+
return MultiModalInputs({"image_embeds": data})
345347
model_config = ctx.model_config
346348
tokenizer = cached_get_tokenizer(
347349
model_config.tokenizer,

0 commit comments

Comments
 (0)