From 0ee349b5534e3d02b499b1126f2abde73b798fe9 Mon Sep 17 00:00:00 2001 From: Roger Wang <136131678+ywang96@users.noreply.github.com> Date: Sun, 26 Jan 2025 00:47:42 -0800 Subject: [PATCH] [V1][Bugfix] Fix assertion when mm hashing is turned off (#12439) Signed-off-by: Roger Wang --- vllm/v1/request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vllm/v1/request.py b/vllm/v1/request.py index eefcdaf29e753..2cfcd8b63ccb2 100644 --- a/vllm/v1/request.py +++ b/vllm/v1/request.py @@ -58,7 +58,8 @@ def __init__( # Sanity check assert len(self.mm_inputs) == len(self.mm_positions) - assert len(self.mm_inputs) == len(self.mm_hashes) + if self.mm_hashes: + assert len(self.mm_inputs) == len(self.mm_hashes) # Cache the computed kv block hashes of the request to avoid # recomputing.