{"record":{"id":"83e652f8ad88ac7e","repo":"sgl-project/sglang","slug":"chunk-plucker-batch-dimension-must-be-1-or-match-r","errorCode":null,"errorMessage":"chunk_plucker batch dimension must be 1 or match request batch size {batch_size}, got {chunk_plucker.shape[0]}.","messagePattern":"chunk_plucker batch dimension must be 1 or match request batch size (.+?), got (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/sana_wm/base.py","lineNumber":2134,"sourceCode":"                )\n\n        if chunk_plucker is not None:\n            chunk_plucker = (\n                chunk_plucker\n                if isinstance(chunk_plucker, torch.Tensor)\n                else torch.as_tensor(chunk_plucker)\n            ).to(device=device, dtype=dtype)\n            if chunk_plucker.dim() == 4:\n                chunk_plucker = chunk_plucker.unsqueeze(0)\n            if chunk_plucker.shape[0] == 1 and batch_size > 1:\n                chunk_plucker = chunk_plucker.expand(batch_size, -1, -1, -1, -1)\n            if chunk_plucker.dim() != 5:\n                raise ValueError(\n                    \"chunk_plucker must have shape (48,T,H,W) or \"\n                    f\"(B,48,T,H,W), got {tuple(chunk_plucker.shape)}\"\n                )\n            if chunk_plucker.shape[0] != batch_size:\n                raise ValueError(\n                    \"chunk_plucker batch dimension must be 1 or match \"\n                    f\"request batch size {batch_size}, got \"\n                    f\"{chunk_plucker.shape[0]}.\"\n                )\n            expected_chunk_shape = (batch_size, 48, T_lat, sp_h, sp_w)\n            if tuple(chunk_plucker.shape) != expected_chunk_shape:\n                raise ValueError(\n                    \"chunk_plucker shape mismatch for SANA-WM: expected \"\n                    f\"{expected_chunk_shape}, got {tuple(chunk_plucker.shape)}.\"\n                )\n\n        if camera_conditions is not None:\n            camera_conditions = camera_conditions.to(device=device, dtype=dtype)\n\n        return camera_conditions, chunk_plucker, source\n\n    def _prepare_timesteps(\n        self,","sourceCodeStart":2116,"sourceCodeEnd":2152,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/sana_wm/base.py#L2116-L2152","documentation":"After normalizing chunk_plucker to 5-D, the batch dim must be 1 (broadcast to the request batch) or exactly the request batch size.","triggerScenarios":"Providing B plücker volumes with B not in {1, batch_size}, e.g. 4 exported ray maps for a 2-request batch.","commonSituations":"Caching per-video plücker tensors and replaying them against a differently-sized request batch.","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."],"exampleFix":"# before\nplucker = export_all(4)\n# after\nplucker = export_all(4)[:batch_size]","handlingStrategy":"validation","validationCode":"if chunk_plucker.shape[0] not in (1, batch_size):\n    chunk_plucker = chunk_plucker[:batch_size]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Store plücker volumes keyed by request batch composition.","Broadcast with a leading 1 batch dim when possible."],"tags":["sglang","sana-wm","chunk-plucker","batch-size-mismatch"],"backgroundTag":"batch-dimension-mismatch","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}