From 7c8f82f5c46b3452b6aa3a062b01f8e0bac43150 Mon Sep 17 00:00:00 2001 From: zifeitong Date: Wed, 21 Aug 2024 09:40:20 -0700 Subject: [PATCH] Update vllm/multimodal/image.py Co-authored-by: Cyrus Leung --- vllm/multimodal/image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/multimodal/image.py b/vllm/multimodal/image.py index 4dd6d42f24051..7ba8fedab2e7d 100644 --- a/vllm/multimodal/image.py +++ b/vllm/multimodal/image.py @@ -77,11 +77,11 @@ def repeat_and_pad_image_tokens( prompt_parts = prompt.split(image_token_str, maxsplit=len(repeat_count)) new_prompt = "" - for i in range(len(repeat_count)): + for repeat_count_item in repeat_count: replacement_str = "".join( repeat_and_pad_token( image_token_str, - repeat_count=repeat_count[i], + repeat_count=repeat_count_item, pad_token_left=pad_token_str_left, pad_token_right=pad_token_str_right, ))