{"record":{"id":"7d0f72124a503d35","repo":"sgl-project/sglang","slug":"unsupported-quantized-linear-marker-for-prefix-r","errorCode":null,"errorMessage":"Unsupported quantized linear marker for {prefix!r}","messagePattern":"Unsupported quantized linear marker for (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"python/sglang/multimodal_gen/runtime/layers/quantization/comfy_nvfp4.py","lineNumber":237,"sourceCode":"    ) -> QuantizeMethodBase | None:\n        marker = self.layer_markers.get(prefix)\n        if isinstance(layer, VocabParallelEmbedding):\n            if marker is None:\n                return None\n            if marker.get(\"format\") != \"int8_tensorwise\" or not marker.get(\n                \"_is_rowwise\"\n            ):\n                raise ValueError(\n                    f\"Unsupported quantized embedding marker for {prefix!r}: {marker}\"\n                )\n            self.selected.append(prefix)\n            return ComfyRowwiseInt8EmbeddingMethod()\n        if not isinstance(layer, LinearBase):\n            return None\n        if marker is None:\n            return UnquantizedLinearMethod()\n        if marker.get(\"format\") != \"nvfp4\":\n            raise ValueError(f\"Unsupported quantized linear marker for {prefix!r}\")\n        self.selected.append(prefix)\n        return ComfyFullPrecisionNvfp4LinearMethod(\n            self,\n            has_pre_quant_scale=bool(marker.get(\"_has_pre_quant_scale\")),\n        )\n\n    def quantizes_embedding(self, prefix: str) -> bool:\n        marker = self.layer_markers.get(prefix)\n        return bool(\n            marker is not None\n            and marker.get(\"format\") == \"int8_tensorwise\"\n            and marker.get(\"_is_rowwise\")\n        )\n\n\n__all__ = [\n    \"ComfyFullPrecisionNvfp4LinearMethod\",\n    \"ComfyNvfp4Config\",","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/layers/quantization/comfy_nvfp4.py#L219-L255","documentation":"Raised by ComfyNvfp4Config.get_quant_method when a LinearBase layer has a quantization marker whose format is not 'nvfp4'. This config dispatches only nvfp4-serialized linear layers; markers with other formats (or unquantized layers mislabeled in the checkpoint) fail fast during weight loading.","triggerScenarios":"Loading a checkpoint where a linear layer's marker format is e.g. 'int8_tensorwise' or 'awq' while the model runs under the comfy_nvfp4 quantization config.","commonSituations":"Mixing quantization schemes in one ComfyUI export; stale layer_markers dict from a previous quantization run; renaming formats between exporter versions.","solutions":["Re-quantize/export the model so all linear markers have format 'nvfp4'","Strip the offending marker so marker is None and the layer falls back to UnquantizedLinearMethod","Route layers with other formats through a config that supports them (e.g. kitchen_int8)"],"exampleFix":"// before\n{\"format\": \"int8_tensorwise\"}\n// after\n{\"format\": \"nvfp4\", \"_has_pre_quant_scale\": false}","handlingStrategy":"validation","validationCode":"for prefix, m in layer_markers.items():\n    if is_linear_prefix(prefix) and m is not None:\n        assert m.get(\"format\") == \"nvfp4\", (prefix, m)","typeGuard":"def is_nvfp4_marker(m: dict) -> bool:\n    return m.get(\"format\") == \"nvfp4\"","tryCatchPattern":null,"preventionTips":["Use one quantization scheme per comfy_nvfp4 checkpoint","Run a preflight marker-format audit before model load"],"tags":["quantization","checkpoint","linear-layer","model-load"],"backgroundTag":"unsupported-quantization-config","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}