Repository navigation
feat(canvas): restore PiD decoding and the Anima inpaint adapter on Canvas - #9805
Open
joshistoast wants to merge 2 commits into
Open
joshistoast wants to merge 2 commits into
joshistoast wants to merge 2 commits into
Conversation
Canvas txt2img and img2img decode through PiD in fit and native modes, resolving the encode VAE from the PiD graph and encoding at the denoise size; inpaint/outpaint and Scale Before Processing keep the legacy rejections. Anima inpaint/outpaint can add the optional 4-channel ControlNet-LLLite adapter with a weight, fed the raster image and inverted mask through the shared collector, recorded in metadata and restored by Recall All and Remix.
…picker Compile tests pin the scaled outpaint mask and pre-noise image the Anima inpaint adapter reads, recall keeps an uninstalled adapter pick while restoring the weight, and a browser case covers the Anima-only slot, its 4-channel filter and the weight scrubber.
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
Two Canvas generation paths the legacy frontend supported were missing from webv2.
PiD decoding on Canvas. The canvas compiler rejected every PiD mode ("not supported on the canvas yet"). It now compiles Canvas text-to-image and image-to-image, in both Fit and Native modes, on every base where Generate already supports PiD. Native image-to-image resizes the source to the quarter-size denoise resolution and decodes straight to the bounding box, as the legacy builders did; Fit keeps the full-size encode and resizes the decoded output. The encode VAE is resolved from the graph (the decode's VAE edge, or the model loader for the FLUX and SD3 decoders that take none). Inpaint/outpaint and Scale Before Processing that changes the processing size remain rejected with the legacy messages.
Anima inpaint adapter. Anima models get an optional four-channel inpaint/outpaint adapter slot (Anima LLLite models that are not three-channel) with a weight control. During Canvas inpaint and outpaint the graph adds the inverted gradient mask and an
anima_lllitenode fed by the resized/initial image (inpaint) or the infilled image (outpaint), joined to the shared control collector exactly as the legacyaddInpaint/addOutpaintbuilders wired it. Ordinary control layers still reject four-channel models. The adapter and weight are recorded in metadata and restored by Recall All and Remix.Graphs without PiD or without an adapter are unchanged.
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 (lint, unit, browser, fixtures, performance, project-file journeys, accessibility). One browser suite unrelated to this change (gallery maintenance settings) timed out once under heavy machine load and passed on rerun. Python:pytest tests/app/invocations/test_frontend_anima_lllite_graphs.py tests/app/invocations/test_frontend_graph_node_types.pypasses (474 passed, 2 skipped).The mock backend has no Anima or PiD models, so UI behavior is covered by browser tests (
GenerateSettingsForm.browser.test.tsx: the Inpaint Adapter slot lists only four-channel models, the weight control appears once one is picked, and the slot is absent for non-Anima models). Real-model verification was not performed. With a real install:anima_inpaint_adapterandinvert_anima_inpaint_adapter_mask. Recall All on the result restores both.Review
No material findings. Reviewers confirmed the compiled graphs match the legacy wiring field for field on every PiD base and both adapter paths, and that non-PiD and non-adapter graphs are unchanged. Follow-ups from review: compile tests for scaled outpaint and noise-mask inpaint with the adapter, a recall test for an uninstalled adapter, and the browser test above.
Limitations: no real-model execution; the Scale Before Processing rule compares grid-clamped sizes (webv2's auto scaling only grows), so an already-optimal box is accepted where legacy's auto mode would have rejected it.
Compatibility / Rollout
The new settings are optional with defaults and normalize on project load; no project-document migration. No API changes.
Checklist
What's Newcopy (if doing a release after this PR)Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.