A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 10:45 UTC
[Bugfix] Update InternVL input mapper to support image embeds (#9351)
hhzhang16 committed
Oct 14, 2024 at 21:29 UTC
55e081fbad29c6710318e1715372cc927e44de8b
1 file changed
+2
vllm/model_executor/models/internvl.py
+2
@@ -342,6 +342,8 @@ class InternVLInputPipeline:
342
elif is_list_of(data, Image.Image):
343
# we can't stack here because images may have different num_patches
344
data = [image_pixel_values_mapper(img) for img in data]
345
+ else:
346
+ return MultiModalInputs({"image_embeds": data})
347
model_config = ctx.model_config
348
tokenizer = cached_get_tokenizer(
349
model_config.tokenizer,