Repository navigation
Studio diffusion: reuse the early quant probe's result instead of spawning a second child - #16910
Merged
Merged
Conversation
…wning a second child Follow-up to #16882. The early probe child's verdicts now land in the smoke cache, and a child that ends with no table is recorded, so the load, the startup warm and later plans no longer spawn a second child after it.
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. Nice work! 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 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
Follow-up to #16882, which starts the quant scheme probe child early on a cold image load. Three cases spawned a second child that the serial probe never needed:
_CHILD_PROBE_TIMEOUT, or exited without a result)._scheme_supportedsaw no early table and spawned a fresh child, so a wedged probe stalled the first load twice as long (about 360 s instead of 180 s) before the in-process fallback. The early thread now records that its child ran without a table, and the load goes straight to the in-process probe, as it does after a failed serial child.prewarm_probe_table) takes the probe lock, the warm blocks on the lock while the early child runs, then finds_SMOKE_CACHEempty and runs its own child. The early thread now writes its definite verdicts into_SMOKE_CACHE, asprewarm_probe_tabledoes, so the warm sees them._planned_quant_scheme) discarded the early table. Where the verdicts cannot be persisted (UNSLOTH_DIFFUSION_PROBE_CACHE=0, no card UUID, no storage root, or no passing scheme), every such plan spawned another child. Those verdicts are now kept in_SMOKE_CACHE, the same verdicts the serial probe caches.The out-of-memory case is unchanged: a
Noneverdict is still not cached, and the load still takes it from the early table without a second child.UNSLOTH_DIFFUSION_PROBE_OVERLAP=0still restores the serial probe exactly.Evidence
CPU only, the probe child replaced by a fake (sleep plus table), same harness on all three trees: base =
f85c190501(before #16882), merged =9c084751ab(#16882), this branch.UNSLOTH_DIFFUSION_PROBE_OVERLAP=0all 96 traces match base exactly on both trees; with overlap on, free VRAM is never read, and the planner never returns, while a probe child or the overlap thread is alive.Tests
studio/backend/tests/test_diffusion_probe_overlap.py: 3 new tests (no-table child spawned once, startup warm reuses the early table, verdicts kept on a plan that never reaches the probe). All 3 fail onorigin/mainand pass here; the 6 existing tests pass on both. The fixture now stubs the in-process probe body (_run_smoke_probe) instead of_smoke_probe, so a cached verdict is answered the way the real code answers it.test_diffusion_comfy_community_files.py::test_moss_pipeline_takes_a_supplied_vae) fails the same way onorigin/main.Not proven