Skip to content

vllm_omni.diffusion.models.pi0.config

Config surface for the π0 (Pi-Zero) VLA model in vllm-omni.

Only the parameters that actually shape runtime behaviour live here; the transformer dimensions (hidden size, head count, ...) are derived from paligemma_variant / action_expert_variant inside the model via get_gemma_config (see modeling_pi0).

The resolver reads the raw LeRobot config.json (the field surface of lerobot.policies.pi0.PI0Config): only the recognized dataclass fields are used; any other keys in the file are ignored.

ACTION module-attribute

ACTION = 'action'

OBS_IMAGES module-attribute

OBS_IMAGES = OBS_STR + '.images'

OBS_STATE module-attribute

OBS_STATE = OBS_STR + '.state'

OBS_STR module-attribute

OBS_STR = 'observation'

Pi0Config dataclass

π0 VLA config (dataclass, not an HF PretrainedConfig).

Mirrors the runtime-relevant subset of LeRobot PI0Config plus a couple of serving-side knobs (max_cameras, image_feature_keys, image_key_map, norm_stats).

action_expert_variant class-attribute instance-attribute

action_expert_variant: str = 'gemma_300m'

chunk_size class-attribute instance-attribute

chunk_size: int = 50

dtype class-attribute instance-attribute

dtype: str = 'float32'

image_feature_keys class-attribute instance-attribute

image_feature_keys: list[str] | None = None

image_key_map class-attribute instance-attribute

image_key_map: dict[str, str] = field(default_factory=dict)

image_resolution class-attribute instance-attribute

image_resolution: tuple[int, int] = (224, 224)

input_features class-attribute instance-attribute

input_features: dict[str, Any] = field(default_factory=dict)

max_action_dim class-attribute instance-attribute

max_action_dim: int = 32

max_cameras class-attribute instance-attribute

max_cameras: int = 3

max_period class-attribute instance-attribute

max_period: float = 4.0

max_state_dim class-attribute instance-attribute

max_state_dim: int = 32

min_period class-attribute instance-attribute

min_period: float = 0.004

norm_stats class-attribute instance-attribute

norm_stats: dict | None = None

num_inference_steps class-attribute instance-attribute

num_inference_steps: int = 10

output_features class-attribute instance-attribute

output_features: dict[str, Any] = field(
    default_factory=dict
)

paligemma_variant class-attribute instance-attribute

paligemma_variant: str = 'gemma_2b'

tokenizer_max_length class-attribute instance-attribute

tokenizer_max_length: int = 48

from_model_config classmethod

from_model_config(
    model_config: dict[str, Any] | None,
) -> Pi0Config

Build from a config dict (LeRobot config.json or deploy yaml).

Keeps only the recognized dataclass fields (the LeRobot config also carries many training-only keys) and coerces image_resolution to a tuple.

from_pretrained classmethod

from_pretrained(checkpoint_dir: str | Path) -> Pi0Config

Build from a checkpoint directory's config.json.