-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Feature(UI): add extract masked area from raster layers #8667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lstein
merged 12 commits into
invoke-ai:main
from
DustyShoe:Feature/add-extract-masked-area-feature-v2
Dec 22, 2025
Merged
Feature(UI): add extract masked area from raster layers #8667
lstein
merged 12 commits into
invoke-ai:main
from
DustyShoe:Feature/add-extract-masked-area-feature-v2
Dec 22, 2025
+155
−0
Conversation
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
…ExtractMaskedArea.tsx and removed unused locales entries in en.json
aa76538 to
a9ab907
Compare
lstein
approved these changes
Dec 16, 2025
Collaborator
lstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as advertised. I would like @blessedcoolant to give the code a quick lookover before merging.
joshistoast
pushed a commit
to joshistoast/InvokeAI
that referenced
this pull request
Dec 23, 2025
* chore: localize extraction errors * chore: rename extract masked area menu item * chore: rename inpaint mask extract component * fix: use mask bounds for extraction region * Prettier format applied to InpaintMaskMenuItemsExtractMaskedArea.tsx * Fix base64 image import bug in extracted area in InpaintMaskMenuItemsExtractMaskedArea.tsx and removed unused locales entries in en.json * Fix formatting issue in InpaintMaskMenuItemsExtractMaskedArea.tsx * Minor comment fix --------- Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
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
This PR introduces a new feature: Extract Masked region as Raster Layer.
The feature allows users to extract the portion of all visible raster layers that falls within the painted Inpaint Mask. The extracted region is composited and added as a new raster layer. Compared to my previous attempt, is not limited to bbox and uses mask layer bounds.
The new raster layer is currently created at the top of the raster layer stack.
In an ideal workflow, it could appear directly above the active raster layer, but Invoke currently supports only one active raster layer at a time. Changing this behavior may introduce unnecessary complexity; maintainers may consider it separately.
Related Issues / Discussions
QA Instructions
Generate or import an image into the canvas so that raster layers are present.
Add an Inpaint Mask layer and mask the region you would like to extract.
In the Layer Panel or on masked area, right-click the Inpaint Mask layer to open its context menu.
Select
Extract Region.Verify that:
Merge Plan
This feature is self-contained and should not introduce merge conflicts.
It reuses existing Invoke canvas and image manipulation infrastructure.
Checklist
What's Newcopy (if doing a release after this PR)