{"record":{"id":"7d00930c836ff9d7","repo":"sgl-project/sglang","slug":"unsupported-comfy-w4a8-format-for-prefix-r-mar","errorCode":null,"errorMessage":"Unsupported Comfy W4A8 format for {prefix!r}: {marker_format!r}","messagePattern":"Unsupported Comfy W4A8 format for (.+?): (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/layers/quantization/configs/kitchen_w4a8_config.py","lineNumber":57,"sourceCode":"                and capability.to_int() < self.get_min_capability()\n            ):\n                raise ValueError(\n                    \"Serialized W4A8 checkpoints require CUDA compute capability \"\n                    f\">= {self.get_min_capability() / 10:.1f}; got \"\n                    f\"{capability.to_int() / 10:.1f}\"\n                )\n        self.layer_markers = layer_markers\n        self.checkpoint_uses_native_qkv_layout = True\n        self.selected: list[str] = []\n\n        for prefix, marker in layer_markers.items():\n            marker_format = marker.get(\"format\")\n            if marker_format == \"int8_tensorwise\" and marker.get(\n                \"_is_tensorwise_scalar\"\n            ):\n                continue\n            if marker_format != \"asym_w4a8_int8\":\n                raise ValueError(\n                    f\"Unsupported Comfy W4A8 format for {prefix!r}: \"\n                    f\"{marker_format!r}\"\n                )\n            if marker.get(\"convrot\") is not True:\n                raise ValueError(\n                    f\"Serialized W4A8 layer {prefix!r} must set convrot=true\"\n                )\n\n    @classmethod\n    def get_name(cls) -> str:\n        return \"kitchen_w4a8\"\n\n    @classmethod\n    def get_supported_act_dtypes(cls) -> list[torch.dtype]:\n        return [torch.bfloat16, torch.float16]\n\n    @classmethod\n    def get_min_capability(cls) -> int:","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/layers/quantization/configs/kitchen_w4a8_config.py#L39-L75","documentation":"KitchenW4A8Config.__init__ accepts only markers of format 'asym_w4a8_int8' (plus int8_tensorwise with _is_tensorwise_scalar). Any other format string in layer_markers aborts construction.","triggerScenarios":"A marker with format 'nvfp4', 'convrot_w4a4', or plain 'int8_tensorwise' without _is_tensorwise_scalar while under kitchen_w4a8.","commonSituations":"Wrong quant config selected for a mixed checkpoint; exporter emitting a different format name.","solutions":["Re-export with asym_w4a8_int8 markers","Load under the config matching the actual formats (kitchen_w4a4 for convrot_w4a4, kitchen_int8 for int8_tensorwise rows)"],"exampleFix":"// before\n{\"format\": \"convrot_w4a4\"}\n// after\n{\"format\": \"asym_w4a8_int8\", \"convrot\": true}","handlingStrategy":"validation","validationCode":"for prefix, m in layer_markers.items():\n    fmt = m.get(\"format\")\n    ok = fmt == \"asym_w4a8_int8\" or (fmt == \"int8_tensorwise\" and m.get(\"_is_tensorwise_scalar\"))\n    assert ok, (prefix, fmt)","typeGuard":"def is_w4a8_loadable_marker(m: dict) -> bool:\n    fmt = m.get(\"format\")\n    return fmt == \"asym_w4a8_int8\" or (fmt == \"int8_tensorwise\" and bool(m.get(\"_is_tensorwise_scalar\")))","tryCatchPattern":null,"preventionTips":["Route checkpoints to configs by inspecting the set of marker formats present"],"tags":["quantization","checkpoint","validation","w4a8"],"backgroundTag":"unsupported-quantization-config","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}