{"record":{"id":"4897f425a3ace736","repo":"sgl-project/sglang","slug":"unsupported-image-processor-backend-backend-ex","errorCode":null,"errorMessage":"Unsupported image processor backend: {backend}. Expected one of {sorted(_IMAGE_PROCESSOR_BACKENDS)}.","messagePattern":"Unsupported image processor backend: (.+?)\\. Expected one of (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/utils/hf_transformers/processor.py","lineNumber":74,"sourceCode":"\ndef resolve_image_processor_backend(mm_config) -> str:\n    \"\"\"Resolve the new backend option while honoring the legacy disable flag.\n\n    Takes the `mm` config bag (`get_mm()`): both leaves are resolved config, and\n    every caller is past publish. `getattr` with a default keeps it working for a\n    stand-in that carries only one of the two.\n    \"\"\"\n    if getattr(mm_config, \"disable_fast_image_processor\", False):\n        return \"pil\"\n    return getattr(mm_config, \"image_processor_backend\", \"auto\")\n\n\ndef _normalize_image_processor_backend(\n    image_processor_backend: Optional[str], use_fast: Optional[bool]\n) -> str:\n    backend = image_processor_backend or \"auto\"\n    if backend not in _IMAGE_PROCESSOR_BACKENDS:\n        raise ValueError(\n            f\"Unsupported image processor backend: {backend}. \"\n            f\"Expected one of {sorted(_IMAGE_PROCESSOR_BACKENDS)}.\"\n        )\n\n    if use_fast is not None:\n        legacy_backend = \"torchvision\" if use_fast else \"pil\"\n        if backend not in {\"auto\", legacy_backend}:\n            raise ValueError(\n                f\"use_fast={use_fast} conflicts with \"\n                f\"image_processor_backend={backend!r}.\"\n            )\n        backend = legacy_backend\n    return backend\n\n\ndef _apply_image_processor_backend(\n    processor,\n    tokenizer_name,","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/utils/hf_transformers/processor.py#L56-L92","documentation":"The image processor backend string passed via image_processor_backend (or resolved to 'auto' default) is not in the supported set _IMAGE_PROCESSOR_BACKENDS. The message lists valid backend names.","triggerScenarios":"Passing --image-processor-backend with a typo or unsupported value, e.g. 'tensor' instead of 'torchvision', 'PIL', or 'flash' style names.","commonSituations":"Copy-pasting backend names from other frameworks (vLLM-style flags) into sglang, or using a value removed in a newer release.","solutions":["Use one of the backends listed in the error message (typically auto, pil, torchvision)","Check the flag spelling and casing against the current sglang docs","Upgrade sglang if you expected a newly added backend"],"exampleFix":"# before\n--image-processor-backend tensor\n# after\n--image-processor-backend torchvision","handlingStrategy":"validation","validationCode":"assert backend in {'auto','pil','torchvision'}, f'bad backend {backend}'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy backend names from the current sglang docs only","Default to 'auto' unless you need a specific backend"],"tags":["multimodal","image-processor","server-args"],"backgroundTag":"invalid-backend-option","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}