Skip to content

vllm_omni.diffusion.sched.interface

CachedRequestData dataclass

Cached diffusion requests that only need their request ids resent.

request_ids instance-attribute

request_ids: list[str]

make_empty classmethod

make_empty() -> CachedRequestData

DiffusionRequestState dataclass

Scheduler-owned state for one queued OmniDiffusionRequest.

error class-attribute instance-attribute

error: str | None = None

req instance-attribute

request_id instance-attribute

request_id: str

sampling_params_key class-attribute instance-attribute

sampling_params_key: SamplingParamsKey | None = None

status class-attribute instance-attribute

is_finished

is_finished() -> bool

DiffusionRequestStatus

Bases: IntEnum

Request status tracked by diffusion scheduler.

FINISHED_ABORTED class-attribute instance-attribute

FINISHED_ABORTED = auto()

FINISHED_COMPLETED class-attribute instance-attribute

FINISHED_COMPLETED = auto()

FINISHED_ERROR class-attribute instance-attribute

FINISHED_ERROR = auto()

PREEMPTED class-attribute instance-attribute

PREEMPTED = auto()

RUNNING class-attribute instance-attribute

RUNNING = auto()

WAITING class-attribute instance-attribute

WAITING = auto()

is_finished staticmethod

is_finished(status: DiffusionRequestStatus) -> bool

DiffusionSchedulerOutput dataclass

Output of a single scheduling cycle.

finished_req_ids instance-attribute

finished_req_ids: set[str]

is_empty property

is_empty: bool

num_running_reqs instance-attribute

num_running_reqs: int

num_scheduled_reqs property

num_scheduled_reqs: int

num_waiting_reqs instance-attribute

num_waiting_reqs: int

scheduled_cached_reqs instance-attribute

scheduled_cached_reqs: CachedRequestData

scheduled_new_reqs instance-attribute

scheduled_new_reqs: list[NewRequestData]

scheduled_request_ids cached property

scheduled_request_ids: list[str]

All scheduled request ids in this cycle, including both new and cached ones.

step_id instance-attribute

step_id: int

NewRequestData dataclass

Full request payload for a newly scheduled diffusion request.

req instance-attribute

request_id instance-attribute

request_id: str

from_state classmethod

from_state(state: DiffusionRequestState) -> NewRequestData

SamplingParamsKey dataclass

Batch-compatibility key derived from OmniDiffusionSamplingParams.

Only requests with the same key can be batched together. Fields not included here are treated as request-local and do not participate in the current homogeneous batching policy.

boundary_ratio class-attribute instance-attribute

boundary_ratio: float | None = None

cfg_normalize class-attribute instance-attribute

cfg_normalize: bool = False

do_classifier_free_guidance class-attribute instance-attribute

do_classifier_free_guidance: bool = False

fps class-attribute instance-attribute

fps: int | None = None

frame_rate class-attribute instance-attribute

frame_rate: float | None = None

guidance_rescale class-attribute instance-attribute

guidance_rescale: float = 0.0

guidance_scale class-attribute instance-attribute

guidance_scale: float = 0.0

guidance_scale_2 class-attribute instance-attribute

guidance_scale_2: float | None = None

guidance_scale_provided class-attribute instance-attribute

guidance_scale_provided: bool = False

height class-attribute instance-attribute

height: int | None = None

lora_int_id class-attribute instance-attribute

lora_int_id: int | None = None

lora_scale class-attribute instance-attribute

lora_scale: float = 1.0

num_frames class-attribute instance-attribute

num_frames: int = 1

resolution class-attribute instance-attribute

resolution: int | str | None = None

true_cfg_scale class-attribute instance-attribute

true_cfg_scale: float | None = None

width class-attribute instance-attribute

width: int | None = None

SchedulerInterface

Bases: ABC

Abstract lifecycle contract for diffusion schedulers.

add_request abstractmethod

add_request(request: OmniDiffusionRequest) -> str

Add a request and return the scheduler-owned request id.

close abstractmethod

close() -> None

Release scheduler-owned state.

finish_requests abstractmethod

finish_requests(
    request_ids: str | list[str],
    status: DiffusionRequestStatus,
) -> None

Mark one or more requests finished.

get_request_state abstractmethod

get_request_state(
    request_id: str,
) -> DiffusionRequestState | None

Return request state if present.

has_requests abstractmethod

has_requests() -> bool

Return whether the scheduler still owns runnable requests.

initialize abstractmethod

initialize(od_config: OmniDiffusionConfig) -> None

Initialize or reset scheduler state.

pop_request_state abstractmethod

pop_request_state(
    request_id: str,
) -> DiffusionRequestState | None

Remove and return request state if present.

preempt_request abstractmethod

preempt_request(request_id: str) -> bool

Preempt a running request back to waiting.

schedule abstractmethod

Run one scheduling cycle.

update_from_output abstractmethod

update_from_output(
    sched_output: DiffusionSchedulerOutput,
    output: RunnerOutput,
) -> set[str]

Update scheduler state from executor output.