[Bugfix][V1][Multimodal] Ignore stale same-step encoder cache evictions (#52482)

Signed-off-by: Tianyu Guo <guoty@inferact.ai>
This commit is contained in:
Tianyu Guo
2026-08-16 22:21:55 +00:00
committed by GitHub
parent e3c1cb54fc
commit eee538d5da
2 changed files with 22 additions and 1 deletions
+3 -1
View File
@@ -269,7 +269,9 @@ class EncoderCacheManager:
encoder outputs can be removed from their caches. The internal
list is cleared after this call.
"""
freed = self.freed
# An entry evicted early in the scheduling pass can be allocated again
# later in the same pass. Keep its worker-side tensor in that case.
freed = [mm_hash for mm_hash in self.freed if mm_hash not in self.cached]
self.freed = []
return freed