Visit ComfyUI Online for ready-to-use ComfyUI environment
Replace completely black masks with preceding mask for seamless sequence continuity in image processing tasks.
The FillDarkMask node is designed to process a series of mask images and ensure that any completely black (dark) masks are replaced with the preceding mask in the sequence. This functionality is particularly useful in scenarios where you have a sequence of masks and want to maintain continuity by avoiding any interruptions caused by entirely black masks. By filling these dark masks with the previous mask, the node helps maintain a consistent flow in the mask sequence, which can be crucial for various image processing and AI art tasks. This node operates seamlessly, ensuring that your mask sequences remain intact and visually coherent.
The masks
parameter is a required input that accepts a sequence of mask images. Each mask in the sequence is evaluated, and if a mask is found to be completely black (i.e., all pixel values are zero), it is replaced with the previous mask in the sequence. This parameter ensures that the continuity of the mask sequence is maintained by filling any dark masks with the preceding mask. The input should be a tensor of masks, where each mask is typically a 2D array representing the mask image.
The output parameter MASK
is a tensor containing the modified sequence of masks. In this sequence, any completely black masks have been replaced with the preceding mask, ensuring continuity and consistency. This output is crucial for maintaining the integrity of the mask sequence, especially in applications where interruptions caused by dark masks can affect the overall result.
masks
parameter is not a tensor.© Copyright 2024 RunComfy. All Rights Reserved.