[Bugfix] Multi-modal caches not acting like LRU caches (#16593)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-04-14 09:24:16 -07:00
committed by GitHub
parent 6bf27affb6
commit aa29841ede
4 changed files with 187 additions and 126 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ class MirroredProcessingCache:
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