[Bugfix] Fix deepseek-vl2 inference with more than 2 images (#13818)

This commit is contained in:
Isotr0py
2025-02-25 06:03:02 -08:00
committed by GitHub
parent fa82074167
commit 6ff518626c
2 changed files with 46 additions and 10 deletions
+4 -2
View File
@@ -477,13 +477,15 @@ class H2OVLMultiModalProcessor(InternVLMultiModalProcessor[H2OVLProcessingInfo]
enable_sanity_checks=enable_sanity_checks,
)
if self.cache is not None:
mm_limit = self.info.ctx.model_config.multimodal_config.limit_per_prompt
if self.cache is not None and mm_limit["image"] >= 2:
# The processor output depends on the number of images passed,
# making it incompatible with processing cache which is supposed
# to be invariant of how many images are passed per prompt
self.cache = None
logger.warning_once(
f"{type(self).__name__} does not support processing cache.")
f"{type(self).__name__} does not support processing cache with "
"multi-image support enabled.")
def _get_prompt_replacements(
self,