-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Crop & Mask updates #6876
base: main
Are you sure you want to change the base?
Crop & Mask updates #6876
Conversation
4367ae0
to
89ee803
Compare
…nvoke-ai/InvokeAI into hipster/feat/mask-node-updates
As I consider this - Perhaps it'd be better to have this just output the crop offsets for the identified object and let existing crop nodes be used. |
|
||
image: ImageField = InputField(description="An input mask image with black and white content") | ||
margin: int = InputField(default=0, ge=0, description="The desired margin around the object, as measured in pixels") | ||
object_color: Literal["white", "black"] = InputField( |
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.
SAM can output multi-colored masks, right? Maybe we want this to be a ColorField
instead, and update the mask extraction accordingly.
A future UI component could let the user click the specific mask they want, sampling its color, and then pass that into this node. So it'd be like a two-stage filter - segment, then choose the mask.
Summary
Update to include a new node for Cropping to an identified object from automated masking nodes (e.g., Segment Anything), with the ability to configure for mask types and leverage resulting offsets later in the workflow.
Secondly, update Image Mask node to handle multiple formats for Image Masks. (May be unnecessary - check me)
Related Issues / Discussions
#6805
QA Instructions
Merge Plan
N/A
Checklist