Visit ComfyUI Online for ready-to-use ComfyUI environment
Advanced masking for layer blending based on color channels and intensity ranges, offering precise control for detailed layer manipulation.
The LayerMask: BlendIf Mask node is designed to provide advanced masking capabilities by allowing you to blend layers based on specific color channels and intensity ranges. This node is particularly useful for creating complex masks that depend on the grayscale, red, green, or blue channels of an image. By adjusting the black and white points and their respective ranges, you can fine-tune the mask to include or exclude specific intensity values, giving you precise control over the blending process. This functionality is essential for tasks that require detailed layer manipulation, such as compositing, image correction, and artistic effects.
This parameter accepts the input image that you want to apply the BlendIf mask to. The image serves as the base layer for the masking operation.
This boolean parameter determines whether the mask should be inverted. When set to True (default), the mask will be inverted, meaning areas that would normally be masked out will be included, and vice versa. This is useful for reversing the effect of the mask without needing to create a new one.
This parameter allows you to select the color channel to base the mask on. The available options are "gray", "red", "green", and "blue". Choosing a specific channel will create a mask based on the intensity values of that channel in the input image.
This integer parameter sets the starting point of the black range. Pixels with intensity values below this point will be fully masked out. The default value is 0, with a minimum of 0 and a maximum of 254. Adjusting this value helps in excluding darker areas from the mask.
This integer parameter defines the range of intensity values that will transition from fully masked out to fully included. The default value is 0, with a minimum of 0 and a maximum of 255. This range helps in creating a smooth transition for the mask.
This integer parameter sets the starting point of the white range. Pixels with intensity values above this point will be fully included in the mask. The default value is 255, with a minimum of 1 and a maximum of 255. Adjusting this value helps in including brighter areas in the mask.
This integer parameter defines the range of intensity values that will transition from fully included to fully masked out. The default value is 0, with a minimum of 0 and a maximum of 255. This range helps in creating a smooth transition for the mask.
This optional parameter allows you to provide an additional mask to be combined with the BlendIf mask. This can be useful for further refining the mask by combining multiple masking criteria.
The output parameter is a mask that represents the areas of the input image that meet the specified BlendIf criteria. This mask can be used for various purposes, such as blending layers, creating selections, or applying effects. The mask is returned as a binary image where white areas represent included regions and black areas represent excluded regions.
blend_if
channels to see how they affect the mask. Each channel can highlight different aspects of the image.black_point
and white_point
sliders to quickly adjust the mask's inclusion and exclusion thresholds.image
parameter is not valid.mask
parameter is not a valid mask.black_point
, black_range
, white_point
, white_range
) is set outside its allowed range.© Copyright 2024 RunComfy. All Rights Reserved.