{"record":{"id":"765409d00f641e31","repo":"sgl-project/sglang","slug":"component-name-r-manages-its-own-checkpoint-quan","errorCode":null,"errorMessage":"{component_name!r} manages its own checkpoint quantization and does not support an online quantization override","messagePattern":"(.+?) manages its own checkpoint quantization and does not support an online quantization override","errorType":"validation","errorClass":"ComponentCheckpointUnsupportedError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/loader/component_loaders/text_encoder_loader.py","lineNumber":262,"sourceCode":"                param_name_mapper=name_mapper,\n            )\n            quant_config = resolve_comfy_checkpoint_quantization(markers)\n    return quant_config\n\n\ndef _configure_encoder_quantization(\n    model_config: EncoderConfig,\n    model_cls: type[nn.Module],\n    component_config: dict,\n    component_model_path: str,\n    component_weights_path: str,\n    component_name: str,\n    explicit_quantization: str | None = None,\n    ignored_layers: list[str] | None = None,\n) -> None:\n    if getattr(model_cls, \"manages_checkpoint_quantization\", False):\n        if explicit_quantization is not None:\n            raise ComponentCheckpointUnsupportedError(\n                f\"{component_name!r} manages its own checkpoint quantization and \"\n                \"does not support an online quantization override\"\n            )\n        # Preserve model-owned formats such as Ideogram's bitsandbytes state.\n        # Those models parse metadata, construct layers, and attach quant states\n        # themselves; running the generic lifecycle as well would process twice.\n        return\n\n    _delegate_standard_bnb4_to_transformers(\n        component_config,\n        component_name,\n    )\n    try:\n        quant_config = _get_encoder_quant_config(\n            component_config,\n            component_model_path,\n            component_weights_path,\n            model_cls,","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/loader/component_loaders/text_encoder_loader.py#L244-L280","documentation":"ComponentCheckpointUnsupportedError raised when an explicit online quantization override is requested for a model class that sets manages_checkpoint_quantization = True. Such models (e.g. Ideogram with bitsandbytes) parse quantization metadata and attach quant states themselves; the generic lifecycle would process weights twice, so overrides are rejected.","triggerScenarios":"Calling _configure_encoder_quantization (via load_customized) with explicit_quantization set (e.g. \"fp8\"/\"int8\") on a model_cls whose class attribute manages_checkpoint_quantization is True, such as an Ideogram text encoder.","commonSituations":"Applying a pipeline-wide --quantization flag to all components including ones that self-manage quantization; assuming every encoder accepts online quantization after it worked for CLIP.","solutions":["Drop the explicit_quantization argument for this component; let the model manage its own checkpoint quantization","Scope online quantization overrides to components that support them (e.g. via per-component config)","If you truly need a different quantization, use a checkpoint already quantized in that format"],"exampleFix":"# before\nload_customized(..., explicit_quantization=\"fp8\")  # Ideogram encoder\n\n# after\nload_customized(..., explicit_quantization=None)","handlingStrategy":"validation","validationCode":"if explicit_quantization is not None and getattr(model_cls, \"manages_checkpoint_quantization\", False):\n    explicit_quantization = None  # or raise early with a clear message","typeGuard":"def supports_online_quant(model_cls) -> bool:\n    return not getattr(model_cls, \"manages_checkpoint_quantization\", False)","tryCatchPattern":null,"preventionTips":["Check manages_checkpoint_quantization before passing overrides","Apply quantization overrides per-component, not globally"],"tags":["quantization","online-quantization","text-encoder","unsupported-operation"],"backgroundTag":"unsupported-quantization-override","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}