v0.37.0-alpha — Reference layers inside an edit - #116
Merged
Merged
Conversation
…yers inside an edit. A live run proved the core idea before planning: a selection edit with a second layer as <image2> put that layer's object into the selected area with no seam. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The edit preset gains an encoder-image-slots referenceChain. The builder passes [source, ...references], so the layer being edited stays <image1> and each reference is rejoined with its own alpha on images.image_2 onwards. It reuses Multi-Reference's slot wiring unchanged. References combine with a selection edit: the source goes in plain, the references keep their alpha, and the ring colour match and corner anchors are unaffected. The ceiling is four references beside the edited layer. Klein refuses references with a clear message. Verified live through the builder alone: a selection edit with one reference put that layer's teapot into the selected area, seamlessly, in 73 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With Qwen-Image 2.1 (edit) selected, Edit Image shows a Reference layers block with Add Active Layer, Add Canvas and a list. Row numbers start at 2, because the layer being edited is <image1> and the badge is the number to type in the prompt. The list holds up to four, and each reference uploads under its own name and lands on images.image_2 onwards. It works with a layer, canvas or selection source. On a preset that can't take references, Generate stops with a clear message. The block sits on a plain [hidden] wrapper, the same trap as Capture Selection, with one id-scoped margin rule. The new list uses a shared row renderer and click binder; Multi-Reference keeps its own proven code untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In Photoshop the narrower Edit Image panel clipped the third row button to "R" and squeezed out the layer name. Edit Image rows now hold the badge, the thumbnail, the name and Remove; with four references at most, remove and re-add covers reordering. Multi-Reference rows are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…come from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every diffusion-model preset reads the same UNETLoader list, and a refresh kept whatever was selected if it was still in that list. So Edit Image showed Qwen-Image 2.1 (edit) with flux-2-klein-4b-fp8 selected, which that graph can't load (Mehran's screenshot, 2026-09-24). The same could happen between any two stacks in any tool. All eight model refreshes now keep the previous pick only if no other preset pins it, so a leftover is replaced by the new preset's own file and a deliberate custom model survives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Edit Image (Qwen-Image 2.1) gains a Reference layers list: name them
<image2>,<image3>… in the prompt to bring content in from other layers. It works with a layer, canvas or selection source, up to four references, and reuses Multi-Reference's slot wiring. Smoke-tested in Photoshop by Mehran; the reference rows were then simplified to Remove only after his screenshot showed the third button clipped.Verified: typecheck, lint, 1,091 tests, 7 bridge end-to-end tests, and build. A builder-made reference + selection graph ran live (73 s).
🤖 Generated with Claude Code