vllm_omni.diffusion.models.pi05.config ¶
Config surface for the π0.5 VLA model in vllm-omni.
Deliberately shaped exactly like pi0/config.py: a small dataclass that consumes the raw LeRobot config.json (the field surface of lerobot.policies.pi05.PI05Config) and keeps only the runtime-relevant fields. Transformer dimensions are derived from paligemma_variant / action_expert_variant inside the model via get_gemma_config.
What π0.5 adds on top of the π0 config surface:
tokenizer_max_length = 200(π0 uses 48).state_num_bins— state is discretized into language tokens instead of going through astate_projlayer.use_relative_actions/relative_exclude_joints/action_feature_names— the relative-action contract. Seeprocessor_pi05.Pi05RelativeActions.- Quantile normalization stats. LeRobot's π0.5 defaults
STATEandACTIONtoNormalizationMode.QUANTILESwhere π0 usesMEAN_STD.
Checkpoint boundary rule. A capability that the checkpoint declares but this implementation does not consume must raise, not be silently dropped. π0.5 checkpoints can declare MEM (short-horizon observation memory) and RTC (real-time chunking); neither is supported here, and serving such a checkpoint anyway would produce plausible-looking wrong actions. See _reject_unsupported_capabilities.
Pi05Config dataclass ¶
π0.5 VLA config (dataclass, not an HF PretrainedConfig).
action_expert_variant class-attribute instance-attribute ¶
action_expert_variant: str = 'gemma_300m'
action_feature_names class-attribute instance-attribute ¶
image_key_map class-attribute instance-attribute ¶
image_resolution class-attribute instance-attribute ¶
input_features class-attribute instance-attribute ¶
output_features class-attribute instance-attribute ¶
policy_server_config class-attribute instance-attribute ¶
relative_exclude_joints class-attribute instance-attribute ¶
from_model_config classmethod ¶
from_model_config(
model_config: dict[str, Any] | None,
) -> Pi05Config
Build from a config dict (LeRobot config.json or deploy yaml).
from_pretrained classmethod ¶
from_pretrained(checkpoint_dir: str | Path) -> Pi05Config
Build from a checkpoint directory's config.json.
Normalization stats are not in config.json. LeRobot keeps them in the processor sidecar, so they are loaded separately and backfilled here — see :func:load_lerobot_norm_stats.
UnsupportedCheckpointCapabilityError ¶
Bases: ValueError
A checkpoint declares a capability this implementation does not consume.
Raised at load time rather than silently ignored: every one of these capabilities changes what a correct action chunk looks like, and none of them is visible in the weights alone.
load_lerobot_norm_stats ¶
Load normalization stats from a LeRobot checkpoint's processor sidecar.
Returns a norm_stats-shaped dict ({"state": {...}, "action": {...}}) carrying an explicit mode, or None when the checkpoint ships no stats. lerobot/pi05_base is the latter case: its normalizer step has no state_file, i.e. normalization is identity and the client is expected to send an already-normalized state.
Raises on a mode we cannot reproduce rather than serving the checkpoint with the wrong transform, which fails silently — a wrongly normalized state still yields a plausible-looking action chunk.
resolve_excluded_action_indices ¶
resolve_excluded_action_indices(
exclude_joints: list[str] | None,
action_names: list[str] | None,
) -> list[int]
Map relative_exclude_joints names onto action-vector indices.
Matching is exact name first, then substring (a checkpoint may name the gripper dimension gripper_position while the config just says gripper). Single source of truth for both the config-time validation and the runtime mask in processor_pi05.Pi05RelativeActions.
Returns an empty list when there is nothing to exclude. Raises when a name cannot be resolved — an unresolvable exclusion would otherwise silently become "make this dimension relative too".