mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-06-10 06:35:45 +08:00
[Bugfix] Fix phi3v incorrect image_idx when using async engine (#7916)
This commit is contained in:
parent
42e932c7d4
commit
b09c755be8
@ -422,7 +422,9 @@ def input_processor_for_phi3v(ctx: InputContext, llm_inputs: LLMInputs):
|
|||||||
|
|
||||||
prompt = llm_inputs.get("prompt")
|
prompt = llm_inputs.get("prompt")
|
||||||
if prompt is None:
|
if prompt is None:
|
||||||
image_idx = []
|
# for async server request, we assume prompt and its token_ids is always
|
||||||
|
# in correct format. And num_image_tags == len(image_data) always True.
|
||||||
|
image_idx = range(1, len(image_data) + 1)
|
||||||
new_prompt = None
|
new_prompt = None
|
||||||
else:
|
else:
|
||||||
image_idx = sorted(map(int, re.findall(r"<\|image_(\d+)\|>+", prompt)))
|
image_idx = sorted(map(int, re.findall(r"<\|image_(\d+)\|>+", prompt)))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user