[Core][Diffusion] Add a typed pre-D2H video media contract (#6615)

Signed-off-by: NancyFyong <NancyFyong@users.noreply.github.com>
Signed-off-by: Samit <285365963@qq.com>
Co-authored-by: NancyFyong <NancyFyong@users.noreply.github.com>
Co-authored-by: Samit <285365963@qq.com>
This commit is contained in:
authored and GitHub committed 2026-09-10 09:50:54 +00:00
1 parent 5b927b7ceb
commit a2486dd00b
31 files changed
+3054 -60

No files matched your search

+18
View File
@@ -71,6 +71,16 @@ def _nonneg_finite_float(value: str) -> float:
return parsed
def _json_object(value: str) -> dict[str, object]:
try:
parsed = json.loads(value)
except json.JSONDecodeError as exc:
raise argparse.ArgumentTypeError(f"must be valid JSON: {exc}") from exc
if not isinstance(parsed, dict):
raise argparse.ArgumentTypeError("must be a JSON object")
return parsed
def _ensure_vllm_platform():
"""Ensure vLLM's current_platform is valid before arg parsing.
@@ -669,6 +679,14 @@ class OmniServeCommand(CLISubcommand):
'MagCache: \'{"mag_threshold": 0.24, "mag_max_skip_steps": 5, "mag_retention_ratio": 0.1}\'. '
"Calibration mode: add '\"mag_calibrate\": true'",
)
omni_config_group.add_argument(
"--video-output-transport",
type=_json_object,
default=None,
help=(
"JSON object configuring video output preparation, for example '{\"enable_device_postprocess\": true}'."
),
)
omni_config_group.add_argument(
"--enable-cache-dit-summary",
action="store_true",