[Bugfix] Clean up multi-modal processors (#14417)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2025-03-07 18:33:38 +08:00
committed by GitHub
parent 12c29a881f
commit 05fb6718f0
12 changed files with 79 additions and 76 deletions

View File

@@ -2405,6 +2405,15 @@ class MultiModalConfig:
hash_str = hashlib.md5(str(factors).encode()).hexdigest()
return hash_str
def get_limit_per_prompt(self, modality: str) -> int:
"""
Get the maximum number of input items allowed per prompt
for the given modality.
If not set by the user, this defaults to `1`.
"""
return self.limit_per_prompt.get(modality, 1)
# TODO: Add configs to init vision tower or not.