sgl-project/sglang · error · ValueError
Comfy NVFP4 layer {prefix!r} must request full_precision_mat
Error message
Comfy NVFP4 layer {prefix!r} must request full_precision_matrix_mult What it means
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.
Source
Thrown at python/sglang/multimodal_gen/runtime/layers/quantization/comfy_nvfp4.py:189
super().__init__(
is_checkpoint_nvfp4_serialized=True,
group_size=16,
exclude_modules=[],
checkpoint_uses_comfy_quantization=True,
)
self.layer_markers = layer_markers
self.selected: list[str] = []
for prefix, marker in layer_markers.items():
marker_format = marker.get("format")
if marker_format == "int8_tensorwise" and marker.get("_is_rowwise"):
continue
if marker_format != "nvfp4":
raise ValueError(
f"Unsupported Comfy NVFP4 companion for {prefix!r}: "
f"{marker_format!r}"
)
if marker.get("full_precision_matrix_mult") is not True:
raise ValueError(
f"Comfy NVFP4 layer {prefix!r} must request "
"full_precision_matrix_mult"
)
@classmethod
def get_name(cls) -> str:
return "comfy_nvfp4"
@classmethod
def get_supported_act_dtypes(cls) -> list[torch.dtype]:
return [torch.bfloat16, torch.float16]
@classmethod
def get_min_capability(cls) -> int:
return 0
@classmethod
def get_config_filenames(cls) -> list[str]:View on GitHub (pinned to 0132848349)
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
Defensive patterns
Strategy: validation
Validate before calling
for p, m in layer_markers.items():
if m.get("format") == "nvfp4" and m.get("full_precision_matrix_mult") is not True:
raise SystemExit(f"{p} missing full_precision_matrix_mult marker") Prevention
- Re-export checkpoints with the full_precision_matrix_mult flag set on nvfp4 layers
When it happens
Trigger: An nvfp4 layer marker where marker.get("full_precision_matrix_mult") is not True — flag missing or False in the safetensors metadata.
Common situations: Checkpoints quantized by tools that don't emit the full_precision_matrix_mult flag; hand-written or older-format markers.
Related errors
- Comfy full_precision_matrix_mult does not support fused line
- Unsupported Comfy NVFP4 companion for {prefix!r}: {marker_fo
- comfy_nvfp4 is inferred from per-layer checkpoint metadata;
- Type must match: {self.a_dtype} != {self.b_dtype}
- nvfp4_gemm_swiglu_nvfp4_quant currently supports NVFP4 input
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/8e7f9311262dfb32.
Report an issue: GitHub.