Skip to content

Commit 0149877

Browse files
alex-jw-brooksAlvant
authored andcommitted
[Bugfix] Fix Token IDs Reference for MiniCPM-V When Images are Provided With No Placeholders (vllm-project#8991)
Signed-off-by: Alex-Brooks <[email protected]> Signed-off-by: Alvant <[email protected]>
1 parent 15b0d78 commit 0149877

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm/model_executor/models/minicpmv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ def get_placeholder(image_size: Tuple[int, int], num_image: int):
274274
get_slice_image_placeholder(image_size, num_image)
275275

276276
prompt = llm_inputs.get("prompt")
277+
token_ids = llm_inputs.get("prompt_token_ids")
277278
if prompt is None:
278-
token_ids = llm_inputs.get("prompt_token_ids")
279279
prompt = tokenizer.decode(token_ids)
280280

281281
pattern = "(<image>./</image>)"

0 commit comments

Comments
 (0)