sgl-project/sglang · error · ValueError

Incomplete Diffusers H3 fused parameters: {incomplete}

Error message

Incomplete Diffusers H3 fused parameters: {incomplete}

What it means

When loading a MiniMax H3 checkpoint in Diffusers fused format, the loader tracks a set of expected fused parameters; if some remain unfilled after processing (pending), the fused state dict is incomplete and it raises listing the missing names. This guards against silently partial weight loads.

Source

Thrown at python/sglang/multimodal_gen/runtime/models/dits/minimax_h3.py:125

        if merge_index is None:
            yield target_name, tensor
            continue

        assert merge_count is not None
        pending[target_name][merge_index] = tensor
        if len(pending[target_name]) != merge_count:
            continue

        merge_dim = 1 if target_name.endswith((".qweight", ".qzeros", ".scales")) else 0
        yield target_name, torch.cat(
            [pending[target_name][index] for index in range(merge_count)],
            dim=merge_dim,
        )
        del pending[target_name]

    if pending:
        incomplete = ", ".join(sorted(pending))
        raise ValueError(f"Incomplete Diffusers H3 fused parameters: {incomplete}")


_BF16_DTYPE = torch.bfloat16
_FP32_DTYPE = torch.float32
_MPS_MLP_TOKEN_CHUNK_SIZE = 128
# keep MPS activation chunks below the allocator high-watermark; CUDA keeps
# its fused full-sequence projection
_MPS_QKV_PROJECTION_TOKEN_CHUNK_SIZE = 128
_MPS_ATTENTION_QUERY_TOKEN_CHUNK_SIZE = 128

_MPS_EMBED_WEIGHT_PREFIXES = (
    "condition_proj",
    "video_patch_proj",
    "audio_patch_proj",
    "time_embedder",
    "token_refiner.final_norm",
)

View on GitHub (pinned to 0132848349)

Solutions

  1. Inspect the 'incomplete' names in the message and compare against the checkpoint's actual state_dict keys to see the naming mismatch
  2. Re-export or re-download the checkpoint with a matching Diffusers version, or use the native (non-Diffusers) weight layout
  3. Update the name-mapping table in _diffusers_h3_checkpoint to the new key names, mapping each pending tensor

Example fix

# before: checkpoint uses 'blocks.0.attn.qkv.weight' but map expects fused names
state = torch.load('h3_diffusers.pt')

# after: rename to expected fused layout or load native names
for k in list(state):
    state[k.replace('attn.qkv', 'attn.fused_qkv')] = state.pop(k)
Defensive patterns

Strategy: validation

Validate before calling

expected = set(EXPECTED_FUSED_NAMES)
actual = set(state_dict.keys())
missing = expected - actual
assert not missing, f'checkpoint missing fused keys: {sorted(missing)}'

Try / catch

try: load_diffusers_h3(sd)\nexcept ValueError as e: fallback_to_native_layout(sd) if 'Incomplete' in str(e) else raise

Prevention

When it happens

Trigger: Loading a Diffusers-format H3 checkpoint whose keys don't cover all expected fused parameters — renamed keys across Diffusers versions, a partially exported/sliced checkpoint, or a version skew between the loader's expected name map and the checkpoint.

Common situations: Upgrading Diffusers or sglang where fused qkv/mlp parameter names changed; using a community-converted or re-exported checkpoint missing some fused tensors; the test test_native_weight_names_and_grouped_qkv_reorder exercising name mapping with a stale fixture.

Related errors


AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28). Data as JSON: /api/errors/09c06ecddc33376a. Report an issue: GitHub.