diff --git a/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g1.yaml b/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g1.yaml new file mode 100644 index 0000000000..cfc94947d7 --- /dev/null +++ b/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g1.yaml @@ -0,0 +1,70 @@ +schema: 2 +name: wan22-sglang-serving-client-g1 + +resources: + gpu_type: h200 + +services: + - name: video-server + type: generic + nodes: 1 + critical: true + start: before_workers + command: [python3, -m, infx.bench, video, serve] + args: + - --model-view + - snapshot + - -- + - /opt/sglang/bin/python3 + - -m + - evaluator.srt_selected + - serve + - --model-type + - diffusion + - --model-path + - "{model_path}" + - --model-id + - "{model_id}" + - --revision + - "{model_revision}" + - --num-gpus + - "{gpus_per_node}" + # Deployment only: one GPU runs both CFG branches with no sequence parallelism. + - --cfg-parallel-size + - "1" + - --ulysses-degree + - "1" + - --tp-size + - "1" + - --encoder-parallel + - auto + # SGLang takes the UniPC shift from this flag and ignores the request field. + - --flow-shift + - "12.0" + - --warmup-resolutions + - 832x480 + # The release set reuses each prompt across five seeds; cached text embeddings would skip work. + - --disable-conditioning-cache + - --performance-mode + - speed + - --host + - 0.0.0.0 + - --port + - "30283" + - --enable-torch-compile + - "false" + - --dit-cpu-offload + - "false" + env: + PYTHONPATH: /video-package:/infmax-workspace + PYTHONUNBUFFERED: "1" + VIDEO_SERVER_PORT: "30283" + VIDEO_RUNTIME_REVISION: 297e54fd105e974cdf401e5b4d20253a22c16f90 + HF_HUB_OFFLINE: "1" + TRANSFORMERS_OFFLINE: "1" + readiness: + http: + port: 30283 + path: /health + timeout_seconds: 3600 + interval_seconds: 5 diff --git a/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g2.yaml b/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g2.yaml new file mode 100644 index 0000000000..8aa5933d0c --- /dev/null +++ b/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g2.yaml @@ -0,0 +1,70 @@ +schema: 2 +name: wan22-sglang-serving-client-g2 + +resources: + gpu_type: h200 + +services: + - name: video-server + type: generic + nodes: 1 + critical: true + start: before_workers + command: [python3, -m, infx.bench, video, serve] + args: + - --model-view + - snapshot + - -- + - /opt/sglang/bin/python3 + - -m + - evaluator.srt_selected + - serve + - --model-type + - diffusion + - --model-path + - "{model_path}" + - --model-id + - "{model_id}" + - --revision + - "{model_revision}" + - --num-gpus + - "{gpus_per_node}" + # Deployment only: CFG branches on two GPUs, no sequence parallelism. + - --cfg-parallel-size + - "2" + - --ulysses-degree + - "1" + - --tp-size + - "1" + - --encoder-parallel + - auto + # SGLang takes the UniPC shift from this flag and ignores the request field. + - --flow-shift + - "12.0" + - --warmup-resolutions + - 832x480 + # The release set reuses each prompt across five seeds; cached text embeddings would skip work. + - --disable-conditioning-cache + - --performance-mode + - speed + - --host + - 0.0.0.0 + - --port + - "30283" + - --enable-torch-compile + - "false" + - --dit-cpu-offload + - "false" + env: + PYTHONPATH: /video-package:/infmax-workspace + PYTHONUNBUFFERED: "1" + VIDEO_SERVER_PORT: "30283" + VIDEO_RUNTIME_REVISION: 297e54fd105e974cdf401e5b4d20253a22c16f90 + HF_HUB_OFFLINE: "1" + TRANSFORMERS_OFFLINE: "1" + readiness: + http: + port: 30283 + path: /health + timeout_seconds: 3600 + interval_seconds: 5 diff --git a/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g4.yaml b/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g4.yaml new file mode 100644 index 0000000000..28fc689375 --- /dev/null +++ b/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g4.yaml @@ -0,0 +1,70 @@ +schema: 2 +name: wan22-sglang-serving-client-g4 + +resources: + gpu_type: h200 + +services: + - name: video-server + type: generic + nodes: 1 + critical: true + start: before_workers + command: [python3, -m, infx.bench, video, serve] + args: + - --model-view + - snapshot + - -- + - /opt/sglang/bin/python3 + - -m + - evaluator.srt_selected + - serve + - --model-type + - diffusion + - --model-path + - "{model_path}" + - --model-id + - "{model_id}" + - --revision + - "{model_revision}" + - --num-gpus + - "{gpus_per_node}" + # Deployment only: CFG branches on two GPU groups, Ulysses sequence parallelism within each. + - --cfg-parallel-size + - "2" + - --ulysses-degree + - "2" + - --tp-size + - "1" + - --encoder-parallel + - auto + # SGLang takes the UniPC shift from this flag and ignores the request field. + - --flow-shift + - "12.0" + - --warmup-resolutions + - 832x480 + # The release set reuses each prompt across five seeds; cached text embeddings would skip work. + - --disable-conditioning-cache + - --performance-mode + - speed + - --host + - 0.0.0.0 + - --port + - "30283" + - --enable-torch-compile + - "false" + - --dit-cpu-offload + - "false" + env: + PYTHONPATH: /video-package:/infmax-workspace + PYTHONUNBUFFERED: "1" + VIDEO_SERVER_PORT: "30283" + VIDEO_RUNTIME_REVISION: 297e54fd105e974cdf401e5b4d20253a22c16f90 + HF_HUB_OFFLINE: "1" + TRANSFORMERS_OFFLINE: "1" + readiness: + http: + port: 30283 + path: /health + timeout_seconds: 3600 + interval_seconds: 5 diff --git a/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client.yaml b/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client.yaml new file mode 100644 index 0000000000..8d983d1ed6 --- /dev/null +++ b/inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client.yaml @@ -0,0 +1,70 @@ +schema: 2 +name: wan22-sglang-serving-client + +resources: + gpu_type: h200 + +services: + - name: video-server + type: generic + nodes: 1 + critical: true + start: before_workers + command: [python3, -m, infx.bench, video, serve] + args: + - --model-view + - snapshot + - -- + - /opt/sglang/bin/python3 + - -m + - evaluator.srt_selected + - serve + - --model-type + - diffusion + - --model-path + - "{model_path}" + - --model-id + - "{model_id}" + - --revision + - "{model_revision}" + - --num-gpus + - "{gpus_per_node}" + # Deployment only: CFG branches on two GPU groups, Ulysses sequence parallelism within each. + - --cfg-parallel-size + - "2" + - --ulysses-degree + - "4" + - --tp-size + - "1" + - --encoder-parallel + - auto + # SGLang takes the UniPC shift from this flag and ignores the request field. + - --flow-shift + - "12.0" + - --warmup-resolutions + - 832x480 + # The release set reuses each prompt across five seeds; cached text embeddings would skip work. + - --disable-conditioning-cache + - --performance-mode + - speed + - --host + - 0.0.0.0 + - --port + - "30283" + - --enable-torch-compile + - "false" + - --dit-cpu-offload + - "false" + env: + PYTHONPATH: /video-package:/infmax-workspace + PYTHONUNBUFFERED: "1" + VIDEO_SERVER_PORT: "30283" + VIDEO_RUNTIME_REVISION: 297e54fd105e974cdf401e5b4d20253a22c16f90 + HF_HUB_OFFLINE: "1" + TRANSFORMERS_OFFLINE: "1" + readiness: + http: + port: 30283 + path: /health + timeout_seconds: 3600 + interval_seconds: 5 diff --git a/inferencex-e2e/configs/nvidia-master.yaml b/inferencex-e2e/configs/nvidia-master.yaml index 782d099f23..f4dec7ed6b 100644 --- a/inferencex-e2e/configs/nvidia-master.yaml +++ b/inferencex-e2e/configs/nvidia-master.yaml @@ -8086,6 +8086,33 @@ wan22-bf16-b300-vllm-omni-video: srt-recipe: serving-client.yaml conc-list: [1] +wan22-bf16-h200-sglang-video: + image: lmsysorg/sglang:v0.5.23@sha256:f7876bef696ccf9cf75a2bf7ccb82970f5fac577f082fb8ca95c9a59d2160eb5 + model: Wan-AI/Wan2.2-T2V-A14B-Diffusers + model-prefix: wan22 + runner: cluster:h200-dgxc + precision: bf16 + framework: sglang + multinode: false + srt-recipe-dir: wan22/sglang/h200-bf16 + scenarios: + video-generation: + - spec: wan22.yaml + set: release-v1 + search-space: + - gpus: 1 + srt-recipe: serving-client-g1.yaml + conc-list: [1] + - gpus: 2 + srt-recipe: serving-client-g2.yaml + conc-list: [1] + - gpus: 4 + srt-recipe: serving-client-g4.yaml + conc-list: [1] + - gpus: 8 + srt-recipe: serving-client.yaml + conc-list: [1] + glm5.3-fp4-b300-sglang-agentic-mtp: image: lmsysorg/sglang:v0.5.20-cu130@sha256:b27fce60bc5494c118c4910702812bcfa8cee67abcdd1ff8b0902f21647552f4 model: nvidia/GLM-5.3-NVFP4 diff --git a/inferencex-e2e/docs/MODELS.md b/inferencex-e2e/docs/MODELS.md index 8103a60610..df19b1ae1c 100644 --- a/inferencex-e2e/docs/MODELS.md +++ b/inferencex-e2e/docs/MODELS.md @@ -46,7 +46,7 @@ For non-grandfathered models, `ROCM_QUICK_REDUCE_QUANTIZATION`, `VLLM_ROCM_QUICK |---|---|---| | Agentic coding | Long Context, Multi Turn Realistic traffic trace replay with sub agents | Active. This is the trace-replay agentic-coding benchmark (see the srt-slurm recipes under [`benchmarks/single_node/srt-slurm-recipes/`](../benchmarks/single_node/srt-slurm-recipes) and the shared client [`benchmarks/srt_agentic.sh`](../benchmarks/srt_agentic.sh)). Going forward, new models will likely be onboarded with agentic coding only. Speculative decoding may be enabled or disabled to produce the best Pareto points; a separate non-spec-decode A/B baseline is not required (see [Deprecation policy](#deprecation-policy)). | | Single-turn 8k1k | 8192 / 1024 | Active. This is the primary fixed-sequence-length scenario. | -| Video generation | H3: 124 frames at 24 fps, 1344x768, C1 | MiniMax-H3 uses native srt-slurm: SGLang selects 20-clip `h3-v2.yaml` C1 points on 1, 2, 4 and 8 B200, H200 or MI355X GPUs and 2, 4 and 8 H100 GPUs, and vLLM-Omni the same B200 points. Wan2.2-T2V-A14B (`wan22.yaml`: 81 frames at 16 fps, 832x480, 20 clips) runs on vLLM-Omni on 1, 2, 4 and 8 B200 or B300 GPUs. The client and server live in [`video-generation`](../../video-generation); energy is reported per valid clip. Config presence does not qualify execution, power, or quality. See [video delivery](video-generation.md). | +| Video generation | H3: 124 frames at 24 fps, 1344x768, C1 | MiniMax-H3 uses native srt-slurm: SGLang selects 20-clip `h3-v2.yaml` C1 points on 1, 2, 4 and 8 B200, H200 or MI355X GPUs and 2, 4 and 8 H100 GPUs, and vLLM-Omni the same B200 points. Wan2.2-T2V-A14B (`wan22.yaml`: 81 frames at 16 fps, 832x480, 20 clips) runs on vLLM-Omni on 1, 2, 4 and 8 B200 or B300 GPUs and on SGLang on 1, 2, 4 and 8 H200 GPUs. The client and server live in [`video-generation`](../../video-generation); energy is reported per valid clip. Config presence does not qualify execution, power, or quality. See [video delivery](video-generation.md). | | Single-turn 1k1k | 1024 / 1024 | Deprecated since 2026-07-17 ([#2263](https://github.com/SemiAnalysisAI/InferenceX/pull/2263)), to save GPU cluster time for higher-priority real-world agentic-coding benchmarks and new frontier models. Archived configs lived in `configs/deprecated/` until it was deleted (#3463); see git history. The GLM-5.1 B200 TileRT point added later in [#2533](https://github.com/SemiAnalysisAI/InferenceX/pull/2533) was the last 1k1k config; it was retired on 2026-10-01 ([#3638](https://github.com/SemiAnalysisAI/InferenceX/pull/3638)). | | Single-turn 1k8k | 1024 / 8192 | **Deprecated for all models** since 2026-03-27 ([#911](https://github.com/SemiAnalysisAI/InferenceX/pull/911)), to save GPU cluster time for higher-priority real-world agentic-coding benchmarks and new frontier models. Configs were removed, not archived. | diff --git a/inferencex-e2e/docs/video-generation.md b/inferencex-e2e/docs/video-generation.md index 522d626c96..49b5095941 100644 --- a/inferencex-e2e/docs/video-generation.md +++ b/inferencex-e2e/docs/video-generation.md @@ -7,8 +7,9 @@ one 80 GB GPU), and vLLM-Omni the same four B200 deployments, all using `h3-v2.yaml`: 20 distinct measured prompts, a separate warmup, 49 denoising updates, and 124 frames at 24 fps and 1344×768. A five-second request produces 124/24 seconds of video. Wan2.2-T2V-A14B runs vLLM-Omni on 1, 2, 4 and 8 -B200 or B300 GPUs (CFG parallel 1 x Ulysses 1 on one GPU, then CFG parallel 2 x -Ulysses 1, 2 and 4) using `wan22.yaml` `release-v1`: four +B200 or B300 GPUs and SGLang on 1, 2, 4 and 8 H200 GPUs (CFG parallel 1 x +Ulysses 1 on one GPU, then CFG parallel 2 x Ulysses 1, 2 and 4) using +`wan22.yaml` `release-v1`: four prompts by five seeds, one warmup, 40 UniPC steps, and 81 silent frames at 16 fps and 832×480; its `smoke` set sends the same request controls for one case. Config presence is not GPU or quality qualification. @@ -49,7 +50,11 @@ includes the declared settings. The Python entrypoint validates the workload and GPU identity, prepares an explicitly selected model view, records the final command, then starts it. -It adds no engine flags or performance environment defaults. The SGLang child +It adds no engine flags or performance environment defaults. For Wan2.2 on +SGLang it also requires `--flow-shift` and the checkpoint's `boundary_ratio` to +equal the plan, because SGLang reads neither from a request. SGLang's Wan2.2 +requests set `x264_preset: ultrafast` and `output_compression: 63` (CRF 18), +the libx264 encoding vLLM-Omni v0.32.0 delivers by default. The SGLang child checks the assigned UUID order before importing its engine. The previous B200 `frozen-c124` four-clip JSON and YAML artifacts remain readable as historical evidence. The App shows their four-sample cells in History, below its ten-valid-sample chart diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index 316d793884..5114e2b3a0 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -12979,3 +12979,12 @@ - "The dcp8-disagg and agg frontends drop router-session-affinity-ttl-secs 1: with one-second session affinity a share of 1P5D decode picks stayed on an engine that was already busy." - "Aggregated TP16/DCP16 at concurrency 1 moves to the new image and Dynamo with no other change." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/5069 + +- config-keys: + - wan22-bf16-h200-sglang-video + scenario-type: [video-generation] + description: + - "Add an H200 Wan2.2-T2V-A14B baseline on SGLang v0.5.23, by the digest the H3 SGLang rows use: wan22.yaml release-v1 (four prompts by five seeds, one warmup; 832x480, 81 frames at 16 fps, 40 UniPC steps, guidance 4.0 high-noise / 3.0 low-noise, boundary 0.875, flow_shift 12.0, empty negative prompt, BF16), C1 on 1, 2, 4 and 8 GPUs." + - "SGLang takes flow_shift from the --flow-shift server flag and boundary_ratio from the checkpoint's model_index.json, so the server refuses to start when either differs from the spec; the client sends every other control per request. Conditioning cache disabled." + - "Deployment per count, the vLLM-Omni rows' layout: 1 GPU runs both CFG branches with Ulysses 1; 2 GPUs CFG parallel 2 x Ulysses 1; 4 GPUs CFG parallel 2 x Ulysses 2; 8 GPUs CFG parallel 2 x Ulysses 4. TP 1, performance mode speed, no torch.compile, no DiT offload." + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/5113 diff --git a/video-generation/evaluator/runner.py b/video-generation/evaluator/runner.py index e2d01639e2..a8f373be13 100644 --- a/video-generation/evaluator/runner.py +++ b/video-generation/evaluator/runner.py @@ -95,8 +95,16 @@ "negative_prompt", } _WAN22_CELL = {"width": 832, "height": 480, "frame_count": 81, "fps": 16} +# SGLang 297e54fd accepts both as request fields, but its Wan pipeline reads the shift from +# --flow-shift and the boundary from the checkpoint's model_index.json, so the launch binds them. +SGLANG_WAN22_SERVER_CONTROLS = ("boundary_ratio", "flow_shift") # SGLang has no crf field; it encodes with crf = int((1 - output_compression / 100) * 51). SGLANG_OUTPUT_COMPRESSION = {18: 63} +# vLLM-Omni v0.32.0 delivers Wan2.2 at libx264 ultrafast CRF 18; SGLang defaults to fast CRF 25. +_SGLANG_WAN22_ENCODING = { + "x264_preset": "ultrafast", + "output_compression": SGLANG_OUTPUT_COMPRESSION[18], +} def _digest(value: Any) -> str: @@ -157,6 +165,20 @@ def valid_numerical_identity(identity: Any, runtime_revision: str) -> bool: ) +def sglang_flow_shift(argv: list[str]) -> float | None: + """The UniPC shift an SGLang command sets, or None unless exactly one flag sets it. + + SGLang's parser reads `_` as `-` in a flag name, takes `--flag value` or `--flag=value`, + and lets a repeated flag override, so every spelling counts. + """ + values = [] + for part, following in zip(argv, [*argv[1:], ""]): + flag, equals, value = part.partition("=") + if flag.startswith("--") and flag[2:].replace("_", "-") == "flow-shift": + values.append(value if equals else following) + return float(values[0]) if len(values) == 1 else None + + def requested_encoding(plan: dict[str, Any]) -> dict[str, Any] | None: return plan["fairness"]["encoding"] if schema_version(plan) == 2 else None @@ -304,10 +326,8 @@ def _slots(plan: dict[str, Any]) -> list[dict[str, Any]]: def _wan22_payload(plan: dict[str, Any], slot: dict[str, Any], runtime: str) -> dict[str, Any]: - if runtime != "vllm-omni": - raise ValueError("Wan2.2 plans have a vllm-omni request contract only") generation = plan["generation"] - return { + request = { "model": plan["model_id"], "prompt": slot["prompt"], "seed": slot["seed"], @@ -323,6 +343,11 @@ def _wan22_payload(plan: dict[str, Any], slot: dict[str, Any], runtime: str) -> "negative_prompt": generation["negative_prompt"], "num_outputs_per_prompt": 1, } + if runtime == "sglang": + for control in SGLANG_WAN22_SERVER_CONTROLS: + del request[control] + request |= _SGLANG_WAN22_ENCODING + return request def _payload(plan: dict[str, Any], slot: dict[str, Any], runtime: str) -> dict[str, Any]: @@ -779,6 +804,15 @@ def run_plan( "numerical_identity must contain a complete matching server configuration" ) canonical_json_bytes(numerical_identity) + if runtime == "sglang" and frozen["model_id"] == WAN22_MODEL_ID: + # These requests omit the shift, so only the recorded launch shows which one was served. + if numerical_identity is None or ( + sglang_flow_shift(numerical_identity["server_argv"]) + != frozen["generation"]["flow_shift"] + ): + raise ValueError( + "SGLang Wan2.2 runs need a sealed server launch whose --flow-shift equals the plan" + ) _positive(timeout_seconds, "timeout_seconds", maximum=86400) safe_endpoint, parts, api_path = _endpoint(endpoint) credential = None diff --git a/video-generation/evaluator/srt_selected.py b/video-generation/evaluator/srt_selected.py index 6ae9479283..503b3730dd 100644 --- a/video-generation/evaluator/srt_selected.py +++ b/video-generation/evaluator/srt_selected.py @@ -14,7 +14,14 @@ from infx.bench.video import CREDENTIAL_ENV, cell_dir, read_object, window_file, write_json from specs import video_spec -from .runner import RUNTIMES, run_plan, validate_plan +from .runner import ( + RUNTIMES, + SGLANG_WAN22_SERVER_CONTROLS, + WAN22_MODEL_ID, + run_plan, + sglang_flow_shift, + validate_plan, +) RECORDED_ENGINE_ENV = ( "PYTHONPATH", @@ -209,6 +216,14 @@ def server_parallelism(runtime: str, argv: list[str]) -> dict: } +def sglang_wan22_server_controls(model_path: Path, command: list[str]) -> dict: + """The Wan2.2 controls an SGLang launch would serve, read where SGLang reads them.""" + return { + "flow_shift": sglang_flow_shift(command), + "boundary_ratio": read_object(model_path / "model_index.json").get("boundary_ratio"), + } + + def serve( plan: dict, *, @@ -233,6 +248,14 @@ def serve( snapshot = str(model_path) if command.count(snapshot) != 1: raise ValueError("the engine command must contain the model snapshot path exactly once") + if runtime == "sglang" and plan["model_id"] == WAN22_MODEL_ID: + served = sglang_wan22_server_controls(model_path, command) + for control in SGLANG_WAN22_SERVER_CONTROLS: + if served[control] != plan["generation"][control]: + raise ValueError( + f"SGLang would serve {control} {served[control]!r}, " + f"not the plan's {plan['generation'][control]!r}" + ) uuids = gpu_devices() if len(uuids) != gpus: diff --git a/video-generation/specs/README.md b/video-generation/specs/README.md index f2bae3a9f4..1e663cceeb 100644 --- a/video-generation/specs/README.md +++ b/video-generation/specs/README.md @@ -6,7 +6,7 @@ `h3-v2.yaml` is a separate proposed 5-second H3 workload. Its `release-v1` set contains 20 distinct measured prompts with fixed seeds and a disjoint warmup prompt. The expected delivered clip is 124 frames at 24 fps (124/24 seconds), 1344×768, with 32 kHz stereo audio. The request uses 49 denoising updates; the frozen schedule identity records 50 sigma points and video/audio shifts 12/3. -`wan22.yaml` defines the silent Wan2.2-T2V-A14B text-to-video workload: 832×480, 81 frames at 16 fps, 40 steps, guidance 4.0 for the high-noise expert and 3.0 for the low-noise expert, boundary 0.875, flow shift 12 and an empty negative prompt, all sent per request. `release-v1` crosses four prompts with five seeds (one warmup); `smoke` runs the first case with the same request controls. Only vLLM-Omni has a Wan2.2 request contract. +`wan22.yaml` defines the silent Wan2.2-T2V-A14B text-to-video workload: 832×480, 81 frames at 16 fps, 40 steps, guidance 4.0 for the high-noise expert and 3.0 for the low-noise expert, boundary 0.875, flow shift 12 and an empty negative prompt. vLLM-Omni takes every control per request. SGLang does not read the flow shift or the boundary from a request, so its server refuses to start unless `--flow-shift` and the checkpoint's `model_index.json` `boundary_ratio` equal the spec. SGLang's requests also set `x264_preset: ultrafast` and `output_compression: 63` (CRF 18), the libx264 encoding vLLM-Omni v0.32.0 delivers by default, because SGLang's own default is `fast` at CRF 25. `release-v1` crosses four prompts with five seeds (one warmup); `smoke` runs the first case with the same controls. `h3.yaml` and `wan22.yaml` use schema version 1 and `h3-v2.yaml` uses schema version 2. Version 2 adds a `warmup_case` to every set and a `fairness` block that seals the schedule, the requested libx264 ultrafast/CRF 18/yuv420p plus AAC encoding, the disabled cross-request conditioning cache, and the official Diffusers source, model and RNG candidate. @@ -20,7 +20,7 @@ Code that needs the version calls `schema_version(plan)` instead of testing whic - `model` names the checkpoint and its 40-character revision. - `generation` holds the request and clip values. - SGLang rejects caller-set fps and frame counts and derives them from its `target`; only vLLM-Omni receives fps, frame count, width, and height. + For H3, SGLang rejects caller-set fps and frame counts and derives them from its `target`; only vLLM-Omni receives fps, frame count, width, and height. The runner checks the clip's duration against `frame_count / fps` (107 / 24 = 4.458 s), not `duration_seconds`. - `prompts` defines each prompt once with its motion and sound requirements. Each entry in `sets` lists cases that pair a prompt with a seed; no two cases repeat both prompt text and seed. diff --git a/video-generation/specs/wan22.yaml b/video-generation/specs/wan22.yaml index 1741ca25b3..2401641dc8 100644 --- a/video-generation/specs/wan22.yaml +++ b/video-generation/specs/wan22.yaml @@ -16,7 +16,7 @@ generation: guidance_scale_2: 3.0 # The A14B expert switch, equal to the checkpoint's model_index.json value. boundary_ratio: 0.875 - # UniPC sigma shift for the 480p cell; every engine must receive it per request. + # UniPC sigma shift for the 480p cell; no engine default may stand in for it. flow_shift: 12.0 negative_prompt: "" diff --git a/video-generation/tests/test_runner.py b/video-generation/tests/test_runner.py index 406e4a6a72..940893eeec 100644 --- a/video-generation/tests/test_runner.py +++ b/video-generation/tests/test_runner.py @@ -858,9 +858,45 @@ def test_wan22_requires_every_control(): runner.validate_plan(plan) -def test_wan22_has_no_sglang_request_contract(): - with pytest.raises(ValueError, match="vllm-omni"): - runner.preview_plan(wan22_plan(), runtime="sglang") +def test_wan22_sglang_request_omits_only_the_controls_its_server_binds(): + plan = wan22_plan() + assert runner.preview_plan(plan, runtime="sglang")["slots"][0]["request"] == { + "model": "Wan-AI/Wan2.2-T2V-A14B-Diffusers", + "prompt": plan["cases"][0]["prompt"], + "seed": 11, + "width": 832, + "height": 480, + "fps": 16, + "num_frames": 81, + "num_inference_steps": 40, + "guidance_scale": 4.0, + "guidance_scale_2": 3.0, + "negative_prompt": "", + "num_outputs_per_prompt": 1, + "x264_preset": "ultrafast", + "output_compression": 63, + } + + +@pytest.mark.parametrize("server_argv", [None, ["sglang", "serve", "--flow-shift", "5.0"]]) +def test_wan22_sglang_run_requires_a_launch_that_sets_the_plan_flow_shift(tmp_path, server_argv): + identity = server_argv and { + "runtime_revision": RUNTIME_REVISION, + "image_digest": "a" * 64, + "server_argv": server_argv, + "server_environment": {"CACHE": "0"}, + "gpu_topology": {"gpu_uuids": ["GPU-fixture"]}, + } + output = tmp_path / "not-created" + with pytest.raises(ValueError, match="sealed server launch"): + execute( + wan22_plan(), + output, + "http://127.0.0.1:1", + runtime="sglang", + numerical_identity=identity, + ) + assert not output.exists() def test_wan22_vllm_omni_run_sends_every_control_and_keeps_server_metrics( diff --git a/video-generation/tests/test_srt_selected.py b/video-generation/tests/test_srt_selected.py index 5db049bd4a..32cc2e44e2 100644 --- a/video-generation/tests/test_srt_selected.py +++ b/video-generation/tests/test_srt_selected.py @@ -160,6 +160,53 @@ def test_selected_server_requires_the_recipe_gpus_and_runtime(tmp_path, monkeypa assert not (tmp_path / "server").exists() +@pytest.mark.parametrize( + ("runtime", "flow_shift", "boundary_ratio", "message"), + [ + ("sglang", ["--flow-shift", "12.0"], 0.875, None), + ("sglang", ["--flow_shift=12.0"], 0.875, None), + ("sglang", ["--flow-shift", "5.0"], 0.875, "flow_shift 5.0"), + ("sglang", [], 0.875, "flow_shift None"), + ("sglang", ["--flow-shift", "12.0", "--flow_shift", "5.0"], 0.875, "flow_shift None"), + ("sglang", ["--flow-shift", "12.0"], 0.9, "boundary_ratio 0.9"), + ("vllm-omni", [], 0.9, None), + ], +) +def test_sglang_wan22_launch_must_serve_the_controls_its_requests_omit( + tmp_path, monkeypatch, runtime, flow_shift, boundary_ratio, message +): + plan = video_spec.plan_for(video_spec.load_spec(PACKAGE / "specs/wan22.yaml"), "smoke") + model = tmp_path / "model" + model.mkdir() + (model / "model_index.json").write_text(json.dumps({"boundary_ratio": boundary_ratio})) + monkeypatch.setattr(srt_selected, "cuda_devices", lambda: ["GPU-1"]) + monkeypatch.setattr(srt_selected, "KFD", tmp_path / "no-kfd") + executed = [] + monkeypatch.setattr(srt_selected.os, "execvpe", lambda file, argv, env: executed.append(argv)) + monkeypatch.setenv("VIDEO_CONTAINER_IMAGE", "example/engine:v1@sha256:" + "b" * 64) + command = ["engine", "serve", str(model), *flow_shift] + + def serve(): + srt_selected.serve( + plan, + runtime=runtime, + runtime_revision="a" * 40, + model_path=model, + gpus=1, + output=tmp_path / "server", + command=command, + model_view="snapshot", + ) + + if message is None: + serve() + assert executed == [command] + else: + with pytest.raises(ValueError, match=message): + serve() + assert not executed and not (tmp_path / "server").exists() + + @pytest.mark.parametrize( ("field", "value", "message"), [