sgl-project/sglang · critical · ValueError
H3 conditioning projection has neither W nor an MLP
Error message
H3 conditioning projection has neither W nor an MLP
What it means
The conditioning projection module was built with neither a direct W matrix nor any MLP layers — i.e. the provided tensors contained nothing usable for projection. This is a hard configuration error: the module cannot compute anything.
Source
Thrown at python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py:152
if weight.ndim != 2 or int(weight.shape[1]) != layer_input_dim:
raise ValueError(
f"H3 conditioning projection {weight_name} cannot follow "
f"width {layer_input_dim}: got {tuple(weight.shape)}"
)
if bias is not None and tuple(bias.shape) != (int(weight.shape[0]),):
raise ValueError(
f"H3 conditioning projection {bias_name} has shape "
f"{tuple(bias.shape)}, expected ({int(weight.shape[0])},)"
)
layers.append(_FrozenLinear(weight, bias))
layer_input_dim = int(weight.shape[0])
if tensors:
raise ValueError(
"H3 conditioning projection contains unsupported tensors: "
f"{sorted(tensors)}"
)
if self.weight is None and not layers:
raise ValueError("H3 conditioning projection has neither W nor an MLP")
if layers and layer_input_dim != self.output_dim:
raise ValueError(
f"H3 conditioning projection MLP outputs width {layer_input_dim}, "
f"expected {self.output_dim}"
)
if self.weight is not None and tuple(self.weight.shape) != (
self.input_dim,
self.output_dim,
):
raise ValueError(
"H3 conditioning projection W has shape "
f"{tuple(self.weight.shape)}, expected "
f"({self.input_dim}, {self.output_dim})"
)
self.layers = nn.ModuleList(layers)
def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
if int(hidden_states.shape[-1]) != self.input_dim:View on GitHub (pinned to 0132848349)
Solutions
- Verify the file actually contains projection weight tensors (load and list keys)
- Point --component-paths.conditioning_projection at the correct projection checkpoint
- If using a >=32B model where the projection is built-in, remove the override so the built-in path is used
Defensive patterns
Strategy: validation
Validate before calling
sd = torch.load(proj_path)
assert any(k.endswith("weight") for k in sd), "projection checkpoint has no weights" Prevention
- Check the file is non-trivial in size and contains weight keys before passing it
- Keep official projection checkpoints alongside their model release
When it happens
Trigger: MiniMaxH3ConditioningProjection constructed with an empty state dict, or one containing only normalization statistics (mean/std) and no weight matrices.
Common situations: Empty or wrong safetensors file passed via --component-paths.conditioning_projection; pointing at a metadata-only file; the projection tensors were filtered out by a prefix handler.
Related errors
- H3 conditioning projection {bias_name} has shape {tuple(bias
- H3 conditioning projection contains unsupported tensors: {so
- H3 conditioning projection MLP outputs width {layer_input_di
- H3 conditioning projection W has shape {tuple(self.weight.sh
- H3 conditioning projection expects width {self.input_dim}, g
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/8b735193a01abb17.
Report an issue: GitHub.