Repository navigation
Studio diffusion: Qwen-Image text-to-image activation seeds keep part of the int8 DiT resident under a VRAM budget - #15985
Merged
Conversation
…t8 DiT resident under a VRAM budget
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced Oct 29, 2026
danielhanchen
added a commit
to unslothai/unsloth-zoo
that referenced
this pull request
Oct 29, 2026
…hared between v1 and v0 (#2253) ## Summary `tests/test_gc_collect_early_stop_loops.py::test_release_passes_go_through_the_helper[vllm_utils.py-expected0]` fails on main since #2221, and with it the unsloth `Core zoo` jobs on every unsloth PR that installs zoo main (staging runs for unslothai/unsloth#15985 and #15934): ``` E assert [2, 3, 3, 3, 3] == [2, 2, 3, 3, 3, 3] E Right contains one more item: 3 ``` The test lists every `collect_garbage(...)` call in `vllm_utils.py` with its pass count. #2221 replaced the separate v1 and v0 graph-capture wrappers with one `wrap()` used for both, so the two `passes = 2` call sites became one. The product change is intended (both versions still run the 2-pass collect around capture, through the shared wrapper); the census was stale. ## What changed `vllm_utils.py` expects `[2, 3, 3, 3, 3]`, and the comment names the shared wrapper. ## Verification - Base (main at `4cdccb4a`): 1 failed, 15 passed. Bisected: #2221's parent passes, #2221 fails. - Head: 16 passed. - With the capture call changed back to `passes = 3`, the test fails again, so the census still pins the pass count.
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.
Summary
When Qwen-Image-2512 text-to-image runs under a VRAM budget, Studio streamed every offload group of the int8 DiT. Nothing stayed resident. At 16 GiB the Studio process used 5.4 GiB of the budget, and each denoising step re-uploaded the whole 31.7 GiB transformer.
The cause is that the
qwen-imagefamily had no entry in the shipped activation seed tables. With no seed and no learned peak, which is the case on a fresh home,_refine_plan_from_loaded_weightshas no headroom figure. It returns the flat all-streamed plan. Qwen-Image-Edit had the same problem, and #15542 / #15645 fixed it for that family only.Change
diffusion_memory.py:_MEASURED_IMAGE_PEAK_MIB["qwen-image"] = 6032. This is the whole-render peak Studio itself recorded for Qwen-Image-2512 on sm_120 (1024x1024, 20 steps, true CFG 4, int8 DiT and int8 encoder). A returning home learns the same figure._MEASURED_STREAMED_IMAGE_PEAK_MIB["qwen-image"] = 3824. This is the Edit streamed figure. The model uses the same DiT class and the same VAE, and text-to-image has half the image tokens (no source latents), so this figure bounds the text-to-image peak.UNSLOTH_DIFFUSION_MEASURED_ACTIVATION_QWEN_IMAGE=0drops both seeds for this family only and restores the previous all-streamed placement.UNSLOTH_DIFFUSION_MEASURED_ACTIVATION_STREAMED=0still drops only the streamed figure.Measurements
The base is origin/main
2a7e3a553e, which already includes #15930. Setup:measured-activation placement group -> group (7343 MiB of the 32496 MiB transformer ... stay resident (measured peak 7168 MiB).diffusion.cfg_pair: 19 guided step(s) ran both branches through each streamed block. WithUNSLOTH_DIFFUSION_CFG_PAIR=0the times are 24.481 s on base and 19.702 s on head.Tests
tests/test_diffusion_qwen_image_seed.py(CPU only, sizes taken from the 16 / 12 GiB load logs):test_diffusion_qwenimage21_vision.pyandtest_diffusion_qwenimage_rope.py.Not covered