From fca8236f185f103514dc5aa0c74ece600d025c2c Mon Sep 17 00:00:00 2001 From: Wenyao Gao Date: Mon, 16 Nov 2026 23:04:57 -0800 Subject: [PATCH 1/4] feat: add the SGLang request contract for Wan2.2 --- inferencex-e2e/docs/video-generation.md | 4 +- video-generation/evaluator/runner.py | 11 +++-- video-generation/evaluator/srt_selected.py | 25 +++++++++++- video-generation/specs/README.md | 2 +- video-generation/specs/wan22.yaml | 2 +- video-generation/tests/test_runner.py | 19 +++++++-- video-generation/tests/test_srt_selected.py | 45 +++++++++++++++++++++ 7 files changed, 98 insertions(+), 10 deletions(-) diff --git a/inferencex-e2e/docs/video-generation.md b/inferencex-e2e/docs/video-generation.md index 522d626c96..cbe6e46752 100644 --- a/inferencex-e2e/docs/video-generation.md +++ b/inferencex-e2e/docs/video-generation.md @@ -49,7 +49,9 @@ 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. 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/video-generation/evaluator/runner.py b/video-generation/evaluator/runner.py index e2d01639e2..7eb179574d 100644 --- a/video-generation/evaluator/runner.py +++ b/video-generation/evaluator/runner.py @@ -95,6 +95,9 @@ "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} @@ -304,10 +307,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 +324,10 @@ 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] + return request def _payload(plan: dict[str, Any], slot: dict[str, Any], runtime: str) -> dict[str, Any]: diff --git a/video-generation/evaluator/srt_selected.py b/video-generation/evaluator/srt_selected.py index 6ae9479283..72184fd098 100644 --- a/video-generation/evaluator/srt_selected.py +++ b/video-generation/evaluator/srt_selected.py @@ -14,7 +14,13 @@ 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, + validate_plan, +) RECORDED_ENGINE_ENV = ( "PYTHONPATH", @@ -209,6 +215,15 @@ 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.""" + shifts = [value for flag, value in zip(command, command[1:]) if flag == "--flow-shift"] + return { + "flow_shift": float(shifts[0]) if len(shifts) == 1 else None, + "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..ade60bae3e 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. `release-v1` crosses four prompts with five seeds (one warmup); `smoke` runs the first case with the same request 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. 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..253befa88f 100644 --- a/video-generation/tests/test_runner.py +++ b/video-generation/tests/test_runner.py @@ -858,9 +858,22 @@ 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, + } 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..a74b66097e 100644 --- a/video-generation/tests/test_srt_selected.py +++ b/video-generation/tests/test_srt_selected.py @@ -160,6 +160,51 @@ 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", "12.0", 0.875, None), + ("sglang", "5.0", 0.875, "flow_shift 5.0"), + ("sglang", None, 0.875, "flow_shift None"), + ("sglang", "12.0", 0.9, "boundary_ratio 0.9"), + ("vllm-omni", None, 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", flow_shift] if flow_shift else []) + + 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"), [ From 5f2178cd13481eefbf05b5df75497de976af869e Mon Sep 17 00:00:00 2001 From: Wenyao Gao Date: Mon, 16 Nov 2026 23:07:52 -0800 Subject: [PATCH 2/4] feat: add SGLang Wan2.2 on H200 with 1, 2, 4 and 8 GPUs --- .../sglang/h200-bf16/serving-client-g1.yaml | 70 +++++++++++++++++++ .../sglang/h200-bf16/serving-client-g2.yaml | 70 +++++++++++++++++++ .../sglang/h200-bf16/serving-client-g4.yaml | 70 +++++++++++++++++++ .../sglang/h200-bf16/serving-client.yaml | 70 +++++++++++++++++++ inferencex-e2e/configs/nvidia-master.yaml | 27 +++++++ inferencex-e2e/docs/MODELS.md | 2 +- inferencex-e2e/docs/video-generation.md | 5 +- inferencex-e2e/perf-changelog.yaml | 9 +++ 8 files changed, 320 insertions(+), 3 deletions(-) create mode 100644 inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g1.yaml create mode 100644 inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g2.yaml create mode 100644 inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client-g4.yaml create mode 100644 inferencex-e2e/benchmarks/single_node/srt-slurm-recipes/wan22/sglang/h200-bf16/serving-client.yaml 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 b7c7c78efb..befad31aaa 100644 --- a/inferencex-e2e/configs/nvidia-master.yaml +++ b/inferencex-e2e/configs/nvidia-master.yaml @@ -7980,6 +7980,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 cbe6e46752..d14cf69312 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. diff --git a/inferencex-e2e/perf-changelog.yaml b/inferencex-e2e/perf-changelog.yaml index eabfbe21f3..06420e9ab8 100644 --- a/inferencex-e2e/perf-changelog.yaml +++ b/inferencex-e2e/perf-changelog.yaml @@ -12952,3 +12952,12 @@ - "TP2 concurrency 32: enable the AMD monokernel (8 running requests x 6 rows fit its 48-row launch), drop SGLANG_HIP_DSV41_INDEX_K_PAGE8 which the monokernel refuses, lower prefill-decode-interval from 32 to 8, and use the fastokens tokenizer backend (DeepSeek-V4.1 segmented prompt encoding)." - "Search space and every other flag are unchanged." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/5029 + +- 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 From 22ce4903a5341c8d04b56911b587f4169d490679 Mon Sep 17 00:00:00 2001 From: Wenyao Gao Date: Tue, 17 Nov 2026 02:33:15 -0800 Subject: [PATCH 3/4] fix: refuse SGLang Wan2.2 runs without a sealed launch identity --- video-generation/evaluator/runner.py | 23 +++++++++++++++++++++ video-generation/evaluator/srt_selected.py | 4 ++-- video-generation/specs/README.md | 4 ++-- video-generation/tests/test_runner.py | 21 +++++++++++++++++++ video-generation/tests/test_srt_selected.py | 14 +++++++------ 5 files changed, 56 insertions(+), 10 deletions(-) diff --git a/video-generation/evaluator/runner.py b/video-generation/evaluator/runner.py index 7eb179574d..a29e89addf 100644 --- a/video-generation/evaluator/runner.py +++ b/video-generation/evaluator/runner.py @@ -160,6 +160,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 @@ -784,6 +798,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 72184fd098..503b3730dd 100644 --- a/video-generation/evaluator/srt_selected.py +++ b/video-generation/evaluator/srt_selected.py @@ -19,6 +19,7 @@ SGLANG_WAN22_SERVER_CONTROLS, WAN22_MODEL_ID, run_plan, + sglang_flow_shift, validate_plan, ) @@ -217,9 +218,8 @@ 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.""" - shifts = [value for flag, value in zip(command, command[1:]) if flag == "--flow-shift"] return { - "flow_shift": float(shifts[0]) if len(shifts) == 1 else None, + "flow_shift": sglang_flow_shift(command), "boundary_ratio": read_object(model_path / "model_index.json").get("boundary_ratio"), } diff --git a/video-generation/specs/README.md b/video-generation/specs/README.md index ade60bae3e..adea84f5ae 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. 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. `release-v1` crosses four prompts with five seeds (one warmup); `smoke` runs the first case with the same request controls. +`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. `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/tests/test_runner.py b/video-generation/tests/test_runner.py index 253befa88f..228e3fb179 100644 --- a/video-generation/tests/test_runner.py +++ b/video-generation/tests/test_runner.py @@ -876,6 +876,27 @@ def test_wan22_sglang_request_omits_only_the_controls_its_server_binds(): } +@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( tmp_path, mocked_media, fixture_server ): diff --git a/video-generation/tests/test_srt_selected.py b/video-generation/tests/test_srt_selected.py index a74b66097e..32cc2e44e2 100644 --- a/video-generation/tests/test_srt_selected.py +++ b/video-generation/tests/test_srt_selected.py @@ -163,11 +163,13 @@ def test_selected_server_requires_the_recipe_gpus_and_runtime(tmp_path, monkeypa @pytest.mark.parametrize( ("runtime", "flow_shift", "boundary_ratio", "message"), [ - ("sglang", "12.0", 0.875, None), - ("sglang", "5.0", 0.875, "flow_shift 5.0"), - ("sglang", None, 0.875, "flow_shift None"), - ("sglang", "12.0", 0.9, "boundary_ratio 0.9"), - ("vllm-omni", None, 0.9, None), + ("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( @@ -182,7 +184,7 @@ def test_sglang_wan22_launch_must_serve_the_controls_its_requests_omit( 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", flow_shift] if flow_shift else []) + command = ["engine", "serve", str(model), *flow_shift] def serve(): srt_selected.serve( From 9363f77111019430dd8a03f3b05df66c1cd432c9 Mon Sep 17 00:00:00 2001 From: Wenyao Gao Date: Tue, 17 Nov 2026 02:36:38 -0800 Subject: [PATCH 4/4] fix: request ultrafast CRF 18 clips from SGLang Wan2.2 --- inferencex-e2e/docs/video-generation.md | 4 +++- video-generation/evaluator/runner.py | 6 ++++++ video-generation/specs/README.md | 2 +- video-generation/tests/test_runner.py | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/inferencex-e2e/docs/video-generation.md b/inferencex-e2e/docs/video-generation.md index d14cf69312..49b5095941 100644 --- a/inferencex-e2e/docs/video-generation.md +++ b/inferencex-e2e/docs/video-generation.md @@ -52,7 +52,9 @@ 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. 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. The SGLang child +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/video-generation/evaluator/runner.py b/video-generation/evaluator/runner.py index a29e89addf..a8f373be13 100644 --- a/video-generation/evaluator/runner.py +++ b/video-generation/evaluator/runner.py @@ -100,6 +100,11 @@ 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: @@ -341,6 +346,7 @@ def _wan22_payload(plan: dict[str, Any], slot: dict[str, Any], runtime: str) -> if runtime == "sglang": for control in SGLANG_WAN22_SERVER_CONTROLS: del request[control] + request |= _SGLANG_WAN22_ENCODING return request diff --git a/video-generation/specs/README.md b/video-generation/specs/README.md index adea84f5ae..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. 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. `release-v1` crosses four prompts with five seeds (one warmup); `smoke` runs the first case with the same controls. +`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. diff --git a/video-generation/tests/test_runner.py b/video-generation/tests/test_runner.py index 228e3fb179..940893eeec 100644 --- a/video-generation/tests/test_runner.py +++ b/video-generation/tests/test_runner.py @@ -873,6 +873,8 @@ def test_wan22_sglang_request_omits_only_the_controls_its_server_binds(): "guidance_scale_2": 3.0, "negative_prompt": "", "num_outputs_per_prompt": 1, + "x264_preset": "ultrafast", + "output_compression": 63, }