Skip to content

[Feat] wan2.2-s2v: Make the video API serve S2V - #44429

Draft
murthy-l wants to merge 6 commits into
sgl-project:mainfrom
murthy-l:wan2_s2v_video_api
Draft

murthy-l wants to merge 6 commits into
sgl-project:mainfrom
murthy-l:wan2_s2v_video_api

Conversation

@murthy-l

@murthy-l murthy-l commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

/v1/videos rejected every Wan2.2-S2V request with

Served model with task type 'S2V' requires an 'audio_path' input

Two independent registration gaps, both only on the served path — the CLI was unaffected because diffusion_generator calls the visual adjustment directly. The second one is now fixed in #43279 itself (its warmup needs it); this PR keeps the first fix and the tests for both.

Changes

  • Wan2_2_S2V_14B_SamplingParam declared no video request extra fields, so audio_path, pose_video_path and num_clip were dropped from the request before validation — which then demanded the audio input that had just been discarded. Adds the video_request_extra_fields() override.
  • ModelTaskType.S2V was absent from is_video_gen(), so the served path skipped _adjust_visual_fields(): the output file name kept no extension (ffmpeg: "Unable to find a suitable output format") and the model's frame and fps defaults were never applied. Moved into [Feat] wan2.2-s2v: Add Wan2.2-S2V-14B speech-to-video (port of #21609) #43279 (configs/task_type.py); the invariant test below stays here.

2 files, +48/−0 (configs/sample/wan.py, test/unit/test_multiple_task_types.py).

Why the second gap was reachable at all

data_type() returns VIDEO as its fallback, so S2V claimed VIDEO output while is_video_gen() denied it. The new test makes that class of mismatch impossible for any task, not just S2V:

for task in Task:
    assert task.is_video_gen() is (task.data_type() is DataType.VIDEO)

Testing

Three cases in test/unit/test_multiple_task_types.py: the invariant above, plus an S2V request driven through the real video_api router over both JSON and multipart.

Base

⚠️ Stacked on #43279 (the S2V port, 5 commits): until it merges the diff also shows them; only the last commit is new, [Feat] wan2.2-s2v: Make the video API serve S2V. Rebased onto #43279's head fd32972495 (main 92a6910ef2). Independent of #43288 and #44427: this touches only configs/sample/wan.py and its test, with zero file overlap with either. Merge after #43279, in any order with respect to the other two. #44441 (2-GPU server accuracy case) posts S2V requests to /v1/videos, so it needs this PR.


CI States

Latest PR Test (Base): ❌ Run #42797330416
Latest PR Test (Extra): ❌ Run #42797330394
Latest PR Test (AMD ROCm 10): ❌ Run #42797330431

Tip

Base CI only covers the core cases, and its workload may not exercise your change. Use /rerun-test to run the tests your change touches, or copy this prompt for an agent:

Find the registered tests this PR affects and run them with /rerun-test, following https://github.com/sgl-project/sglang/blob/main/.agents/skills/rerun-test/SKILL.md

@github-actions github-actions Bot added the diffusion SGLang Diffusion label Oct 15, 2026
@murthy-l murthy-l changed the title [Diffusion] Wan2.2-S2V: make the video API serve S2V [Feat] wan2.2-s2v: Make the video API serve S2V Oct 19, 2026
murthy-l and others added 6 commits November 5, 2026 11:04
…oject#21609)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mup_audio

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diffusion SGLang Diffusion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant