Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions vllm/v1/engine/mm_input_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def get_and_update_p0(

full_mm_inputs = list[Optional[MultiModalKwargs]]()
for mm_input, mm_hash in zip(mm_inputs, mm_hashes):
if mm_hash in self.mm_cache:
if self.mm_cache.get(mm_hash) is not None:
mm_input = None
else:
self.mm_cache[mm_hash] = mm_input
Expand All @@ -73,7 +73,8 @@ def get_and_update_p1(
full_mm_inputs = list[MultiModalKwargs]()
for mm_input, mm_hash in zip(mm_inputs, mm_hashes):
if mm_input is None:
mm_input = self.mm_cache[mm_hash]
mm_input = self.mm_cache.get(mm_hash)
assert mm_input is not None, f"Missing {mm_hash=}"
else:
self.mm_cache[mm_hash] = mm_input

Expand Down