sgl-project/sglang · error · RuntimeError
H3 conditioning projection produced no output
Error message
H3 conditioning projection produced no output
What it means
RuntimeError raised when the conditioning projection forward produced no output: self.weight is None and self.layers is empty. Normally prevented by the constructor's error 1682, this guards against a module constructed in a degraded/invalid state.
Source
Thrown at python/sglang/multimodal_gen/runtime/models/encoders/minimax_h3_qwen3vl.py:186
def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
if int(hidden_states.shape[-1]) != self.input_dim:
raise ValueError(
f"H3 conditioning projection expects width {self.input_dim}, "
f"got {int(hidden_states.shape[-1])}"
)
normalized = (hidden_states.float() - self.mean_in) / self.std_in
projected = normalized @ self.weight if self.weight is not None else None
if self.layers:
residual = normalized.to(self.layers[0].weight.dtype)
for index, layer in enumerate(self.layers):
residual = layer(residual)
if index + 1 < len(self.layers):
residual = F.gelu(residual)
residual = residual.float()
projected = residual if projected is None else projected + residual
if projected is None:
raise RuntimeError("H3 conditioning projection produced no output")
output = projected * self.std_out + self.mean_out
if self.sink_out is not None and int(output.shape[-2]) > 0:
output[..., 0, :] = self.sink_out
return output
class MiniMaxH3Qwen3VLEncoder(TextEncoder):
"""Qwen3-VL multimodal backbone producing MiniMax H3 conditioning.
The component loader builds and loads this module under the encoder-folding
TP group. A TP=1/SP=8 DiT deployment therefore shards the encoder over all
eight otherwise-idle ranks during encoding.
"""
# The inherited text-layer list covers Qwen's language stack; reference
# modes also execute the embedded visual tower.
layer_names = [
*TextEncoder.layer_names,View on GitHub (pinned to 0132848349)
Solutions
- Reconstruct the projection from a valid checkpoint and fix the underlying 1682 condition
- Don't bypass __init__ (e.g. via pickle/deepcopy tricks) when cloning the module
Defensive patterns
Strategy: validation
Validate before calling
assert proj.weight is not None or len(proj.layers) > 0, "projection cannot produce output"
Prevention
- Never bypass __init__ when cloning modules
- Fail fast at construction on empty projections
When it happens
Trigger: Calling forward() on a projection built without W or MLP layers (e.g. object created bypassing __init__ validation, or state mutated after construction).
Common situations: Rare defensive path; most commonly seen after manually constructing the module or after a failed/partial initialization swallowed earlier errors.
Related errors
- H3 conditioning projection {bias_name} has shape {tuple(bias
- H3 conditioning projection contains unsupported tensors: {so
- H3 conditioning projection has neither W nor an MLP
- H3 conditioning projection MLP outputs width {layer_input_di
- H3 conditioning projection W has shape {tuple(self.weight.sh
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/c12f839aa2d36658.
Report an issue: GitHub.