sgl-project/sglang · error · ValueError

Prepacked latent-frame camera_conditions require chunk_pluck

Error message

Prepacked latent-frame camera_conditions require chunk_plucker for this SANA-WM checkpoint. Pass chunk_plucker with shape (B,48,T,H,W), or pass original-frame camera_conditions so SGLang can derive chunk_plucker.

What it means

When camera_conditions has T equal to the latent frame count (prepacked), the stage cannot derive chunk_plucker itself. This checkpoint requires chunk_plucker (B,48,T_lat,H,W), so passing prepacked conditions without it raises this error.

Source

Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/sana_wm/base.py:1895

                    f"got {tuple(camera_conditions.shape)}"
                )
            if camera_conditions.shape[0] == 1 and batch_size > 1:
                camera_conditions = camera_conditions.expand(batch_size, -1, -1)
            if camera_conditions.shape[0] != batch_size:
                raise ValueError(
                    "camera_conditions batch dimension must be 1 or match "
                    f"request batch size {batch_size}, got "
                    f"{camera_conditions.shape[0]}."
                )
            if camera_conditions.shape[-1] != 20:
                raise ValueError(
                    "camera_conditions must have last dimension 20, got "
                    f"{tuple(camera_conditions.shape)}"
                )
            if camera_conditions.shape[1] == T_lat:
                source = "prepacked"
                if chunk_plucker is None and requires_chunk_plucker:
                    raise ValueError(
                        "Prepacked latent-frame camera_conditions require "
                        "chunk_plucker for this SANA-WM checkpoint. Pass "
                        "chunk_plucker with shape (B,48,T,H,W), or pass "
                        "original-frame camera_conditions so SGLang can "
                        "derive chunk_plucker."
                    )
            else:
                source = "prebuilt_original_frames"
                original_camera_conditions = self._pad_or_trim_frames(
                    camera_conditions, num_frames
                )
                camera_conditions = self._latent_frame_camera_conditions(
                    original_camera_conditions,
                    num_frames=num_frames,
                    latent_frames=T_lat,
                    vae_temporal_stride=vae_temporal_stride,
                )
                if chunk_plucker is None:

View on GitHub (pinned to 0132848349)

Solutions

  1. Pass original-frame camera_conditions (T == original frames) so SGLang derives chunk_plucker itself.
  2. Or export chunk_plucker of shape (B,48,T,H,W) alongside the prepacked conditions.
  3. Or downgrade/choose a checkpoint that does not require chunk plücker embeddings.

Example fix

# before
stage.forward(..., diffusers_kwargs={'camera_conditions': latent_rate_cond})
# after
stage.forward(..., diffusers_kwargs={'camera_conditions': latent_rate_cond, 'chunk_plucker': plucker})
Defensive patterns

Strategy: validation

Validate before calling

if camera_conditions.shape[1] == T_lat and chunk_plucker is None:
    raise ValueError('pass original-frame conditions or add chunk_plucker')  # fail before submit

Prevention

When it happens

Trigger: Passing camera_conditions already resampled to latent-frame length (shape[1] == T_lat) without a chunk_plucker argument, on a checkpoint whose model needs plücker embeddings (requires_chunk_plucker=True).

Common situations: Replaying cached/precomputed latent-rate camera conditioning from a diffusers pipeline into SGLang without also exporting the plücker chunk tensor.

Related errors


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