Isolate Qwen-Image 2.1 prefill and decode scheduling (#7770)
Signed-off-by: Tianyu Guo <guoty9@mail2.sysu.edu.cn>
This commit is contained in:
1 parent
a26013145c
commit
b0a309e5e7
4 files changed
+27
-3
No files matched your search
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -13,6 +13,7 @@ from vllm_omni.diffusion.sched.base_scheduler import BaseScheduler
|
||||
from vllm_omni.diffusion.sched.interface import (
|
||||
DiffusionRequestStatus,
|
||||
DiffusionSchedulerOutput,
|
||||
SchedulerRequestState,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -62,6 +63,19 @@ class StepScheduler(BaseScheduler):
|
||||
)
|
||||
return request_id
|
||||
|
||||
def _can_schedule_waiting(self, state: SchedulerRequestState) -> bool:
|
||||
if not super()._can_schedule_waiting(state):
|
||||
return False
|
||||
|
||||
is_first_step = self._request_progress[state.request_id].current_step == 0
|
||||
for request_id in self._running:
|
||||
running = self._request_states[request_id]
|
||||
if state.req.allow_mixed_step_phases and running.req.allow_mixed_step_phases:
|
||||
continue
|
||||
if (self._request_progress[request_id].current_step == 0) != is_first_step:
|
||||
return False
|
||||
return True
|
||||
|
||||
def update_from_output(self, sched_output: DiffusionSchedulerOutput, output: RunnerOutput) -> set[str]:
|
||||
scheduled_request_ids = sched_output.scheduled_request_ids
|
||||
if not scheduled_request_ids:
|
||||
|
||||
Reference in new issue
Block a user