Skip to content

vllm_omni.diffusion.interaction.coordinator

Interaction coordinator to be co-owned by a pipeline and a runner.

InteractionCoordinator

Handles mid-way interaction inputs for one loaded pipeline.

Request-local session state lives on StepRequestState.interaction_sessions; this object is request-agnostic.

model_class_name instance-attribute

model_class_name = model_class_name

needs_chunk_media property

needs_chunk_media: bool

Whether any registered handler needs chunk media/latent counts + fps.

apply_at_chunk_boundary

apply_at_chunk_boundary(
    state: StepRequestState,
    *,
    boundary_at: float,
    chunk_index: int | None = None,
    num_media_frames: int | None = None,
    fps: float | None = None,
    num_latent_frames: int | None = None,
) -> InteractionChunkMetadata

Fan out chunk-boundary apply to handlers in stable order (prompt first).

build classmethod

build(
    pipeline: object, od_config: OmniDiffusionConfig
) -> InteractionCoordinator

enqueue

enqueue(
    state: StepRequestState,
    *,
    modality: str,
    event_id: str,
    received_at: float,
    payload: InteractionPayload,
    transition_chunks: int | None,
) -> None

Fan out enqueue to handlers in stable order (prompt first).

enqueue_parts

enqueue_parts(
    state: StepRequestState,
    *,
    parts: list[tuple[str, InteractionPayload]],
    event_id: str,
    received_at: float,
    transition_chunks: int | None,
) -> None

Ensure every modality is supported and every payload validates, then enqueue.

Composite events must not partially mutate queues when a later track is unsupported or carries an invalid payload.

get_handler

get_handler(modality: str) -> InteractionHandler

has_modality

has_modality(modality: str) -> bool

maybe_prepare_initial_session

maybe_prepare_initial_session(
    state: StepRequestState,
    pipeline: SupportsInteractionApply,
) -> InteractionChunkMetadata

Materialize non-lazy modality sessions before chunk 0 denoise.

Handlers with lazy_initialize_session=False (e.g. camera) must exist before the first chunk even with no client enqueue.