From ce0a7dc70dfbbcd3a3fcad023adf577f7c10d18c Mon Sep 17 00:00:00 2001 From: DarkLight1337 Date: Thu, 2 Jan 2025 11:25:50 +0000 Subject: [PATCH] Fix mantis Signed-off-by: DarkLight1337 --- vllm/model_executor/models/llava.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vllm/model_executor/models/llava.py b/vllm/model_executor/models/llava.py index f96086635843b..e4dd3ace34a73 100644 --- a/vllm/model_executor/models/llava.py +++ b/vllm/model_executor/models/llava.py @@ -683,7 +683,11 @@ def apply( hf_config = self.ctx.get_hf_config(LlavaConfig) image_token_id = hf_config.image_token_index - num_image_tokens = self._get_num_image_tokens() + # Assume that it doesn't depend on the image size + num_image_tokens = self._get_num_image_tokens( + image_width=-1, + image_height=-1, + ) result = super().apply(prompt_text, mm_data, hf_processor_mm_kwargs)