vllm_omni.diffusion.models.pi0.pipeline_pi0 ¶
π0 (Pi-Zero) VLA pipeline for vllm-omni.
Entry point for DiffusionEngine.step() → pipeline.forward(req). Mirrors the DreamZero contract: the pipeline owns ALL preprocessing. It reads the raw robot observation from req.sampling_params.extra_args["robot_obs"] (delivered by the OpenPI realtime serving layer), builds model inputs, runs flow-matching denoising, and returns DiffusionOutput(output={"actions": ndarray}) — which diffusion_engine promotes to multimodal_output["actions"] for the client.
π0 is stateless across calls (no KV reuse), so session_id / reset from the OpenPI protocol are accepted but ignored.
Pi0Pipeline ¶
Bases: Module
π0 VLA pipeline: raw robot obs → continuous action chunk.
Registered as "Pi0Pipeline" in the diffusion registry. Weights are self-loaded in __init__ from the checkpoint's model.safetensors via the kernel's load_weights (which handles the LeRobot key remaps).
tokenizer_source instance-attribute ¶
tokenizer_source = str(
custom_args.get(
"tokenizer", self._resolve_tokenizer_source()
)
)
load_weights ¶
No-op for the diffusion loader: π0 self-loads its checkpoint in __init__ (the kernel's load_weights handles the LeRobot remaps). We expose no weights_sources, so the loader passes an empty iterator here; returning None skips its strict unloaded-weights check.
get_pi0_post_process_func ¶
get_pi0_post_process_func(od_config: OmniDiffusionConfig)
π0 returns actions directly; post-processing is identity. The diffusion engine resolves this via the registry (_DIFFUSION_POST_PROCESS_FUNCS) and applies it engine-side, so the pipeline does NOT attach it to DiffusionOutput.