multimodal: precompute hash for MultimodalDataItem (#14354)

Signed-off-by: Feng Su <sufeng@linux.alibaba.com>
Signed-off-by: Junjie Mao <junjie.mao@linux.alibaba.com>
This commit is contained in:
Feng Su
2025-12-19 07:27:59 +08:00
committed by GitHub
parent e0963a6cb1
commit 29e8f7f9e5
4 changed files with 14 additions and 1 deletions

View File

@@ -243,6 +243,9 @@ class MultimodalDataItem:
"""
Set the pad value after first hashing the data
"""
if self.pad_value is not None:
return
from sglang.srt.managers.mm_utils import hash_feature
if self.hash is None: