[Bugfix] Fix Token IDs Reference for MiniCPM-V When Images are Provided With No Placeholders (#8991)
Signed-off-by: Alex-Brooks <Alex.Brooks@ibm.com>
This commit is contained in:
parent
bc4eb65b54
commit
1fe0a4264a
@ -274,8 +274,8 @@ def input_processor_for_minicpmv(ctx: InputContext, llm_inputs: LLMInputs):
|
||||
get_slice_image_placeholder(image_size, num_image)
|
||||
|
||||
prompt = llm_inputs.get("prompt")
|
||||
token_ids = llm_inputs.get("prompt_token_ids")
|
||||
if prompt is None:
|
||||
token_ids = llm_inputs.get("prompt_token_ids")
|
||||
prompt = tokenizer.decode(token_ids)
|
||||
|
||||
pattern = "(<image>./</image>)"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user