Repository navigation
Studio: run Detailer inpaints on the image-generation pool - #17188
Merged
Merged
Conversation
The Detailer's crop inpaints call backend.generate and wait on the render slot, so dispatching them through asyncio.to_thread held default executor workers the same way queued renders did before #17108.
Member
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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. |
|
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". |
danielhanchen
added a commit
that referenced
this pull request
Nov 9, 2026
…uff-unsloth wheel (#17211) ## Summary The Backend CI step that installs the pinned `ruff-unsloth` wheel retries 3 times with 5 s and 10 s gaps. Between 05:19 and 05:40 UTC today, GitHub served intermittent 504s for the release asset, and every attempt of an unlucky job landed inside one burst. That turned `Repo tests (CPU, fsdp2 / gloo-cp / gloo-pp / gloo-tp / rest / studio-install)` red on #17188, #17191, #17197, #17201 and #17202, while sibling jobs in the same runs installed the wheel fine a minute later. This raises the loop to 6 attempts with exponential backoff (10, 20, 40, 80, 160 s, about 5 minutes total). A healthy download still never sleeps, and a lasting outage still fails the job with the same `::error::` line, so the fixed-point formatter guard keeps failing loudly in CI when the wheel is truly unavailable. ## Changes - `.github/workflows/studio-backend-ci.yml`: 6 attempts, `sleep $((10 << (attempt - 1)))`. - `tests/test_ruff_unsloth_install_retries.py`: runs the step's own `run:` script under bash with `pip` and `sleep` faked on `PATH`, and checks that - 5 failed downloads in a row still install, after at least 300 s of backoff, - a download that never recovers still fails the job, in under 10 minutes, - a healthy download does not wait at all. ## Testing - `pytest tests/test_ruff_unsloth_install_retries.py`: 3 passed. - Against the old step from `main`, the burst test fails with `ruff-unsloth install failed after 3 attempts`. - The other tests that read `studio-backend-ci.yml` pass.
[skip ci]
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.
Follow-up to #17108.
What happened
#17108 moved queued image renders off the default asyncio executor onto their own
image-generatepool, because a render waits for the one-render slot inside its thread and a few queued renders could hold every default worker, stalling status reads and everything else that usesasyncio.to_thread.The Detailer pass in the same route was left on
asyncio.to_thread._run_detailerhandsbackend.generateto the Detailer, and each crop inpaint is a synchronous generate call that waits on the same render slot. So a few Detailer requests queued behind a render still filled the default executor. A reviewer reproduced it with the route's dispatch expression: four Detailer workers blocked on a held slot exhausted a four-worker default executor and a status read timed out after 0.2 s, while the same work dispatched through_image_generate_in_threadleft the read responsive.Fix
Dispatch
_run_detailerthrough_image_generate_in_thread, like the primary render. The caller's context is still copied (account access), and the existingUNSLOTH_DIFFUSION_GENERATE_EXECUTOR=0switch restoresasyncio.to_threadfor both.Tests
studio/backend/tests/test_image_generate_executor.py::test_detailer_inpaints_wait_on_the_image_poolreads how the route awaits_run_detailer: it fails on main (asyncio.to_thread) and passes here. The existing saturation, context and kill switch tests in that file still pass (5 passed).