Guides

How to use Masks

Learn about using Masks within your creations
What are Masks?
A mask is an image with clear areas, when used with the InPaint ControlNet model, the generation process will focus on filling the clear areas of the image. This is a really powerful solution when you wish to remove objects from an image, change background, subjects, faces, etc.Use this tool to create masks from your images. Masks are very useful when combined with ControlNet, and specially the ControlNet InPaint model.
The tool works as a "lasso" tool. Simply outline the area you wish to mask.
Within the top right corner you'll be able to select options for how to use your mask

Reset: Removes all drawn areas and restores the original image state.

Invert: Inverts the selected areas. For example: if you cleared the subject of the image, you can use the Invert button to clear the background instead.

Apply: Applies the new mask to the original image, making it ready to use with the ControlNet module, Gallery, etc. and exits the Tool.

InPaint: Sets the masked image as the ControlNet image, and loads the CN InPaint model. This is a quick way to configure ControlNet to fill the empty areas in the image, just click Dream to generate the image when the setup is complete.
Tips on masking subject/background
The Segmentation preprocessor in ControlNet can help you to automatically mask the subject/background of your image. Here is how to use it:
Step One
Drag the image you wish to mask to the ControlNet module.
Step Two
Select the Segmentation preprocessor (second one from the bottom on the left side of the CN image)
Step Three
Enable the subject or background mask button and make sure you have transparent background selected. These should create the mask you need with only the subject or background.
Step Four
If you need to remove more areas from the mask, click the “Send to Main Window” button to the right of the CN image, then activate the "Lasso Eraser / Mask Tool".

Need help? Ask in our Discord!

For any questions regarding the use of Sogni, tips, suggestions, bugs, sharing art, discussing AI and life, or simply hanging out, please feel free to join our Discord today!
© Copyright Sogni 2024. All rights reserved.