Repository navigation
[Doc] diffusion: Set measured cookbook defaults for MiniMax-H3, FastH3 Omni, MOSS-Image and Qwen-Image-2.1 - #47587
Merged
niehen6174 merged 3 commits intoNov 3, 2026
Conversation
…, FastH3 Omni, MOSS-Image and Qwen-Image-2.1 on 2 GPUs
Contributor
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
…ology measurements as sglang-only A/Bs
niehen6174
marked this pull request as ready for review
October 31, 2026 06:34
This comment has been minimized.
This comment has been minimized.
Collaborator
Author
|
/tag-and-rerun-ci |
mickqian
approved these changes
Oct 31, 2026
… SDPA Automatic attention on one B200 now leaves the backend to the platform default, dynamic cuDNN SDPA, instead of pinning FlashAttention: 2.22 s against 2.32 s for 1024px/40-step generation and 2.70 s against 2.89 s for an edit, same build. The B200 one-GPU request matrix (1/2/4 outputs, transparent text and edit, two-reference edit) ran under it. Two GPUs keep FlashAttention, the attention their recipes were verified with.
zijiexia
approved these changes
Nov 3, 2026
Yuxingwang-intel
pushed a commit
to Yuxingwang-intel/sglang
that referenced
this pull request
Nov 6, 2026
…3 Omni, MOSS-Image and Qwen-Image-2.1 (sgl-project#47587)
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.
Motivation
We benchmarked the cookbook commands on 2x H200 and 4x B200. In five places the builder's default was slower than another sglang command on the same hardware and workload. All of these are cookbook choices, not runtime changes.
All numbers are end-to-end client latency through the HTTP server, sglang at 3a01d4c (2026-10-28). Image cases are the median of 5 requests after 2 warmups; video cases are the median of 2 requests after 3 warmups.
Modifications
1. MiniMax-H3 on 4x B200: resident, not FSDP (
minimax-h3.jsx)Auto placement takes the first verified recipe for a GPU count, and on 4x B200 that was
b200-fsdp-4. 4x B200 holds the DiT resident, and resident is faster:The slowdown is all in denoise: 62.87 vs 65.58 s, and 34.58 vs 37.18 s.
b200-resident-4is added ahead ofb200-fsdp-4, so FSDP stays available as an explicit placement.2. FastH3 Omni: drop the three CPU offloads from the 2x H200 command (
MiniMax-H3.mdx)The 2x H200 command offloads the DiT, the text encoder and the VAE. Everything fits on 141 GB and 180 GB cards, and the offloads only cost time. Measured with an image reference, 768 short edge, 124 frames:
The command is now resident. The offload flags stay documented as the capacity fallback, and the existing latency table is relabelled as measured with offload.
3. MOSS-Image on 2+ GPUs: CFG parallel first (
moss-image.jsx)Every MOSS-Image guidance recipe runs two or three branches, but
autoTopologygave all GPUs to Ulysses. Now an even GPU count gets--cfg-parallel-size 2, and Ulysses gets the rest. 1024x1024, 50 steps, CFG 3 with the default unconditional skip of layer 22:--cfg-parallel-size 2The exact builder command (
--tp-size 1 --ulysses-degree 1 --ring-degree 1 --cfg-parallel-size 2) measured 2.441 s on 2x B200. On 2x H200,--cfg-parallel-size 2runs 4.275 s against 5.087 s for Ulysses 2 (-16%). On 4x B200 the builder now emits CFG 2 x Ulysses 2: 1.884 s, against 2.344 s for its previous Ulysses 4 (-20%).4. Qwen-Image-2.1 on 2x B200: TP2 by default (
qwen-image-2.1.jsx)b200-2-tpwas already a verified recipe, butautoTopologypicked Ulysses 2 on B200. 1024x1024, 40 steps, no CFG, run back to back in one session:H200 keeps its current topology. TP2 was not measured there.
5. Qwen-Image-2.1 on one B200: cuDNN SDPA instead of a pinned FlashAttention (
qwen-image-2.1.jsx,Qwen-Image-2.1.mdx)Automatic attention on one B200 emitted
--attention-backend fa. Without it the runtime picks its Blackwell default, dynamic cuDNN SDPA. 1024x1024, 40 steps, two runs each, same build (sglang 3a01d4c):Denoise per step is 2.004 s against 2.095 s for the 40-step loop: cuDNN runs this model's joint attention in 246 us per layer against 354 us for FlashAttention 4.
The one-B200 request matrix ran under cuDNN SDPA: 1/2/4 outputs, transparent text and edit, and the two-reference edit. Every shape succeeded and was faster (4-13%); the transparent outputs keep the same alpha coverage as FlashAttention.
b200-1-residentnow listscudnnamong its attentions and batch attentions, and the picker gains an explicit cuDNN SDPA option (soft outside that recipe). Two B200s keep FlashAttention, the attention their recipes were verified with. The table's B200 row now shows cuDNN SDPA, with the FlashAttention figures from the same build in the note below it.Accuracy Tests
No runtime change; only the builder output changes. Each new default is a configuration the cookbook already lists or the runtime already supports. cuDNN SDPA and FlashAttention are both exact attention but reduce in a different order, so the one-B200 images change slightly: PSNR against the FlashAttention outputs was 32-49 dB for generation and transparent edits, and lower (20-25 dB) for the opaque edit and the two-reference edit, where the 40-step trajectories drift apart; those images were checked by eye and keep the same composition.
Speed Tests and Profiling
See the tables above. Each builder was also executed with node to check what it now emits:
--num-gpus 2 --tp-size 1 --ulysses-degree 1 --ring-degree 1 --cfg-parallel-size 2--attention-backendflag; the summary readscuDNN SDPA (auto), serve and request verified (including 4 outputs). B200 x2 still emits--attention-backend fa.b200-resident-4, placement resident.Checklist
CI States
Latest PR Test (Base): ✅ Run #41283540079
Latest PR Test (Extra): ❌ Run #41283540099
Latest PR Test (AMD ROCm 10): ➖ No AMD PR run found for this commit.
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: