From 0455b49519fa365b8be69f078b0e21d15bc5c3d9 Mon Sep 17 00:00:00 2001 From: roger-lcc <58332996+roger-lcc@users.noreply.github.com> Date: Fri, 9 Jan 2026 15:05:40 +0800 Subject: [PATCH] [Bugs] fix qwen2_vl for 0.11.0 (#94) Co-authored-by: luochencheng --- vllm_kunlun/models/qwen2_vl.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vllm_kunlun/models/qwen2_vl.py b/vllm_kunlun/models/qwen2_vl.py index 18f854c..2f16db1 100644 --- a/vllm_kunlun/models/qwen2_vl.py +++ b/vllm_kunlun/models/qwen2_vl.py @@ -1068,7 +1068,8 @@ class Qwen2VLMultiModalProcessor(BaseMultiModalProcessor[Qwen2VLProcessingInfo] merge_length = image_processor.merge_size**2 def get_replacement_qwen2vl(item_idx: int, modality: str): - grid_thw = out_mm_kwargs[f"{modality}_grid_thw"][item_idx] + out_item = out_mm_kwargs[modality][item_idx] + grid_thw = out_item[f"{modality}_grid_thw"].data assert isinstance(grid_thw, torch.Tensor) num_tokens = int(grid_thw.prod()) // merge_length