[Bugfix] Fix phi3v incorrect image_idx when using async engine (#7916)
This commit is contained in:
@ -422,7 +422,9 @@ def input_processor_for_phi3v(ctx: InputContext, llm_inputs: LLMInputs):
|
||||
|
||||
prompt = llm_inputs.get("prompt")
|
||||
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
|
||||
else:
|
||||
image_idx = sorted(map(int, re.findall(r"<\|image_(\d+)\|>+", prompt)))
|
||||
|
||||
Reference in New Issue
Block a user