vllm_omni.diffusion.sched.interface ¶
CachedRequestData dataclass ¶
Cached diffusion requests that only need their request ids resent.
DiffusionRequestState dataclass ¶
Scheduler-owned state for one queued OmniDiffusionRequest.
sampling_params_key class-attribute instance-attribute ¶
sampling_params_key: SamplingParamsKey | None = None
DiffusionSchedulerOutput dataclass ¶
Output of a single scheduling cycle.
scheduled_request_ids cached property ¶
All scheduled request ids in this cycle, including both new and cached ones.
NewRequestData dataclass ¶
Full request payload for a newly scheduled diffusion request.
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.
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.
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 a running request back to waiting.
update_from_output abstractmethod ¶
update_from_output(
sched_output: DiffusionSchedulerOutput,
output: RunnerOutput,
) -> set[str]
Update scheduler state from executor output.