Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates selective mask replacement within a list based on defined indices for precise mask manipulation.
The MaskListReplace_
node is designed to facilitate the replacement of specific masks within a list of masks based on defined indices. This node is particularly useful when you need to selectively update or replace parts of a mask sequence, such as in video processing or complex image editing tasks. By specifying a range of indices, you can control which masks are replaced and whether the replacement should be inverted. This functionality allows for precise and flexible mask manipulation, making it an essential tool for AI artists working with dynamic or multi-frame content.
This parameter represents the list of masks that you want to manipulate. Each mask in the list is a binary or grayscale image that defines areas of interest or exclusion. The list can contain multiple masks, and the node will process each one according to the specified indices and replacement mask.
This parameter is the mask that will be used to replace the masks within the specified index range. It should be a single mask that matches the dimensions and format of the masks in the masks
list. This mask will be applied to the selected indices unless the invert
option is enabled.
This integer parameter defines the starting index of the range within the masks
list where the replacement should begin. The default value is 0, and it must be a non-negative integer. This allows you to specify the exact point in the list where the replacement process should start.
This integer parameter defines the ending index of the range within the masks
list where the replacement should end. The default value is 0, and it must be a non-negative integer. This allows you to specify the exact point in the list where the replacement process should stop.
This boolean parameter determines whether the replacement logic should be inverted. If set to True
, the masks within the specified index range will remain unchanged, and the masks outside this range will be replaced by the mask_replace
. The default value is False
.
The output is a list of masks that have been processed according to the specified parameters. This list will contain the original masks with the specified indices replaced by the mask_replace
, or vice versa if the invert
option is enabled. The output allows you to see the result of the mask replacement operation and use it in subsequent processing steps.
start_index
and end_index
to the desired range and ensure invert
is set to False
.invert
to True
and define the start_index
and end_index
accordingly.mask_replace
matches the dimensions and format of the masks in the masks
list to avoid inconsistencies.start_index
or end_index
is outside the bounds of the masks
list.start_index
and end_index
are within the valid range of indices for the masks
list.mask_replace
does not match the dimensions of the masks in the masks
list.mask_replace
has the same dimensions and format as the masks in the masks
list before running the node.start_index
and end_index
are integers and invert
is a boolean.© Copyright 2024 RunComfy. All Rights Reserved.