Install and start
Video uploads require TorchCodec. Sound output also needs a checkpoint with a sound tokenizer and theffmpeg and ffprobe binaries.
For dense attention, match the fa3-fwd wheel to PyTorch’s CUDA major version. Use fa3-fwd==0.0.2 with CUDA 12 and fa3-fwd==0.0.3 with CUDA 13. Check the ABI with python -c "import fa3_fwd_interface". If the import fails, the server warns and uses FlashInfer ragged prefill for dense attention. On CUDA, bf16 VAE decode requires cuDNN 9.16 or newer. Earlier versions use fp32.
cosmos3
Text, image, video → image, video, audio, action. The default cosmos3_nano.yaml uses 1 GPU. The weights use OpenMDW-1.1.
cosmos3_droid
Text, image → action, video. The default cosmos3_droid.yaml uses 1 GPU. The weights use OpenMDW-1.1.
cosmos3_edge
Text, image, video → text, image, video, action. The default cosmos3_edge.yaml uses 1 GPU. The weights use OpenMDW-1.1.
cosmos3_edge_droid
Text, image → action, video. The default cosmos3_edge_droid.yaml uses 1 GPU. The weights use OpenMDW-1.1.
cosmos3_super
Text, image, video → image, video, audio. The default cosmos3_super_tp2.yaml uses 2 GPUs. The weights use OpenMDW-1.1.
cosmos3_super_i2v_4step
Text, image → video. The default cosmos3_super_i2v_4step_tp2.yaml uses 2 GPUs. The weights use OpenMDW-1.1.
cosmos3_super_t2i_4step
Text → image. The default cosmos3_super_t2i_4step_tp2.yaml uses 2 GPUs. The weights use OpenMDW-1.1.
Send a request
Run either client example in a second terminal after/health returns 200.
Generate a clip
Write the returned MP4 to disk. Python SDKPredict a DROID action chunk
From the root of an M* source checkout, prepare the inputs for either request with the DROID client helpers. Use three RGB frames from the same observation. The helper stacks the wrist view above the two half-size exterior views, resizes the composite to 640×540 and reflection-pads it to 736×544. Both policies take the task, camera layout, duration, frame rate and resolution. Nano takes a plain caption and Edge takes a JSON caption.Animate a first frame
Supply a first frame asscene.png. Write the returned MP4 to disk.
Python SDK
Generate an image
Save the returned PNG. Python SDKImage and video chat
cosmos3_edge serves POST /v1/chat/completions with image and video content parts, streamed. The Edge DROID checkpoint has no reasoner. extra_body takes enable_thinking (a <think> block opens by default), top_k, repetition_penalty, penalize_prompt, video_fps and video_num_frames. max_tokens defaults to 2048, and min_p is refused unless the checkpoint’s generation_config.json sets one.
Streaming rollout
Long clips can be generated window by window, each window streamed as soon as it is decoded. The deployment must setenable_windowed_video: true, which configs/cosmos3_edge.yaml and configs/cosmos3_nano_ar.yaml do:
model_kwargs or the video request body:
Windowed requests take no sound and no video conditioning.
Robot actions
The DROID policies predict a chunk of robot actions from one observation image (the client composes it from the wrist and exterior cameras), the task text and the robot’s current state. For a control loop use/generate/ws:
--json-prompt for cosmos3_edge_droid. A request with output_modalities: ["action"] and a robot_state is a policy request; the chunk (32 rows), the observation rate (15 fps) and the domain (droid_lerobot) come from the checkpoint or the config. The reply is float32 [chunk, padded width], and the first raw_action_dim columns are the robot’s actions.
The code fixes no DROID action width. raw_action_dim sets it, from 1 to the checkpoint’s padded width (64 by default); when it is left out, the length of robot_state (or of a forward-dynamics action row) sets it. The shipped DROID configs and the example client send 8 values: the 7 joint positions and the gripper. The configs map the gripper to the checkpoint’s 1 - gripper on the way in and back on the way out (inverted_action_dims: [7]).
action_mode also takes forward_dynamics and inverse_dynamics. Those requests, and any action request to a checkpoint that is not a DROID policy, must name domain_name or domain_id.
Deployment configs
To use an alternative, pass
--config configs/<file> after the launcher name. From a wheel installation, copy the shipped YAML and pass its local path.
Settings and defaults
Set these undermodel_kwargs in the config.
Limits
- The 4-step distilled checkpoints fix the step count and guidance (leave
num_inference_stepsandguidance_scaleunset) and refuse action, sound, windowed and video-conditioned requests. - Sound is for video requests only, on a checkpoint that ships a
sound_tokenizer/. The Nano DROID checkpoint has none. - Requests that share a step can differ from their solo results at bf16 rounding. Serve one request at a time when outputs must be bitwise repeatable.
window_mode: kvis experimental: with an image prompt the rollout can leave the scene at the first window boundary.