{"record":{"id":"181fd3136cd467f3","repo":"sgl-project/sglang","slug":"sana-wm-is-a-ti2v-world-model-and-requires-conditi","errorCode":null,"errorMessage":"SANA-WM is a TI2V world model and requires condition_image for first-frame conditioning. Provide --image-path, --condition-image, or the equivalent API image input.","messagePattern":"SANA-WM is a TI2V world model and requires condition_image for first-frame conditioning\\. Provide --image-path, --condition-image, or the equivalent API image input\\.","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":2268,"sourceCode":"        log_sana_wm_tensor_stats(\"latents.initial_noise\", latents)\n\n        batch.raw_latent_shape = latent_shape\n\n        condition_image = getattr(batch, \"condition_image\", None)\n        if condition_image is not None:\n            try:\n                latents = self._splice_first_frame(\n                    latents, condition_image, dtype, device, batch=batch\n                )\n                self.log_info(\"First-frame spliced into noise latents.\")\n            except Exception as e:\n                raise RuntimeError(\n                    \"SANA-WM first-frame conditioning failed; refusing to \"\n                    \"continue with pure-noise latents because that produces \"\n                    \"misleading low-quality output.\"\n                ) from e\n        else:\n            raise ValueError(\n                \"SANA-WM is a TI2V world model and requires condition_image \"\n                \"for first-frame conditioning. Provide --image-path, \"\n                \"--condition-image, or the equivalent API image input.\"\n            )\n\n        batch.latents = latents\n\n        # The released SANA-WM checkpoint is camera-conditioned. Official\n        # inference requires a camera trajectory or action DSL. If the SGLang\n        # request omits one, use a static identity trajectory so the UCPE path\n        # remains active instead of silently dropping all camera conditioning.\n        try:\n            camera_conditions, chunk_plucker, camera_source = (\n                self._build_camera_conditioning(\n                    batch,\n                    batch_size=batch_size,\n                    num_frames=num_frames,\n                    latent_shape=latent_shape,","sourceCodeStart":2250,"sourceCodeEnd":2286,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/multimodal_gen/runtime/pipelines_core/stages/model_specific_stages/sana_wm/base.py#L2250-L2286","documentation":"SANA-WM is a text-image-to-video (TI2V) world model: it cannot generate from pure noise and requires a condition_image for first-frame conditioning. Omitting it raises this ValueError immediately.","triggerScenarios":"Calling forward without condition_image / --image-path / --condition-image — i.e. trying to run image-free text-to-video.","commonSituations":"Reusing a T2V server config or prompt-only CLI invocation against the SANA-WM model; omitting the image field in API requests.","solutions":["Provide a first-frame image via --image-path or --condition-image (CLI) or the image field in the API request.","If you wanted pure text-to-video, switch to a T2V model checkpoint instead of SANA-WM.","Verify the image is loaded and actually reaches the stage (not dropped by an upstream stage)."],"exampleFix":"# before\npython -m sglang.launch_server --model sana-wm ...  # prompt-only request\n# after\ncurl ... -F image=@first_frame.png -d 'text=...'","handlingStrategy":"validation","validationCode":"if condition_image is None:\n    raise ValueError('SANA-WM requires a first-frame image; attach image to the request')","typeGuard":"def request_has_condition_image(req) -> bool:\n    return req.get('image') is not None or req.get('condition_image') is not None","tryCatchPattern":null,"preventionTips":["Make the image field required in request schemas for SANA-WM deployments.","Use a T2V model when no first frame is available."],"tags":["sglang","sana-wm","condition-image","missing-input","ti2v"],"backgroundTag":"missing-required-parameter","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}