sgl-project/sglang · error · ValueError
chunk_plucker batch dimension must be 1 or match request bat
Error message
chunk_plucker batch dimension must be 1 or match request batch size {batch_size}, got {chunk_plucker.shape[0]}. What it means
After normalizing chunk_plucker to 5-D, the batch dim must be 1 (broadcast to the request batch) or exactly the request batch size.
Source
Thrown at python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/sana_wm/base.py:2134
)
if chunk_plucker is not None:
chunk_plucker = (
chunk_plucker
if isinstance(chunk_plucker, torch.Tensor)
else torch.as_tensor(chunk_plucker)
).to(device=device, dtype=dtype)
if chunk_plucker.dim() == 4:
chunk_plucker = chunk_plucker.unsqueeze(0)
if chunk_plucker.shape[0] == 1 and batch_size > 1:
chunk_plucker = chunk_plucker.expand(batch_size, -1, -1, -1, -1)
if chunk_plucker.dim() != 5:
raise ValueError(
"chunk_plucker must have shape (48,T,H,W) or "
f"(B,48,T,H,W), got {tuple(chunk_plucker.shape)}"
)
if chunk_plucker.shape[0] != batch_size:
raise ValueError(
"chunk_plucker batch dimension must be 1 or match "
f"request batch size {batch_size}, got "
f"{chunk_plucker.shape[0]}."
)
expected_chunk_shape = (batch_size, 48, T_lat, sp_h, sp_w)
if tuple(chunk_plucker.shape) != expected_chunk_shape:
raise ValueError(
"chunk_plucker shape mismatch for SANA-WM: expected "
f"{expected_chunk_shape}, got {tuple(chunk_plucker.shape)}."
)
if camera_conditions is not None:
camera_conditions = camera_conditions.to(device=device, dtype=dtype)
return camera_conditions, chunk_plucker, source
def _prepare_timesteps(
self,View on GitHub (pinned to 0132848349)
Solutions
- Slice chunk_plucker to the request batch size.
- Or pass a single (1,48,T,H,W) volume to broadcast across requests.
- Recompute plücker whenever the batch composition changes.
Example fix
# before plucker = export_all(4) # after plucker = export_all(4)[:batch_size]
Defensive patterns
Strategy: validation
Validate before calling
if chunk_plucker.shape[0] not in (1, batch_size):
chunk_plucker = chunk_plucker[:batch_size] Prevention
- Store plücker volumes keyed by request batch composition.
- Broadcast with a leading 1 batch dim when possible.
When it happens
Trigger: Providing B plücker volumes with B not in {1, batch_size}, e.g. 4 exported ray maps for a 2-request batch.
Common situations: Caching per-video plücker tensors and replaying them against a differently-sized request batch.
Related errors
- camera_conditions batch dimension must be 1 or match request
- Prepacked latent-frame camera_conditions require chunk_pluck
- chunk_plucker must have shape (48,T,H,W) or (B,48,T,H,W), go
- chunk_plucker shape mismatch for SANA-WM: expected {expected
- SANA-WM does not support tensor parallelism yet. Use --num-g
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/83e652f8ad88ac7e.
Report an issue: GitHub.