sgl-project/sglang · error · ValueError

Cannot find corresponding multimodal processor registered in

Error message

Cannot find corresponding multimodal processor registered in sglang for model type `{model_type}`

What it means

LLaVA-style models wrap a vision tower whose model_type selects an SGLang multimodal processor implementation. No processor class in sglang's PROCESSOR_MAPPING matches that vision model_type, so loading fails.

Source

Thrown at python/sglang/srt/multimodal/processors/llava.py:285

class LlavaMultimodalProcessor(BaseMultimodalProcessor):
    """
    This is a wrapper class used to identify the multimodal processor for Llava architectures' vision model.
    """

    models = [LlavaForConditionalGeneration, Mistral3ForConditionalGeneration]

    def _get_sgl_processor_cls(self, model_type: str):
        if model_type == "clip_vision_model":
            return LlavaImageProcessor
        if hf_name := HF_MAPPING_NAMES.get(model_type):
            sgl_mm_processor_set = sgl_mm_processor_utils.PROCESSOR_MAPPING.values()
            sgl_processor_cls = list(
                filter(lambda p: p.__name__ == hf_name, sgl_mm_processor_set)
            )
            if sgl_processor_cls:
                return sgl_processor_cls[0]
        raise ValueError(
            f"Cannot find corresponding multimodal processor registered in sglang for model type `{model_type}`"
        )

    def __init__(self, hf_config, server_args, _processor, *args, **kwargs):
        assert hasattr(hf_config, "vision_config")
        assert hasattr(hf_config, "text_config")
        self.vision_config = hf_config.vision_config
        self.text_config = hf_config.text_config
        self.hf_config = hf_config

        if vision_type := getattr(self.vision_config, "model_type"):
            self.inner = self._get_sgl_processor_cls(vision_type)(
                hf_config, server_args, _processor, *args, **kwargs
            )
        else:
            raise ValueError(
                f"Required `vision_config.model_type` is not found in hf_config: `{hf_config}`"
            )

View on GitHub (pinned to 0132848349)

Solutions

  1. Upgrade sglang to a version that registers a processor for this vision model_type
  2. Check sgl_mm_processor_utils.PROCESSOR_MAPPING for supported types and use a model with a supported vision tower
  3. Register a custom processor class in the mapping if you control the deployment
Defensive patterns

Strategy: fallback

Validate before calling

from sglang.srt.multimodal.processors import PROCESSOR_MAPPING
vt = config.vision_config.model_type
supported = any(p.__name__ == vt for p in PROCESSOR_MAPPING.values())

Prevention

When it happens

Trigger: Serving a LLaVA-variant model whose config.json vision_config.model_type (e.g. a new or renamed SigLIP/CLIP variant) is not registered in sglang's multimodal processor mapping.

Common situations: Using a newly released vision tower version, a community fine-tune with a custom vision model_type, or an older sglang version lacking a newly added processor.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/7b54f4d026f1c1fa. Report an issue: GitHub.