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 9, 00:00 UTC
[Bugfix] Do not add extra \n for image-only cases when constructing multimodal text prompts. (#33647)
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
wang.yuqi committed
Feb 3, 2026 at 22:43 UTC
f3d8a3467111d861cb814152f9c5c8aeaff335c2
1 file changed
+4
-1
vllm/entrypoints/chat_utils.py
+4
-1
@@ -1164,7 +1164,10 @@ def _get_full_multimodal_text_prompt(
1164
1165
# NOTE: Default behaviour: we always add missing placeholders
1166
# at the front of the prompt, if interleave_strings=False
1167
- return "\n".join(missing_placeholders + [text_prompt])
1167
+ if text_prompt:
1168
+ return "\n".join(missing_placeholders + [text_prompt])
1169
+ else:
1170
+ return "\n".join(missing_placeholders)
1171
1172
1173
# No need to validate using Pydantic again