ImageMask_Composite
See your mask the way a Photoshop user sees it
- image
- mask
- composite_image
ImageMask_Composite is the "show me the mask as a visual overlay" node. A raw mask is a grayscale value that's nearly impossible to sanity-check by looking at it - it's just brightness, and you can't tell if it covers the right shape or sits in the right place. This node paints the mask over your image in a color you choose, at an opacity you choose, so you can actually see what the mask is doing. It's the ComfyPanel equivalent of toggling Photoshop's mask overlay on a layer, which is a very on-brand move for a pack built by a designer.
The mechanism is straightforward compositing with a couple of nice touches. The mask is turned into a colored RGBA layer using mask_color (an RGB string like "255, 255, 255", default white) and composited over the image at mask_opacity (0–1, default 1). The genuinely useful extra is mask_outline: when you turn it on, instead of a filled overlay you get just the boundary of the mask - the node dilates the mask and erodes it, then subtracts the two, leaving a crisp outline ring around the masked region. That's the "where is the edge, exactly" view, and it's the one I'd reach for when a filled overlay is hiding too much of the image.
The schema is deliberately flexible. All of image and mask are optional - you can feed just an image (it passes through and previews), just a mask (it renders the mask as a standalone colored image), or both for the overlay. The composite_image output is the result either way. It's an output node subclassing SaveImage, which means it saves the result to ComfyUI's temp directory and pushes it to the panel's preview - so on a ComfyPanel setup, this is also how you get a mask preview to appear in the Photoshop sidebar. Its IS_CHANGED returns a constant, so it only reruns when its inputs actually change - it won't poison your cache like the pause nodes do.
One behavior worth knowing: an empty mask (all zeros) is treated as "no mask," so the node falls back to passing the image through rather than painting a black rectangle all over it. That's a thoughtful default, but it means a mask that fails to generate upstream will silently turn your composite into a plain preview - check that your mask actually has content before you blame this node.
Where it fits: anywhere you're iterating on masks - inpainting regions, background removal, detailer regions - and you need to verify the mask matches the image before committing to a generation pass. It's a debug view and a preview tool, not a mask editor. For actually drawing on the mask in ComfyPanel, that's what AnyPreviewPause's editable preview is for.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Ginolazy/ComfyPanel
# restart ComfyUI
or ComfyUI Manager → "ComfyPanel". Standard deps, no models. mask_color is an "r, g, b" string with commas - a common beginner stumble is pasting a hex like #ff0000 and getting a parse failure; keep it as 255, 0, 0 and you're fine.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| mask_opacity | FLOAT | 1.000–1 | — |
| mask_color | STRING | 255, 255, 255 | — |
| mask_outline | BOOLEAN | false | — |
| imageopt | IMAGE | — | |
| maskopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| composite_image | IMAGE | — |