{"record":{"id":"9ad8c1a9a4264f96","repo":"sgl-project/sglang","slug":"serialized-kitchen-int8-layer-prefix-r-must-set","errorCode":null,"errorMessage":"Serialized kitchen_int8 layer {prefix!r} must set convrot=true","messagePattern":"Serialized kitchen_int8 layer (.+?) must set convrot=true","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/layers/quantization/configs/kitchen_int8_config.py","lineNumber":54,"sourceCode":"                f\"kitchen_int8 group_size must be one of {_SUPPORTED_GROUP_SIZES}, \"\n                f\"got {group_size}\"\n            )\n        self.group_size = group_size\n        self.ignored_layers = ignored_layers or []\n        self.packed_modules_mapping = packed_modules_mapping or {}\n        self.layer_markers = layer_markers\n        self.is_checkpoint_int8_serialized = layer_markers is not None\n        self.checkpoint_uses_native_qkv_layout = self.is_checkpoint_int8_serialized\n        self._serialized_group_sizes: dict[str, int] = {}\n        if layer_markers is not None:\n            for prefix, marker in layer_markers.items():\n                if marker.get(\"format\") != \"int8_tensorwise\":\n                    raise ValueError(\n                        f\"Unsupported Comfy INT8 format for {prefix!r}: \"\n                        f\"{marker.get('format')!r}\"\n                    )\n                if marker.get(\"convrot\") is not True:\n                    raise ValueError(\n                        f\"Serialized kitchen_int8 layer {prefix!r} must set \"\n                        \"convrot=true\"\n                    )\n                marker_group_size = marker.get(\"convrot_groupsize\")\n                if marker_group_size not in _SUPPORTED_GROUP_SIZES:\n                    raise ValueError(\n                        f\"Serialized kitchen_int8 layer {prefix!r} must declare \"\n                        f\"convrot_groupsize in {_SUPPORTED_GROUP_SIZES}, got \"\n                        f\"{marker_group_size!r}\"\n                    )\n                self._serialized_group_sizes[prefix] = marker_group_size\n        # Which layers actually got quantized is worth stating plainly in the\n        # log: a silent fallback to BF16 looks exactly like a slow kernel.\n        self.selected: list[str] = []\n        self.skipped: list[str] = []\n        self._processed = 0\n        self._quantized_bytes = 0\n","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/layers/quantization/configs/kitchen_int8_config.py#L36-L72","documentation":"Every serialized kitchen_int8 marker must explicitly set convrot=true. ConvRot (convolution-style weight rotation) is mandatory for the kitchen_int8 kernel path; a missing or false value means the checkpoint was produced by an incompatible or older exporter.","triggerScenarios":"Passing a layer_markers entry with 'convrot' absent, False, or a truthy non-True value while format is 'int8_tensorwise'.","commonSituations":"Hand-writing marker dicts and forgetting the convrot key; using an older Comfy exporter that did not emit convrot flags.","solutions":["Re-export with a current exporter that sets convrot: true","Manually add \"convrot\": true to each marker if you know the weights were ConvRot-quantized"],"exampleFix":"// before\n{\"format\": \"int8_tensorwise\", \"convrot_groupsize\": 128}\n// after\n{\"format\": \"int8_tensorwise\", \"convrot\": true, \"convrot_groupsize\": 128}","handlingStrategy":"validation","validationCode":"for prefix, m in layer_markers.items():\n    assert m.get(\"convrot\") is True, f\"{prefix} missing convrot=true\"","typeGuard":"def has_convrot(m: dict) -> bool:\n    return m.get(\"convrot\") is True","tryCatchPattern":null,"preventionTips":["Write markers with a single serializer that always emits convrot"],"tags":["quantization","checkpoint","convrot"],"backgroundTag":"unsupported-quantization-config","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}