[MM] Add Triton kernel for mm_input_normal. (#56798)
Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io> Signed-off-by: wang.yuqi <noooop@126.com> Signed-off-by: Isotr0py <Isotr0py@outlook.com> Co-authored-by: Isotr0py <2037008807@qq.com> Co-authored-by: Isotr0py <Isotr0py@outlook.com>
This commit is contained in:
co-authored by
Isotr0py
Isotr0py
parent
267eee54bf
commit
8a269919f4
@@ -534,11 +534,19 @@ class MultiModalConfig:
|
||||
"""Get the keyword arguments to pass to the multi-modal processor
|
||||
according to the extra arguments passed during inference.
|
||||
"""
|
||||
kwargs = self.mm_processor_kwargs or {}
|
||||
merged = dict(self.mm_processor_kwargs or {}) | dict(inference_kwargs)
|
||||
if self.mm_device_do_normalize:
|
||||
kwargs["do_normalize"] = False
|
||||
kwargs["do_rescale"] = False
|
||||
return kwargs | dict(inference_kwargs)
|
||||
# The model expects raw pixels and normalises on device;
|
||||
# overriding these per request would silently double-normalise.
|
||||
for key in ("do_normalize", "do_rescale"):
|
||||
if key in inference_kwargs:
|
||||
logger.warning_once(
|
||||
"mm_device_do_normalize is enabled; ignoring "
|
||||
"per-request mm_processor_kwargs[%r].",
|
||||
key,
|
||||
)
|
||||
merged[key] = False
|
||||
return merged
|
||||
|
||||
def use_gpu_video_backend(self) -> bool:
|
||||
"""Return whether the configured video loader or codec uses the GPU."""
|
||||
|
||||
Reference in New Issue
Block a user