{"record":{"id":"5940f80af6927137","repo":"sgl-project/sglang","slug":"unsupported-comfy-w4a4-format-for-prefix-r-mar","errorCode":null,"errorMessage":"Unsupported Comfy W4A4 format for {prefix!r}: {marker_format!r}","messagePattern":"Unsupported Comfy W4A4 format for (.+?): (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/layers/quantization/configs/kitchen_w4a4_config.py","lineNumber":66,"sourceCode":"                )\n        self.layer_markers = layer_markers\n        self.checkpoint_uses_native_qkv_layout = True\n        self.selected: list[str] = []\n        int8_markers = {\n            prefix: marker\n            for prefix, marker in layer_markers.items()\n            if marker.get(\"format\") == \"int8_tensorwise\"\n        }\n        self._int8_config = (\n            KitchenInt8Config(layer_markers=int8_markers) if int8_markers else None\n        )\n\n        for prefix, marker in layer_markers.items():\n            marker_format = marker.get(\"format\")\n            if marker_format == \"int8_tensorwise\":\n                continue\n            if marker_format != \"convrot_w4a4\":\n                raise ValueError(\n                    f\"Unsupported Comfy W4A4 format for {prefix!r}: \"\n                    f\"{marker_format!r}\"\n                )\n            self._parse_marker(prefix, marker)\n\n    @classmethod\n    def get_name(cls) -> str:\n        return \"kitchen_w4a4\"\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:\n        return 75\n\n    @classmethod","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/layers/quantization/configs/kitchen_w4a4_config.py#L48-L84","documentation":"Every layer marker passed to KitchenW4A4Config must be either 'int8_tensorwise' (delegated to the companion INT8 config) or 'convrot_w4a4'. Any other format string aborts config construction.","triggerScenarios":"A layer_markers entry with format like 'nvfp4' or 'asym_w4a8_int8' while instantiating KitchenW4A4Config.","commonSituations":"Mixed-quantization exports; picking the wrong quant config name for the checkpoint's actual scheme.","solutions":["Re-export the checkpoint with only convrot_w4a4 / int8_tensorwise layers","Load under the config matching the actual marker format (comfy_nvfp4, kitchen_w4a8, ...)"],"exampleFix":"// before\n{\"format\": \"nvfp4\"}\n// after\n{\"format\": \"convrot_w4a4\", \"convrot_groupsize\": 256, \"linear_dtype\": \"int4\"}","handlingStrategy":"validation","validationCode":"for prefix, m in layer_markers.items():\n    fmt = m.get(\"format\")\n    assert fmt in (\"int8_tensorwise\", \"convrot_w4a4\"), (prefix, fmt)","typeGuard":"def is_w4a4_loadable_marker(m: dict) -> bool:\n    return m.get(\"format\") in (\"int8_tensorwise\", \"convrot_w4a4\")","tryCatchPattern":null,"preventionTips":["Audit marker formats before choosing the quant config class"],"tags":["quantization","checkpoint","config-validation"],"backgroundTag":"unsupported-quantization-config","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}