Skip to content

vllm_omni.config

Configuration module for vLLM-Omni.

Modules:

Name Description
composable_parallel

Composable parallel strategies for vLLM-Omni.

config_factory

Config factories for vllm-omni, e.g., StageConfigFactory.

endpoint_policy

Endpoint restriction policy for omni pipelines.

lora
model
omni_config

Structured vLLM-Omni configuration classes.

pipeline_registry

Pipeline registry and factory for vllm-omni.

server_settings
stage_config

Stage configuration system for vLLM-Omni.

yaml_util

Centralized OmegaConf wrapper for vLLM-Omni.

PIPELINE_WIDE_ENGINE_FIELDS module-attribute

PIPELINE_WIDE_ENGINE_FIELDS = _PIPELINE_WIDE_ENGINE_FIELDS

StageConfigType module-attribute

BaseVllmOmniStageConfig

Common structured config contract shared by all Omni stage realizations.

cache_config class-attribute instance-attribute

cache_config: OmniStageCacheConfig = field(
    default_factory=OmniStageCacheConfig
)

cfg_kv_collect_func property

cfg_kv_collect_func: str | None

connector_config class-attribute instance-attribute

connector_config: OmniStageConnectorConfig = field(
    default_factory=OmniStageConnectorConfig
)

custom_process_input_func property

custom_process_input_func: str | None

custom_process_next_stage_input_func property

custom_process_next_stage_input_func: str | None

engine_output_type property

engine_output_type: str | None

final_output property

final_output: bool

final_output_type property

final_output_type: str | None

hf_config_name property

hf_config_name: str | None

input_sources property

input_sources: list[int]

is_comprehension property

is_comprehension: bool

load_config class-attribute instance-attribute

load_config: OmniStageLoadConfig = field(
    default_factory=OmniStageLoadConfig
)

model_config class-attribute instance-attribute

model_config: OmniStageModelConfig = field(
    default_factory=OmniStageModelConfig
)

model_stage property

model_stage: str

parallel_config class-attribute instance-attribute

parallel_config: OmniStageParallelConfig = field(
    default_factory=OmniStageParallelConfig
)

prompt_expand_func property

prompt_expand_func: str | None

quantization_config class-attribute instance-attribute

quantization_config: _QuantizationConfigType = None

requires_multimodal_data property

requires_multimodal_data: bool

runtime_config class-attribute instance-attribute

runtime_config: OmniStageRuntimeConfig = field(
    default_factory=OmniStageRuntimeConfig
)

scheduler_cls property

scheduler_cls: str | None

scheduler_config class-attribute instance-attribute

scheduler_config: OmniStageSchedulerConfig = field(
    default_factory=OmniStageSchedulerConfig
)

stage_id property

stage_id: int

stage_pipeline_config instance-attribute

stage_pipeline_config: StagePipelineConfig

stage_type property

stage_type: StageType

worker_type property

worker_type: str | None

DeployConfig dataclass

Loaded from deploy/.yaml — the only config file users edit.

Top-level fields (trust_remote_code, distributed_executor_backend, dtype, quantization, enable_prefix_caching, enable_chunked_prefill, data_parallel_size, pipeline_parallel_size) are pipeline-wide: they apply uniformly to every stage. Fields that legitimately vary per stage live in the individual StageDeployConfig entries under stages:.

active_stream_window class-attribute instance-attribute

active_stream_window: int = 0

async_chunk class-attribute instance-attribute

async_chunk: bool = True

connectors class-attribute instance-attribute

connectors: dict[str, Any] | None = None

custom_voice_dir class-attribute instance-attribute

custom_voice_dir: str | None = None

data_parallel_size class-attribute instance-attribute

data_parallel_size: int | None = None

distributed_executor_backend class-attribute instance-attribute

distributed_executor_backend: str | None = None

dtype class-attribute instance-attribute

dtype: str | None = None

edges class-attribute instance-attribute

edges: list[dict[str, Any]] | None = None

enable_chunked_prefill class-attribute instance-attribute

enable_chunked_prefill: bool | None = None

enable_prefix_caching class-attribute instance-attribute

enable_prefix_caching: bool | None = None

pipeline class-attribute instance-attribute

pipeline: str | None = None

pipeline_parallel_size class-attribute instance-attribute

pipeline_parallel_size: int | None = None

platforms class-attribute instance-attribute

platforms: dict[str, Any] | None = None

quantization class-attribute instance-attribute

quantization: str | None = None

stages class-attribute instance-attribute

stages: list[StageDeployConfig] = field(
    default_factory=list
)

trust_remote_code class-attribute instance-attribute

trust_remote_code: bool | None = None

OmniModelConfig

Bases: ModelConfig

Configuration for Omni models, extending the base ModelConfig.

This configuration class extends the base vLLM ModelConfig with omni-specific fields for multi-stage pipeline processing.

Attributes: hf_config: The model's HF Transformers config (default: None) hf_text_config: The sub text_config of the model's hf_config (default: None) stage_id: Identifier for the stage in a multi-stage pipeline (default: 0) async_chunk: If set to True, perform async chunk model_stage: Stage type identifier, e.g., "thinker" or "talker" (default: "thinker") model_arch: Model architecture name (default: "Qwen2_5OmniForConditionalGeneration") worker_type: Model Type, e.g., "ar" or "generation" engine_output_type: Optional output type specification for the engine. Used to route outputs to appropriate processors (e.g., "image", "audio", "latents"). If None, output type is inferred. stage_connector_config: Stage connector configuration dictionary. Contains "name" (connector name), "extra" (extra connector config). task_type: Default task type for TTS models (CustomVoice, VoiceDesign, or Base). If not specified, will be inferred from model path.

The correct way to initialize this class is via vLLM config, as most of the logic for handling values is in the ModelConfig's post_init.

Example: >>> config = OmniModelConfig.from_vllm_model_config( ... vllm_config, ... stage_id=0, ... model_stage="thinker", ... model_arch="Qwen2_5OmniForConditionalGeneration" ... )

active_stream_window class-attribute instance-attribute

active_stream_window: int = 0

architectures property

architectures: list[str]

async_chunk class-attribute instance-attribute

async_chunk: bool = False

codec_frame_rate_hz class-attribute instance-attribute

codec_frame_rate_hz: float | None = None

custom_process_next_stage_input_func class-attribute instance-attribute

custom_process_next_stage_input_func: str | None = None

embedding_size property

embedding_size

enable_sleep_mode class-attribute instance-attribute

enable_sleep_mode: bool = False

engine_output_type class-attribute instance-attribute

engine_output_type: str | None = None

has_sampling_extra_args class-attribute instance-attribute

has_sampling_extra_args: bool = False

hf_config_name class-attribute instance-attribute

hf_config_name: str | None = None

model_arch class-attribute instance-attribute

model_arch: str | None = None

model_stage class-attribute instance-attribute

model_stage: str = 'thinker'

omni_kv_config class-attribute instance-attribute

omni_kv_config: dict | None = None

registry property

registry

stage_connector_config class-attribute instance-attribute

stage_connector_config: dict[str, Any] = field(
    default_factory=lambda: {
        "name": "SharedMemoryConnector",
        "extra": {},
    }
)

stage_id class-attribute instance-attribute

stage_id: int = 0

subtalker_sampling_params class-attribute instance-attribute

subtalker_sampling_params: dict[str, Any] | None = None

task_type class-attribute instance-attribute

task_type: str | None = None

uses_mrope property

uses_mrope: bool

worker_type class-attribute instance-attribute

worker_type: str | None = None

add_defaults_to_omni_kwargs classmethod

add_defaults_to_omni_kwargs(omni_kwargs)

Because we init the OmniModelConfig with new to sidestep expensive validation, we need to be careful to ensure fields with default factories are initialized, otherwise we will get an AttributeError when we use it.

To work around this issue, we explicitly add defaults to the omni_kwargs dict provided to ensure all fields are defined correctly.

NOTE: omni_kwargs are mutated in place.

draw_hf_text_config

draw_hf_text_config()

from_vllm_model_config classmethod

from_vllm_model_config(
    model_config: ModelConfig, **omni_kwargs
)

Create OmniModelConfig from an existing vLLM ModelConfig and additional Omni specific kwargs.

NOTE: The validation and post_init for ModelConfig is expensive; to avoid calling it a second time, we explicitly retrieve defaults from dataclass attributes for values not passed to omni_kwargs, and use that to initialize a new instance. This is significantly faster than creating the OmniModelConfig directly from the ModelConfig, and saves us from having to pass all kwargs to the OmniModelConfig.

get_model_arch_config

get_model_arch_config()

OmniStageCacheConfig

Per-stage engine cache and memory behavior.

This is separate from _DiffusionConfigProjection.cache_config, which configures vLLM-Omni diffusion-specific cache backends such as TeaCache and Cache-DiT.

disable_hybrid_kv_cache_manager class-attribute instance-attribute

disable_hybrid_kv_cache_manager: bool = False

enable_prefix_caching class-attribute instance-attribute

enable_prefix_caching: bool = False

gpu_memory_utilization class-attribute instance-attribute

gpu_memory_utilization: float = Field(
    default=0.9, gt=0.0, le=1.0
)

mm_processor_cache_gb class-attribute instance-attribute

mm_processor_cache_gb: float | None = Field(
    default=None, ge=0.0
)

OmniStageConnectorConfig

Per-stage inter-stage connector wiring.

input_connectors class-attribute instance-attribute

input_connectors: dict[str, Any] | None = None

output_connectors class-attribute instance-attribute

output_connectors: dict[str, Any] | None = None

stage_connector class-attribute instance-attribute

stage_connector: dict[str, Any] = field(
    default_factory=lambda: {
        "name": "SharedMemoryConnector",
        "extra": {},
    }
)

OmniStageDiffusionParallelConfig

Bases: OmniStageParallelConfig

Diffusion-stage distributed parallelism behavior.

cfg_parallel_size class-attribute instance-attribute

cfg_parallel_size: int = Field(default=1, ge=1, le=3)

hsdp_replicate_size class-attribute instance-attribute

hsdp_replicate_size: int = Field(default=1, ge=1)

hsdp_shard_size class-attribute instance-attribute

hsdp_shard_size: int = -1

mask_sp_padding class-attribute instance-attribute

mask_sp_padding: bool = False

ring_degree class-attribute instance-attribute

ring_degree: int = Field(default=1, ge=1)

sequence_parallel_size class-attribute instance-attribute

sequence_parallel_size: int = Field(
    default=1, ge=1, init=False
)

ulysses_degree class-attribute instance-attribute

ulysses_degree: int = Field(default=1, ge=1)

ulysses_mode class-attribute instance-attribute

ulysses_mode: str = 'strict'

use_hsdp class-attribute instance-attribute

use_hsdp: bool = False

vae_parallel_mode class-attribute instance-attribute

vae_parallel_mode: str = 'tile'

vae_patch_parallel_size class-attribute instance-attribute

vae_patch_parallel_size: int = Field(default=1, ge=1)

OmniStageLoadConfig

Per-stage loading behavior.

config_format class-attribute instance-attribute

config_format: str | None = None

load_format class-attribute instance-attribute

load_format: str = 'auto'

skip_mm_profiling class-attribute instance-attribute

skip_mm_profiling: bool | None = None

tokenizer_mode class-attribute instance-attribute

tokenizer_mode: str = 'auto'

OmniStageModelConfig

Per-stage model behavior.

active_stream_window class-attribute instance-attribute

active_stream_window: int = Field(default=0, ge=0)

codec_frame_rate_hz class-attribute instance-attribute

codec_frame_rate_hz: float | None = None

compilation_config class-attribute instance-attribute

compilation_config: dict[str, Any] | None = None

custom_voice_dir class-attribute instance-attribute

custom_voice_dir: str | None = None

default_sampling_params class-attribute instance-attribute

default_sampling_params: dict[str, Any] | None = None

disable_autocast class-attribute instance-attribute

disable_autocast: bool = False

enable_flashinfer_autotune class-attribute instance-attribute

enable_flashinfer_autotune: bool | None = None

enable_multithread_weight_load class-attribute instance-attribute

enable_multithread_weight_load: bool = True

enable_sleep_mode class-attribute instance-attribute

enable_sleep_mode: bool = False

enforce_eager class-attribute instance-attribute

enforce_eager: bool = False

has_sampling_extra_args class-attribute instance-attribute

has_sampling_extra_args: bool = False

num_weight_load_threads class-attribute instance-attribute

num_weight_load_threads: int = Field(default=4, ge=1)

subtalker_sampling_params class-attribute instance-attribute

subtalker_sampling_params: dict[str, Any] | None = None

task_type class-attribute instance-attribute

task_type: str | None = None

OmniStageParallelConfig

Common per-stage distributed parallelism behavior.

data_parallel_size class-attribute instance-attribute

data_parallel_size: int = Field(default=1, ge=1)

enable_expert_parallel class-attribute instance-attribute

enable_expert_parallel: bool = False

pipeline_parallel_size class-attribute instance-attribute

pipeline_parallel_size: int = Field(default=1, ge=1)

tensor_parallel_size class-attribute instance-attribute

tensor_parallel_size: int = Field(default=1, ge=1)

world_size class-attribute instance-attribute

world_size: int = Field(default=1, ge=1, init=False)

OmniStageRuntimeConfig

Per-stage process placement and runtime behavior.

devices class-attribute instance-attribute

devices: str | None = None

env class-attribute instance-attribute

env: dict[str, Any] | None = None

log_level class-attribute instance-attribute

log_level: str = 'info'

log_stats class-attribute instance-attribute

log_stats: bool = False

num_gpus class-attribute instance-attribute

num_gpus: int = Field(default=1, ge=1)

num_replicas class-attribute instance-attribute

num_replicas: int = Field(default=1, ge=1)

profiler_config class-attribute instance-attribute

profiler_config: dict[str, Any] | None = None

OmniStageSchedulerConfig

Per-stage request scheduling behavior.

async_scheduling class-attribute instance-attribute

async_scheduling: bool = True

enable_chunked_prefill class-attribute instance-attribute

enable_chunked_prefill: bool = False

max_model_len class-attribute instance-attribute

max_model_len: int | None = Field(default=None, ge=-1)

max_num_batched_tokens class-attribute instance-attribute

max_num_batched_tokens: int | None = Field(
    default=None, ge=1
)

max_num_seqs class-attribute instance-attribute

max_num_seqs: int = Field(default=128, ge=1)

PipelineConfig dataclass

Complete pipeline topology for a model (frozen).

diffusers_class_name class-attribute instance-attribute

diffusers_class_name: str | None = None

endpoint_restrictions class-attribute instance-attribute

endpoint_restrictions: tuple[EndpointRestriction, ...] = ()

hf_architectures class-attribute instance-attribute

hf_architectures: tuple[str, ...] = ()

hf_config_predicate class-attribute instance-attribute

hf_config_predicate: Callable[[Any], bool] | None = None

model_arch class-attribute instance-attribute

model_arch: str = ''

model_type instance-attribute

model_type: str

stages class-attribute instance-attribute

stages: tuple[StagePipelineConfig, ...] = ()

get_stage

get_stage(stage_id: int) -> StagePipelineConfig | None

Look up a stage by its ID.

validate

validate() -> list[str]

Return list of topology errors (empty if valid).

StageConfig dataclass

Per-stage config (legacy path). Used by both new and legacy loaders.

TODO(@lishunyang12): replace with ResolvedStageConfig once all models are migrated.

custom_process_input_func class-attribute instance-attribute

custom_process_input_func: str | None = None

final_output class-attribute instance-attribute

final_output: bool = False

final_output_type class-attribute instance-attribute

final_output_type: str | None = None

hf_config_name class-attribute instance-attribute

hf_config_name: str | None = None

input_sources class-attribute instance-attribute

input_sources: list[int] = field(default_factory=list)

is_comprehension class-attribute instance-attribute

is_comprehension: bool = False

model_stage instance-attribute

model_stage: str

runtime_overrides class-attribute instance-attribute

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

scheduler_cls class-attribute instance-attribute

scheduler_cls: str | None = None

stage_id instance-attribute

stage_id: int

stage_type class-attribute instance-attribute

stage_type: StageType = StageType.LLM

worker_type class-attribute instance-attribute

worker_type: str | None = None

yaml_engine_args class-attribute instance-attribute

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

yaml_extras class-attribute instance-attribute

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

yaml_runtime class-attribute instance-attribute

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

to_omegaconf

to_omegaconf() -> Any

TODO(@lishunyang12): remove once engine consumes ResolvedStageConfig directly.

StageConfigFactory

Factory that loads pipeline YAML and merges CLI overrides.

Handles both single-stage and multi-stage models.

Pipelines are declared in vllm_omni/config/pipeline_registry.py and where keys in OMNI_PIPELINES map to either a PipelineConfig, or a callable which accepts a Transformers config as an arg & resolves to a PipelineConfig.

NOTE: Models with generic HF model_type collisions (e.g. MiMo Audio reports qwen2) should declare hf_architectures=(...) on their PipelineConfig so the factory can disambiguate via hf_config.architectures.

create_default_diffusion classmethod

create_default_diffusion(
    kwargs: dict[str, Any],
) -> list[dict[str, Any]]

Single-stage diffusion - no YAML needed.

Creates a default diffusion stage configuration for single-stage diffusion models. Returns a legacy OmegaConf-compatible dict for backward compatibility with OmniStage.

Parameters:

Name Type Description Default
kwargs dict[str, Any]

Engine arguments from CLI/API.

required

Returns:

Type Description
list[dict[str, Any]]

List containing a single config dict for the diffusion stage.

create_from_model classmethod

create_from_model(
    model: str,
    *,
    trust_remote_code: bool = False,
    cli_overrides: dict[str, Any] | None = None,
    deploy_config_path: str | None = None,
    strategy_specs: Mapping[Any, Any] | None = None,
    **deprecated_kwargs: Any,
) -> tuple[list[StageConfig] | None, str | None]

Load pipeline + deploy config, merge with CLI overrides.

Checks OMNI_PIPELINES first, since supported models should be explicitly registered. If a model is not registered in OMNI_PIPELINES, tries to fall back to using the Transformers config & finding pipelines that have overlapping supported architectures.

When strategy_specs is provided (a mapping of role -> list of StrategySpec), the derived parallel sizing is overlaid onto the merged stages (see vllm_omni.config.composable_parallel). This is opt-in: omitting it leaves the existing merge path untouched.

Returns (stages, omni_lb_policy): the merged stages (None when the model is not in the pipeline registry and the caller should fall back to the legacy YAML path) and the strategy-derived, pipeline-wide omni_lb_policy (None when no stage_replica axis set one). The policy is returned rather than threaded through a mutable out-param so the engine can apply it without every intermediate call carrying the dict.

get_hf_config cached classmethod

get_hf_config(
    model: str, trust_remote_code: bool
) -> PretrainedConfig | None

Fetch the HF config (if it exists) from the model directory.

Parameters:

Name Type Description Default
model str

Model name or path.

required
trust_remote_code bool

Whether to trust remote code for HF config loading.

required

Returns:

Type Description
PretrainedConfig | None

the model's config or None.

get_pipeline_config cached classmethod

get_pipeline_config(
    model: str,
    trust_remote_code: bool,
    deploy_config_path: str | None = None,
) -> PipelineConfig | None

Resolve the PipelineConfig for a model path/name.

get_pipeline_endpoint_restrictions classmethod

get_pipeline_endpoint_restrictions(
    model: str,
    trust_remote_code: bool,
    deploy_config_path: str | None,
) -> tuple[EndpointRestriction, ...]

Given a model string, determine the corresponding endpoint restrictions.

Parameters:

Name Type Description Default
model str

Model name or path.

required
trust_remote_code bool

Whether to trust remote code for HF config loading.

required
deploy_config_path str | None

Optional path to the deploy config for the pipeline.

required

Returns:

Type Description
tuple[EndpointRestriction, ...]

A tuple of model specific endpoint restrictions.

resolve_pipeline_config staticmethod

resolve_pipeline_config(
    model_type: str,
    hf_config: PretrainedConfig | None = None,
) -> PipelineConfig | None

Given a model type, resolve to the pipeline to be used. If the pipeline maps to a callable we resolve based on the HF config.

try_infer_model_type cached classmethod

try_infer_model_type(
    model: str, trust_remote_code: bool
) -> str | None

Auto-detect model_type from model directory and apply any model specific patches to get the correct model_type str. If we are unable to infer it from the model directory, we fall back to the PipelineConfig.

Parameters:

Name Type Description Default
model str

Model name or path.

required
trust_remote_code bool

Whether to trust remote code for HF config loading.

required

Returns:

Type Description
str | None

model_type as a string; may be None on failure.

StageDeployConfig dataclass

Per-stage deployment knobs.

Only fields whose value legitimately varies across stages of the same pipeline live here (e.g. max_num_seqs on thinker vs talker, devices for GPU placement). Pipeline-wide settings (trust_remote_code, distributed_executor_backend, dtype, quantization, prefix/chunked prefill, DP/PP sizes) are declared at the top level of DeployConfig and propagated to every stage.

async_scheduling class-attribute instance-attribute

async_scheduling: bool | None = None

auxiliary_text_encoder class-attribute instance-attribute

auxiliary_text_encoder: str | None = None

boundary_ratio class-attribute instance-attribute

boundary_ratio: float | None = None

cache_backend class-attribute instance-attribute

cache_backend: str | None = None

cache_config class-attribute instance-attribute

cache_config: dict[str, Any] | None = None

cfg_parallel_size class-attribute instance-attribute

cfg_parallel_size: int | None = None

compilation_config class-attribute instance-attribute

compilation_config: dict[str, Any] | None = None

config_format class-attribute instance-attribute

config_format: str | None = None

default_sampling_params class-attribute instance-attribute

default_sampling_params: dict[str, Any] | None = None

devices class-attribute instance-attribute

devices: str | None = None

diffusers_call_kwargs class-attribute instance-attribute

diffusers_call_kwargs: dict[str, Any] | None = None

diffusers_load_kwargs class-attribute instance-attribute

diffusers_load_kwargs: dict[str, Any] | None = None

diffusion_attention_backend class-attribute instance-attribute

diffusion_attention_backend: str | None = None

diffusion_attention_config class-attribute instance-attribute

diffusion_attention_config: dict[str, Any] | None = None

diffusion_kv_cache_dtype class-attribute instance-attribute

diffusion_kv_cache_dtype: str | None = None

diffusion_kv_cache_skip_layers class-attribute instance-attribute

diffusion_kv_cache_skip_layers: str | None = None

diffusion_kv_cache_skip_steps class-attribute instance-attribute

diffusion_kv_cache_skip_steps: str | None = None

diffusion_load_format class-attribute instance-attribute

diffusion_load_format: str | None = None

diffusion_quantization_config class-attribute instance-attribute

diffusion_quantization_config: str | None = None

disable_hybrid_kv_cache_manager class-attribute instance-attribute

disable_hybrid_kv_cache_manager: bool | None = None

enable_cache_dit_summary class-attribute instance-attribute

enable_cache_dit_summary: bool | None = None

enable_cpu_offload class-attribute instance-attribute

enable_cpu_offload: bool | None = None

enable_diffusion_pipeline_profiler class-attribute instance-attribute

enable_diffusion_pipeline_profiler: bool | None = None

enable_expert_parallel class-attribute instance-attribute

enable_expert_parallel: bool | None = None

enable_flashinfer_autotune class-attribute instance-attribute

enable_flashinfer_autotune: bool | None = None

enable_layerwise_offload class-attribute instance-attribute

enable_layerwise_offload: bool | None = None

enable_multithread_weight_load class-attribute instance-attribute

enable_multithread_weight_load: bool | None = None

enforce_eager class-attribute instance-attribute

enforce_eager: bool | None = None

engine_extras class-attribute instance-attribute

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

env class-attribute instance-attribute

env: dict[str, Any] | None = None

flow_shift class-attribute instance-attribute

flow_shift: float | None = None

gpu_memory_utilization class-attribute instance-attribute

gpu_memory_utilization: float | None = None

hsdp_replicate_size class-attribute instance-attribute

hsdp_replicate_size: int | None = None

hsdp_shard_size class-attribute instance-attribute

hsdp_shard_size: int | None = None

input_connectors class-attribute instance-attribute

input_connectors: dict[str, str] | None = None

load_format class-attribute instance-attribute

load_format: str | None = None

max_generated_image_size class-attribute instance-attribute

max_generated_image_size: int | None = None

max_model_len class-attribute instance-attribute

max_model_len: int | None = None

max_num_batched_tokens class-attribute instance-attribute

max_num_batched_tokens: int | None = None

max_num_seqs class-attribute instance-attribute

max_num_seqs: int | None = None

mm_processor_cache_gb class-attribute instance-attribute

mm_processor_cache_gb: float | None = None

model_class_name class-attribute instance-attribute

model_class_name: str | None = None

num_replicas class-attribute instance-attribute

num_replicas: int = 1

num_weight_load_threads class-attribute instance-attribute

num_weight_load_threads: int | None = None

output_connectors class-attribute instance-attribute

output_connectors: dict[str, str] | None = None

profiler_config class-attribute instance-attribute

profiler_config: dict[str, Any] | None = None

ring_degree class-attribute instance-attribute

ring_degree: int | None = None

sequence_parallel_size class-attribute instance-attribute

sequence_parallel_size: int | None = None

skip_mm_profiling class-attribute instance-attribute

skip_mm_profiling: bool | None = None

stage_id instance-attribute

stage_id: int

step_execution class-attribute instance-attribute

step_execution: bool | None = None

subtalker_sampling_params class-attribute instance-attribute

subtalker_sampling_params: dict[str, Any] | None = None

tensor_parallel_size class-attribute instance-attribute

tensor_parallel_size: int | None = None

tokenizer_mode class-attribute instance-attribute

tokenizer_mode: str | None = None

tts_max_instructions_length class-attribute instance-attribute

tts_max_instructions_length: int | None = None

ulysses_degree class-attribute instance-attribute

ulysses_degree: int | None = None

ulysses_mode class-attribute instance-attribute

ulysses_mode: str | None = None

use_hsdp class-attribute instance-attribute

use_hsdp: bool | None = None

vae_parallel_mode class-attribute instance-attribute

vae_parallel_mode: str | None = None

vae_patch_parallel_size class-attribute instance-attribute

vae_patch_parallel_size: int | None = None

vae_use_slicing class-attribute instance-attribute

vae_use_slicing: bool | None = None

vae_use_tiling class-attribute instance-attribute

vae_use_tiling: bool | None = None

StageExecutionType

Bases: str, Enum

Merged StageType + WorkerType — 3 combinations today.

DIFFUSION class-attribute instance-attribute

DIFFUSION = 'diffusion'

LLM_AR class-attribute instance-attribute

LLM_AR = 'llm_ar'

LLM_GENERATION class-attribute instance-attribute

LLM_GENERATION = 'llm_generation'

StagePipelineConfig dataclass

Fixed topology for one stage (frozen, not user-configurable).

async_chunk_process_next_stage_input_func class-attribute instance-attribute

async_chunk_process_next_stage_input_func: str | None = None

cfg_kv_collect_func class-attribute instance-attribute

cfg_kv_collect_func: str | None = None

custom_process_input_func class-attribute instance-attribute

custom_process_input_func: str | None = None

custom_process_next_stage_input_func class-attribute instance-attribute

custom_process_next_stage_input_func: str | None = None

engine_output_type class-attribute instance-attribute

engine_output_type: str | None = None

execution_type class-attribute instance-attribute

extras class-attribute instance-attribute

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

final_output class-attribute instance-attribute

final_output: bool = False

final_output_type class-attribute instance-attribute

final_output_type: str | None = None

hf_config_name class-attribute instance-attribute

hf_config_name: str | None = None

input_sources class-attribute instance-attribute

input_sources: tuple[int, ...] = ()

model_arch class-attribute instance-attribute

model_arch: str | None = None

model_stage instance-attribute

model_stage: str

model_subdir class-attribute instance-attribute

model_subdir: str | None = None

omni_kv_config class-attribute instance-attribute

omni_kv_config: dict[str, Any] | None = None

owns_tokenizer class-attribute instance-attribute

owns_tokenizer: bool = False

prompt_expand_func class-attribute instance-attribute

prompt_expand_func: str | None = None

requires_multimodal_data class-attribute instance-attribute

requires_multimodal_data: bool = False

sampling_constraints class-attribute instance-attribute

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

scheduler_cls class-attribute instance-attribute

scheduler_cls: str | None = None

stage_id instance-attribute

stage_id: int

sync_process_input_func class-attribute instance-attribute

sync_process_input_func: str | None = None

tokenizer_subdir class-attribute instance-attribute

tokenizer_subdir: str | None = None

StageType

Bases: str, Enum

Type of processing stage in the Omni pipeline.

DIFFUSION class-attribute instance-attribute

DIFFUSION = 'diffusion'

LLM class-attribute instance-attribute

LLM = 'llm'

VllmOmniARStageConfig

Bases: BaseVllmOmniStageConfig

Structured config for autoregressive LLM stages.

VllmOmniConfig

Top-level structured Omni config built once from registry inputs.

orchestrator_config class-attribute instance-attribute

orchestrator_config: VllmOmniOrchestratorConfig = field(
    default_factory=VllmOmniOrchestratorConfig
)

pipeline_config instance-attribute

pipeline_config: PipelineConfig

stage_configs instance-attribute

stage_configs: tuple[StageConfigType, ...]

from_registry classmethod

from_registry(
    model_type: str,
    deploy_config_path: str | None = None,
    cli_overrides: dict[str, Any] | None = None,
) -> VllmOmniConfig

Create a structured config from a registered pipeline and deploy YAML.

stage_by_id

stage_by_id(stage_id: int) -> StageConfigType

VllmOmniDiffusionStageConfig

Bases: BaseVllmOmniStageConfig

Structured config for diffusion stages.

diffusion_config class-attribute instance-attribute

diffusion_config: _DiffusionConfigProjection = field(
    default_factory=_DiffusionConfigProjection
)

parallel_config class-attribute instance-attribute

VllmOmniGenerationStageConfig

Bases: BaseVllmOmniStageConfig

Structured config for generation LLM stages.

VllmOmniOrchestratorConfig

Configuration consumed by the orchestrator process only.

batch_timeout class-attribute instance-attribute

batch_timeout: int = Field(default=10, ge=0)

deploy_config_path class-attribute instance-attribute

deploy_config_path: str | None = None

init_timeout class-attribute instance-attribute

init_timeout: int = Field(default=600, ge=1)

omni_dp_size_local class-attribute instance-attribute

omni_dp_size_local: int = Field(default=1, ge=1)

omni_heartbeat_timeout class-attribute instance-attribute

omni_heartbeat_timeout: float = Field(default=30.0, gt=0.0)

omni_lb_policy class-attribute instance-attribute

omni_lb_policy: str = 'random'

omni_master_address class-attribute instance-attribute

omni_master_address: str | None = None

omni_master_port class-attribute instance-attribute

omni_master_port: int | None = None

ray_address class-attribute instance-attribute

ray_address: str | None = None

shm_threshold_bytes class-attribute instance-attribute

shm_threshold_bytes: int = Field(default=65536, ge=0)

stage_init_timeout class-attribute instance-attribute

stage_init_timeout: int = Field(default=300, ge=1)

worker_backend class-attribute instance-attribute

worker_backend: str = 'multi_process'

create_config

create_config(data: Any) -> DictConfig

Wrap a dict (or list) into a DictConfig.

Parameters:

Name Type Description Default
data Any

Dict, list, or other structure to wrap.

required

Returns:

Type Description
DictConfig

OmegaConf DictConfig / ListConfig.

load_deploy_config

load_deploy_config(path: str | Path) -> DeployConfig

Load a deploy YAML (with optional base_config inheritance).

load_yaml_config

load_yaml_config(path: str | Any) -> DictConfig

Load a YAML file and return it as a DictConfig.

Parameters:

Name Type Description Default
path str | Any

Path to the YAML file.

required

Returns:

Type Description
DictConfig

OmegaConf DictConfig with attribute-style access.

merge_configs

merge_configs(*cfgs: Any) -> dict

Deep-merge multiple configs and return a plain dict.

Parameters:

Name Type Description Default
*cfgs Any

DictConfig or dict objects to merge (left to right).

()

Returns:

Type Description
dict

Plain dict with merged, resolved values.

merge_pipeline_deploy

merge_pipeline_deploy(
    pipeline: PipelineConfig,
    deploy: DeployConfig,
    cli_overrides: dict[str, Any] | None = None,
) -> list[StageConfig]

Merge pipeline + deploy + platform overrides → list[StageConfig].

register_pipeline

register_pipeline(
    pipeline: PipelineConfig | PipelineResolverFunc,
    model_type: str | None = None,
)

Register an out of tree pipeline or PipelineResolverFunc to a model_type key. If a PipelineConfig is provided, model_type is optional, and pipeline.model_type will be used by default. If a callable is provided, model_type must be provided, since resolvers can return multiple different PipelineConfigs depending on the consumed config.

to_dict

to_dict(obj: Any, *, resolve: bool = True) -> Any

Convert a DictConfig (or similar) to a plain dict.

Parameters:

Name Type Description Default
obj Any

OmegaConf container to convert.

required
resolve bool

Whether to resolve interpolations (default True).

True

Returns:

Type Description
Any

Plain dict.