Repository navigation
feat(generation): restore the SDXL Refiner in Generate and Canvas - #9810
Open
joshistoast wants to merge 3 commits into
Open
joshistoast wants to merge 3 commits into
joshistoast wants to merge 3 commits into
Conversation
Add refiner settings (model, steps, CFG, scheduler, start, aesthetic scores) with legacy defaults, a Refiner section shown for SDXL mains, and a refiner denoise stage grafted before the decode for Generate txt2img and Canvas img2img/inpaint/outpaint, with PiD rejected alongside it. Record refiner metadata and restore it through Recall All and Remix, resolving the model by key, hash or name and base. Extend the mock fixture with SDXL and refiner mains, the backend graph contract, and the Generate and SDXL docs.
…r states The base denoise range has one owner, so Canvas grafts keep the hand-over, and inpaint/outpaint feed the gradient mask to the refiner pass too. A start of 1 skips the refiner instead of loading it for an empty pass; recall reports an uninstalled or ambiguous refiner instead of silently keeping the current one. The refiner picker owns its empty and loading states, steps/CFG use the legacy input limits, and docs describe the Canvas strength cap.
…nd section Request counts and chunk sets are unchanged; the refiner settings and graph cores join the editor's generation source set and the section joins the Generate widget's.
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.
Summary
The SDXL Refiner had no path through webv2 Generate or Canvas, so legacy SDXL + refiner recipes could not be reproduced.
A Refiner section (SDXL main models only) offers a refiner model picker limited to
sdxl-refinermodels (which remain unselectable as main models), scheduler, steps, CFG, start fraction and positive/negative aesthetic scores with the legacy defaults. When a refiner is picked, the graph adds the refiner loader, refiner conditioning (aesthetic scores, prompts wired by edge), a second denoise stage from the start fraction to the end with the base stage ending at the hand-over, and routes the refined latents into decode; seamless is applied to the refiner too. Canvas image-to-image, inpaint and outpaint use start = min(refiner start, 1 − strength) and keep masks, control, IP-adapter and regional guidance on the base stage; the refiner pass receives the same gradient denoise mask. PiD + refiner is rejected. A start fraction of 1 means off. The refiner is recorded in metadata and restored by Recall All and Remix (key, then hash, then name+base); an uninstalled or ambiguous refiner is reported in the recall notice.Two deliberate deviations from the current legacy builder were confirmed correct by review against the backend scheduler: the base pass ends at the hand-over (current legacy regressed this for text-to-image), and the refiner's style conditioning receives the prompt by edge (legacy copied an undefined value).
Related Issues / Discussions
Follows up the legacy parity audit behind #9803.
QA Instructions
From
invokeai/frontend/webv2(Node 22.14, pnpm 10.12):pnpm check:releasepasses. Mock fixtures now cycle main models over sd-1 / sdxl / sdxl-refiner, so the UI can be exercised against the mock (representative profile):Review
No material findings. Reviewers compiled 59 graph shapes from the base and head commits and found non-refiner graphs byte-identical. Follow-ups applied from review: the refiner denoise now receives the gradient mask on inpaint/outpaint; one owner for the base denoise range; recall reports an unresolved refiner; the picker's empty state no longer double-messages; start fraction 1 is treated as off; legacy input caps; docs note the Canvas strength cap.
Compatibility / Rollout
New generate settings are optional with defaults and normalize on load; no project-document migration. No API changes.
Checklist
What's Newcopy (if doing a release after this PR)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.