[Diffusion] Prepare HunyuanImage3 for Scheduler-managed paged KV cache (#5541)
Signed-off-by: zwhzzz0821 <zwhzzz0821@users.noreply.github.com> Co-authored-by: zwhzzz0821 <zwhzzz0821@users.noreply.github.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
24 files changed
+1728
-277
No files matched your search
@@ -2,12 +2,17 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import random
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from vllm_omni.inputs.data import OmniDiffusionSamplingParams, OmniPromptType
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from vllm_omni.diffusion.diffusion_kv.request import DiffusionKVRequest
|
||||
|
||||
DUMMY_DIFFUSION_REQUEST_ID = "dummy_req_id"
|
||||
|
||||
|
||||
@@ -30,6 +35,14 @@ class OmniDiffusionRequest:
|
||||
sampling_params: OmniDiffusionSamplingParams
|
||||
request_id: str
|
||||
kv_sender_info: dict[str, Any] | None = None
|
||||
# Optional opaque, model-owned input prepared before Scheduler admission.
|
||||
# Model code validates its concrete type when consuming it on the Worker.
|
||||
prepared_layout: Any | None = None
|
||||
# Scheduler-only native-compatible KV requests produced by model
|
||||
# preprocessing.
|
||||
# BaseScheduler takes ownership and clears this field before the request is
|
||||
# sent to a Worker.
|
||||
diffusion_kv_requests: tuple[DiffusionKVRequest, ...] | None = None
|
||||
|
||||
def __post_init__(self):
|
||||
"""Initialize dependent fields after dataclass initialization."""
|
||||
|
||||
Reference in new issue
Block a user