{"record":{"id":"582a10684cb936c6","repo":"sgl-project/sglang","slug":"unsupported-comfy-nvfp4-companion-for-prefix-r","errorCode":null,"errorMessage":"Unsupported Comfy NVFP4 companion for {prefix!r}: {marker_format!r}","messagePattern":"Unsupported Comfy NVFP4 companion for (.+?): (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/layers/quantization/comfy_nvfp4.py","lineNumber":184,"sourceCode":"    \"\"\"Dispatch full-precision Comfy NVFP4 linears and their INT8 embedding.\"\"\"\n\n    checkpoint_uses_comfy_quantization = True\n\n    def __init__(self, layer_markers: dict[str, dict[str, Any]]) -> None:\n        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","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/layers/quantization/comfy_nvfp4.py#L166-L202","documentation":"ComfyNvfp4Config validates companion layer markers: int8_tensorwise markers are allowed only when marked _is_rowwise; every other marker must have format \"nvfp4\". Any other companion format raises with the offending prefix and format.","triggerScenarios":"Constructing ComfyNvfp4Config with layer_markers containing a companion whose format is neither nvfp4 nor the allowed int8_tensorwise+_is_rowwise combination (e.g. fp8, plain int8_tensorwise without rowwise flag).","commonSituations":"Mixed-precision Comfy checkpoints combining nvfp4 with other quant formats; checkpoint metadata saved by an incompatible ComfyUI version.","solutions":["Inspect the reported prefix's safetensors marker and re-quantize that layer to nvfp4 (or int8_tensorwise with _is_rowwise)","Export the checkpoint with only supported companion formats","Use the config class matching the actual formats"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"for p, m in layer_markers.items():\n    fmt = m.get(\"format\")\n    ok = fmt == \"nvfp4\" or (fmt == \"int8_tensorwise\" and m.get(\"_is_rowwise\"))\n    if not ok:\n        raise SystemExit(f\"unsupported companion {p}: {fmt}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate companion markers before config construction","Re-quantize mixed-format layers to nvfp4"],"tags":["quantization","nvfp4","comfy","mixed-precision"],"backgroundTag":"unsupported-checkpoint-format","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}