[Core][Refactor][Diffusion] refactor request scheduler's admission wait policy (#5843)

Signed-off-by: Huang, Zeyu <11222265+fhfuih@users.noreply.github.com>
Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
Zeyu Huang | 黃澤宇andHongsheng Liu authored and GitHub committed 2026-08-10 15:06:27 +08:00
1 parent c588208cc6
commit 33dd9a5a3e
13 files changed
+253 -54

No files matched your search

+13 -1
View File
@@ -7,6 +7,7 @@ diffusion models (e.g., Qwen-Image) through the same CLI interface.
import argparse
import json
import math
import os
import signal
from types import FrameType
@@ -43,6 +44,17 @@ Search by using: `--help=<ConfigGroup>` to explore options by section (e.g.,
"""
def _nonneg_finite_float(value: str) -> float:
"""Argparse type for finite, non-negative floats (rejects nan/inf)."""
try:
parsed = float(value)
except ValueError as exc:
raise argparse.ArgumentTypeError(f"invalid float value: {value!r}") from exc
if not math.isfinite(parsed) or parsed < 0:
raise argparse.ArgumentTypeError(f"must be a finite non-negative number, got {value!r}")
return parsed
def _ensure_vllm_platform():
"""Ensure vLLM's current_platform is valid before arg parsing.
@@ -599,7 +611,7 @@ class OmniServeCommand(CLISubcommand):
)
omni_config_group.add_argument(
"--request-batch-max-wait-ms",
type=float,
type=_nonneg_finite_float,
default=0.0,
help="Request-mode batch admission: max milliseconds to wait for compatible "
"requests to accumulate before scheduling a fused forward wave. "