Skip to main content

1. Model Introduction

Motubrain 2.0 is a world action model (WAM) from GensPI that jointly denoises future video latents and continuous robot action chunks from synchronized camera observations, robot proprioceptive state, and a language instruction. SGLang serves the V2A action-only inference path in multimodal_gen, returning decoded controller-space action chunks without running video decoding. The serving pipeline coordinates four components through the native motubrain2 inference package:
  • Joint video-action policy: denoises video latents and continuous actions together using the sampler, diffusion shifts, and default step count stored in the checkpoint bundle (sampling.json).
  • Video VAE: Wan 2.2 VAE (Wan-AI/Wan2.2-TI2V-5B-Diffusers or a local checkpoint configured via wan, automatically resolving the vae subfolder when wan_subfolder is omitted).
  • Text encoder: T5Gemma (text_dim 3584, max_token_len 109), configured via text_encoder and cached across repeated instructions within the worker conditioning-cache budget.
  • Optional geometry encoder: DA3 DinoV2 (da3), required when the checkpoint config.json declares feature_layers (true for all three published checkpoints) and omitted for non-geometry checkpoints.
Runtime and asset prerequisites. The three BF16 policy checkpoints (GensPI/Motubrain2.0-Distill, GensPI/Motubrain2.0-Base, and GensPI/Motubrain2.0-Base-AgileX-Piper) are publicly downloadable on Hugging Face (config.json, model.safetensors, and sampling.json). The motubrain2 release repository (shengshu-ai/Motubrain-2.0) currently requires read access and motubrain2 is unpublished on PyPI, so there is no public pip install motubrain2 command yet. Each model’s robot profile (profile.json), embodiment-matched PT3 normalization statistics, and complete standalone MXFP8 checkpoint (quantized weights model-mxfp8.safetensors, manifest manifest.json, model config config.json, and sampling config sampling.json) will be published to its respective GensPI Hugging Face repository and are pending upload. Install motubrain2 into the SGLang Python environment before starting the server.
Registered Hugging Face model identifiers recognized by sglang serve:
Model IDVariant
GensPI/Motubrain2.0-DistillPublic BF16 distilled action policy checkpoint (also registered as GensPI/Motubrain2.0-Distill-serving)
GensPI/Motubrain2.0-BasePublic BF16 base action policy checkpoint (also registered as GensPI/Motubrain2.0-Base-serving)
GensPI/Motubrain2.0-Base-AgileX-PiperPublic BF16 AgileX Piper embodiment checkpoint (also registered as GensPI/Motubrain2.0-Base-AgileX-Piper-serving)
GensPI/motubrain2-servingGeneric serving bundle repository identifier
Camera names, observation frame counts, state width, and output action dimensions are loaded from the checkpoint bundle’s profile.json and config.json at server startup and exposed at GET /v1/actions/metadata. References:

2. Installation

Install SGLang with the diffusion extra from source, then install the motubrain2 inference package from shengshu-ai/Motubrain-2.0 into the same Python environment once you have repository read access (there is no public pip install motubrain2 command while the repository requires read access and motubrain2 remains unpublished on PyPI). Include the native geometry extra for checkpoints whose config.json declares feature_layers (all three published checkpoints), and arrange separate access for the T5Gemma text encoder as noted on the Distill model card. See the SGLang Diffusion installation guide for base environment prerequisites.
Command
For standalone MXFP8 checkpoints, install motubrain2[mxfp8] in an environment whose SGLang and Motubrain 2.0 FlashInfer 0.7.5 requirements align. Default BF16 serving runs on SGLang’s pinned FlashInfer 0.7.4 environment. To register an optional explicit --model-type motubrain2 CLI alias alongside standard sglang serve auto-detection, install the bundled backend entry-point package:
Command

3. Model Deployment

Create a pipeline configuration JSON file specifying the frozen encoder paths and robot profile (supply da3 and, for standalone .pth encoder files, wan_config and da3_config whenever the checkpoint uses geometry features):
Config
Keep the normalization statistics alongside profile.json or override their location with "action_stats" in the pipeline JSON. Serve a registered Hugging Face Motubrain 2.0 repository:
Command
Serve a local policy directory that lacks a Diffusers model_index.json with _diffusers_version (such as a renamed Distill or Base bundle directory) by passing --pipeline-class-name Motubrain2Pipeline:
Command

3.1 Runtime Constraints and Caching

Motubrain 2.0 runs as a single-GPU monolithic policy worker (--num-gpus 1, TP=SP=DP=1). The server rejects multi-GPU parallelism (--tp-size > 1, --sp-degree > 1, --dp-size > 1, --enable-cfg-parallel), disaggregated roles, --webui, generic --quantization flags, generic component precision or weight path overrides, and generic --enable-torch-compile at startup. Set "compile": true inside the pipeline JSON for BF16 torch.compile execution. The action stage caches frozen encoder outputs and text embeddings for identical instructions, camera clips, state vectors, camera extrinsics, and sparse history frames under the worker conditioning-cache budget (--disable-conditioning-cache and --conditioning-cache-max-size-mb, with enable_global_prefix_cache, prefix_cache_max_entries defaulting to 8, and text_cache_size defaulting to 64 in the pipeline JSON).

3.2 Action Request Schema

Query GET /v1/actions/metadata first to inspect the active checkpoint’s input.image_keys, input.camera_aliases, input.observation_frames, input.history_frames, input.state_dim, input.state_required, input.camera_extrinsic_required, output.action_horizon, output.action_dim, and runtime.weight_precision.
FieldTypeDescription
input.taskstringNonempty language instruction (also accepted as prompt or instruction in flat OpenPI payloads).
input.observation.imagesobjectMapping from each required camera key in image_keys (or its configured alias) to an RGB image or ordered RGB clip matching observation_frames. Accepts uint8 or float arrays, base64 images, or multipart uploads.
input.observation.statearrayRobot proprioceptive state vector of length state_dim. Required when state_required is true unless an anchored rtc constraint supplies the pose.
input.observation.camera_extrinsicarray, optional4x4 base-from-camera transform matrix, required when the robot profile sets camera_extrinsic_required to true.
input.observation.history_camerasobject, optionalPer-camera RGB clips with history_frames frames when the loaded profile enables sparse history.
input.observation.session_idstring, optionalIdentifies an episode for per-session RNG continuation and server-side RTC state (required when rtc_enabled is true). Named HTTP sessions are stored in an LRU table bounded by max_sessions (default 64).
input.observation.resetboolean, optionalResets the episode generator and stored RTC action prefix for the session or WebSocket connection.
input.observation.rtcobject, optionalExplicit controller-space RTC constraint carrying future (shape [N, action_dim]), nonnegative integer delay, and optional anchor (shape [action_dim]). Overrides stored RTC state and works even when server-side rtc_enabled is false.
parameters.num_inference_stepsinteger, optionalOverrides the checkpoint bundle’s default denoising step count.
parameters.seedinteger, optionalOne-shot seed in [0, 2^64 - 1] applied to a single request while preserving the session generator state. Omit to advance the session RNG from inference_seed (default 0).
parameters.return_native_outputsboolean, optionalWhen true, attaches a base64-encoded safetensors archive under extras.native_outputs containing video, action, decoded_action, and decoded_valid.
runtime.prefix_cacheboolean, optionalControls exact observation and text conditioning reuse for the request (default true).
runtime.cuda_graphboolean, optionalDefaults to false. Setting true is rejected per request with HTTP 400 (or WebSocket close code 1008) because Motubrain 2.0 does not implement CUDA graphs.
runtime.output_format”list” or “numpy”Defaults to “list” for JSON and “numpy” for MessagePack and WebSockets.
runtime.response_format”envelope” or “raw”HTTP response shape. “envelope” returns data[0].action.values and “raw” returns the policy dictionary directly.
Guidance scales (guidance_scale, guidance_scale_action) are rejected for any value other than null or 1.0, and caller-supplied noise tensors are rejected in favor of deterministic seeding via parameters.seed.

4. API Usage

4.1 Metadata Discovery and HTTP Action Generation

POST /v1/actions/generations supports application/json, application/msgpack, and multipart/form-data. MessagePack carries uint8 camera arrays directly with minimal serialization overhead:
Example

4.2 WebSocket Endpoints (/v1/actions/realtime and /openpi/policy)

Both WebSocket endpoints send the action.metadata MessagePack frame immediately on connect and maintain a private continuation state and RNG per connection:
  • /v1/actions/realtime: accepts enveloped requests (input, parameters, runtime) and returns the standard action envelope with server_timing.infer_ms.
  • /openpi/policy: accepts flat OpenPI payloads (task or prompt, observation.images.<camera> or images, observation.state, optional rtc, reset, seed, return_native_outputs) and returns raw policy payloads with actions and server_timing.
Example

4.3 Returning All Four Native Tensors

Set parameters.return_native_outputs to true on HTTP requests (or top-level return_native_outputs: true on /openpi/policy) to retrieve video (packed video latents), action (model coordinates), decoded_action (controller coordinates), and decoded_valid (boolean validity mask) from the same forward pass:
Example

5. Precision, Determinism, and Optional DiT Cache

5.1 BF16 Default and Standalone MXFP8

Default BF16 serving loads model.safetensors and runs on SGLang’s pinned FlashInfer 0.7.4 environment. Currently the public GensPI/Motubrain2.0-* Hugging Face repositories publish BF16 weights (config.json, model.safetensors, and sampling.json), while each model’s robot profile, matched PT3 normalization statistics, and complete standalone MXFP8 checkpoint (quantized weights model-mxfp8.safetensors, manifest manifest.json, model config config.json, and sampling config sampling.json) will be published to its respective GensPI Hugging Face repository. To serve a complete local standalone MXFP8 bundle once available, pass --mxfp8 (or --mxfp8 true) on sglang serve, or set "mxfp8": true in the pipeline JSON (pass --mxfp8 false on the CLI to override a JSON file setting), inside an environment where SGLang, motubrain2[mxfp8], and FlashInfer 0.7.5 align:
Command
Standalone MXFP8 requires:
  • A complete local bundle containing matching manifest.json, config.json, sampling.json, and model-mxfp8.safetensors.
  • materialize_dtype: "bf16" and compile: false (eager execution).
  • A compatible motubrain2[mxfp8] package aligned with FlashInfer 0.7.5 (standard sglang[diffusion] installs pin FlashInfer 0.7.4, which supports BF16 only).
The HTTP and WebSocket wire formats are identical for BF16 and MXFP8, and GET /v1/actions/metadata reports the active runtime.mxfp8 and runtime.weight_precision fields. Set "deterministic": true in the pipeline JSON to enable process-wide PyTorch deterministic algorithms and disable cuDNN benchmark mode across the worker process.

5.2 Real-Time Chunking (RTC)

Enable server-side RTC in the pipeline JSON with rtc_enabled, rtc_execute_prefix (default 1, strictly less than action_horizon), and rtc_delay (default 1, positive integer). When rtc_enabled is true, HTTP callers must provide a nonempty input.observation.session_id per episode. When an HTTP session is evicted from the max_sessions LRU table, treat the next request as a fresh episode or pass an explicit input.observation.rtc constraint.

5.3 Optional DiT Velocity Cache

dit_cache_enabled defaults to false for all checkpoints (omitted or null maps to false) so velocity caching remains strictly opt-in and never activates silently from a checkpoint preset. Set "dit_cache_enabled": true in the pipeline JSON to enable it (requiring a motubrain2 package providing DiTCacheConfig.for_recipe). Omitting thresholds selects the native recipe defaults, or specify explicit thresholds and intervals:
Config
Reusing velocities across denoising steps can alter predicted video latents and action chunks. Compare all four native tensors (return_native_outputs: true) and timing against the cache-off baseline on recorded observations and fixed seeds before enabling the cache on a robot.

6. Verification Status

  • CPU unit and transport tests: verified in python/sglang/multimodal_gen/test/unit/test_motubrain2_action_api.py using a test-double backend on CPU, covering HTTP JSON, MessagePack, multipart upload acceptance and rejection, metadata payload construction, per-request WebSocket validation, RTC validation, and startup plus per-request error handling.
  • Opt-in server end-to-end tests: python/sglang/multimodal_gen/test/server/test_motubrain2_action.py spawns the action server (MOTUBRAIN2_RUN_SERVE_E2E=1, requiring the native motubrain2 package on a compute node) and verifies GET /v1/actions/metadata retrieval, cross-socket WebSocket session isolation and reconnect, and RTC continuation across transports.
  • Author-reported single-NVIDIA-B200 live HTTP parity replays:
    • Coverage: Distill (Astribot, 24 x 25 action chunks), Base (Astribot, 24 x 25 action chunks), and Base-AgileX-Piper (AgileX PiPER, 24 x 16 action chunks) were each verified in both BF16 and standalone MXFP8 over the live HTTP server, including Base-AgileX-Piper BF16 under both the default DiT Cache disabled and explicit DiT Cache enabled configurations.
    • Protocol and parity: each test replayed the embodiment’s three recorded RGB camera views, robot state, camera extrinsics, and language instruction with fixed seed 42. Both the regular HTTP action chunk response and the four separately requested native outputs (video, action, decoded_action, and decoded_valid) matched native motubrain2 inference byte for byte under identical precision and DiT Cache settings.
  • Single-GPU latency and peak memory benchmarks: pending a fuller benchmark pass by the model authors to confirm test conditions and reporting metrics, alongside public upload of the motubrain2 runtime, robot profiles, and PT3 normalization assets.