Paint by Single Color
The honest fill node riding in the paint-by-example pack
- image
- mask
- IMAGE
It's not actually paint-by-example
Let's get the naming out of the way: Paint by Single Color has nothing to do with the Paint-by-Example model. It's a mask-fill utility that happens to share a pack. Give it an image and a mask, and it replaces the masked region with a flat RGB color. No model, no download, no GPU warmup - under the hood it's pure tensor math (image × outside-mask + fill color × mask), so it's instant and safe to trust.
What it takes
- image, mask - the obvious pair. If the mask doesn't match the image's size, the node silently resizes it (bilinear) to fit.
- red, green, blue - 0–255 each, all defaulting to 255 (white). That's your fill color.
Output is a single IMAGE with the color baked into the masked region, ready to wire anywhere an image goes.
Why you'd bother
Three honest uses, none of them glamorous:
- The old inpaint trick. Before an inpaint pass, overwrite the masked pixels with flat white or grey so the model has to invent new content instead of leaning on the pixels already there. This node is exactly that trick in one box - the KB's masked-inpainting playbook calls this out as the way to force a big change.
- Mask preview. Fill the mask with a loud color to see precisely what you've selected, before anything expensive runs.
- Flat backdrop. A solid-color fill for compositing or as a placeholder in a larger workflow.
It's also the tell that this pack's README has drifted: it claims 3 nodes, but the code registers 5, and this is one of the two undocumented additions. A shared-pack utility, not a paint-by-example variant - and because the source is a plain tensor op, there's no hidden model download lurking behind it.
Install
Same as the rest of the pack - ComfyUI Manager, search "paint-by-example", or git clone https://github.com/phyblas/paint-by-example_comfyui into ComfyUI/custom_nodes and restart. Note that this node triggers none of the pack's heavy stuff: the multi-gigabyte model only downloads when you actually run one of the three paint-by-example nodes.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| red | INT | 2550–255 | — |
| green | INT | 2550–255 | — |
| blue | INT | 2550–255 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |