Visit ComfyUI Online for ready-to-use ComfyUI environment
Visualize image and mask overlay with opacity/color adjustments, supports missing elements, and saves previews with custom filenames.
The ImageAndMaskPreview
node is designed to provide a visual preview of an image and its corresponding mask, allowing you to see how the mask overlays on the image. This node is particularly useful for AI artists who need to fine-tune their image processing workflows by visualizing the effects of masks on images. It supports various configurations such as adjusting the mask's opacity and color, and it can handle cases where either the image or the mask is missing. The node can also save the preview images with customizable filenames, making it easier to manage and organize your work.
This parameter controls the transparency level of the mask when it is overlaid on the image. A value of 0 means the mask is fully transparent, while a value of 1 means the mask is fully opaque. Adjusting this parameter helps in visualizing how the mask affects the underlying image. The default value is typically set to 1.
This parameter specifies the color of the mask. It can be provided in either RGB format (e.g., "255,0,0" for red) or hexadecimal format (e.g., "#FF0000" for red). This allows you to customize the mask's appearance to better distinguish it from the image. The default color is usually set to a neutral color like white.
A boolean parameter that determines whether the node should return the preview image directly or save it to a file. If set to True
, the node will return the preview image; if set to False
, it will save the image with a specified filename prefix. The default value is False
.
This parameter allows you to specify a prefix for the filenames of the saved preview images. This is useful for organizing and identifying your saved images. The default value is "ComfyUI".
This parameter accepts the input image that you want to preview with the mask. If no image is provided, the node will only process the mask.
This parameter accepts the input mask that you want to overlay on the image. If no mask is provided, the node will only process the image.
This optional parameter allows you to add a text prompt that can be saved as metadata with the preview image. This is useful for keeping track of the context or settings used for generating the preview.
This optional parameter allows you to add additional metadata to the saved PNG files. This can include any extra information you want to store with the image, such as settings or parameters used during processing.
The output of this node is the preview image, which shows the input image with the mask overlaid according to the specified parameters. This allows you to visually inspect how the mask interacts with the image, helping you make any necessary adjustments.
mask_opacity
parameter to find the right balance between the visibility of the mask and the underlying image.mask_color
parameter to set a color that contrasts well with your image, making it easier to see the mask.pass_through
to True
if you want to quickly preview the image without saving it, which can speed up your workflow.filename_prefix
to organize your saved images, especially when working on multiple projects or iterations.mask_color
parameter and ensure it is in the correct format, either "R,G,B" or "#RRGGBB".image
or mask
parameters is provided.© Copyright 2024 RunComfy. All Rights Reserved.