Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #1085 (pr-19-dit-attn).
Why
Wan2.2 ran its own one-request loop on r9b, with no capture and no batching. The stock
configs/wan22.yamlcompiles only 1280x704x81, so the 832x480x33 clip the benchmarks request runs eager: 5.73 s a clip on t2v in window B8. Compiled, r9b does 4.05 s a clip in window H, and a second request adds little (t2v 14.83 clips/min at c=1, 15.47 at c=2).What changed
mstar/model/wan22/submodules.py:Wan22DenoiseSubmoduleonDenoiseLoopSubmoduleis the new default (dit_loop: scaffold). Requests with the same grid, text length, CFG and mode batch, up tomax_batch_size(default 2), at any mix of steps. Eachcompile_dit_sizesentry is compiled and captured at startup for T2V and I2V with CFG, at eachcapture_batch_sizesentry (default [1, 2]). The served config captures 8 graphs.mstar/model/wan22/components/unipc.py: UniPC in a coefficient form. Its per-step branches fold into per-row weights staged once per request in one pinned copy, and it matches the reference solver to float32 rounding.mstar/model/components/wan_vae.py: the VAE decode keeps the default layout on AMD GPUs, where MIOpen's channels-last conv3d is about 2x slower. NVIDIA stays channels-last.configs/wan22.yamlserves 832x480x33 and lists 832x480 for the fast decode.dit_loop: legacykeeps the old loop.docs/models.rstcovers the loop and the knobs.Verification
test_wan22_denoise_scaffold.pycovers the coefficient form against an exact port and scaffold against legacy trajectories.test_wan22_denoise_cuda_graph.pyreplays one captured step across a T2V and an I2V trajectory, and the media GPU set on the tip is 121 passed.compile_dit_sizes: [832x480x33], so r9b f906c7d compiles the served DiT here too. mstar-r9b-basefast adds the fast VAE decode. The tip f7122c3 is all of week 2, but this is the only Wan change outside shared host paths.Not in this PR
capture_batch_sizes: [1]oraccelerator_graph: falseare the way out, anddit_loop: legacyrestores the old behaviour.