[Bugfix] Disallow renderer_num_workers > 1 with mm processor cache (#38418)
Signed-off-by: Bvicii <yizhanhuang2002@gmail.com>
This commit is contained in:
@@ -647,6 +647,19 @@ class ModelConfig:
|
||||
|
||||
self.multimodal_config = MultiModalConfig(**mm_config_kwargs) # type: ignore[arg-type]
|
||||
|
||||
if (
|
||||
self.renderer_num_workers > 1
|
||||
and self.multimodal_config.mm_processor_cache_gb > 0
|
||||
):
|
||||
raise ValueError(
|
||||
"Cannot use --renderer-num-workers > 1 with the "
|
||||
"multimodal processor cache enabled. The cache is "
|
||||
"not thread-safe and does not support concurrent "
|
||||
"renderer workers. Please set "
|
||||
"--renderer-num-workers 1 (the default), or "
|
||||
"disable the cache with --mm-processor-cache-gb 0."
|
||||
)
|
||||
|
||||
# Multimodal GGUF models must use original repo for mm processing
|
||||
if is_gguf(self.tokenizer) and self.is_multimodal_model:
|
||||
raise ValueError(
|
||||
|
||||
Reference in New Issue
Block a user