{"record":{"id":"8e7f9311262dfb32","repo":"sgl-project/sglang","slug":"comfy-nvfp4-layer-prefix-r-must-request-full-pre","errorCode":null,"errorMessage":"Comfy NVFP4 layer {prefix!r} must request full_precision_matrix_mult","messagePattern":"Comfy NVFP4 layer (.+?) must request full_precision_matrix_mult","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/layers/quantization/comfy_nvfp4.py","lineNumber":189,"sourceCode":"        super().__init__(\n            is_checkpoint_nvfp4_serialized=True,\n            group_size=16,\n            exclude_modules=[],\n            checkpoint_uses_comfy_quantization=True,\n        )\n        self.layer_markers = layer_markers\n        self.selected: list[str] = []\n        for prefix, marker in layer_markers.items():\n            marker_format = marker.get(\"format\")\n            if marker_format == \"int8_tensorwise\" and marker.get(\"_is_rowwise\"):\n                continue\n            if marker_format != \"nvfp4\":\n                raise ValueError(\n                    f\"Unsupported Comfy NVFP4 companion for {prefix!r}: \"\n                    f\"{marker_format!r}\"\n                )\n            if marker.get(\"full_precision_matrix_mult\") is not True:\n                raise ValueError(\n                    f\"Comfy NVFP4 layer {prefix!r} must request \"\n                    \"full_precision_matrix_mult\"\n                )\n\n    @classmethod\n    def get_name(cls) -> str:\n        return \"comfy_nvfp4\"\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 0\n\n    @classmethod\n    def get_config_filenames(cls) -> list[str]:","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/layers/quantization/comfy_nvfp4.py#L171-L207","documentation":"Every nvfp4-format layer marker must explicitly set full_precision_matrix_mult to True, since this runtime implements the full-precision matmul dequant path. A marker missing the flag or setting it False raises.","triggerScenarios":"An nvfp4 layer marker where marker.get(\"full_precision_matrix_mult\") is not True — flag missing or False in the safetensors metadata.","commonSituations":"Checkpoints quantized by tools that don't emit the full_precision_matrix_mult flag; hand-written or older-format markers.","solutions":["Regenerate/re-save the checkpoint so nvfp4 markers include full_precision_matrix_mult: true","Patch the marker metadata for the listed prefix if you control the files","Use a ComfyUI export path known to set the flag"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"for p, m in layer_markers.items():\n    if m.get(\"format\") == \"nvfp4\" and m.get(\"full_precision_matrix_mult\") is not True:\n        raise SystemExit(f\"{p} missing full_precision_matrix_mult marker\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-export checkpoints with the full_precision_matrix_mult flag set on nvfp4 layers"],"tags":["quantization","nvfp4","comfy","metadata-validation"],"backgroundTag":"checkpoint-metadata-validation-failed","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}