ποΈ Inpaint Painter
Paint a mask right on the node β the masking surface ComfyUI didn't ship
- mask
- image
The loudest complaint about inpainting in ComfyUI was never the models. It's the masking - the community's standing gripe is that ComfyUI's masking workflow is "an overly extravagant workaround for the simplest part of the process." InpaintPainter is a direct answer: a paint canvas living on the node itself. No popup editors, no LoadImage followed by hunting for the right mask node. You drop an image in, brush a mask on with your mouse, and out come mask and image ready to wire into any inpaint pipeline.
It's one of five nodes in the elliefox-ai/comfyui-scene-generator pack, which is a small collection built around outpainting - and this is the paintbrush half of that setup. If you've ever outpainted or inpainted the traditional way (mask β generate β composite), you've done the part this node removes: manually keeping the mask in sync with the image.
How it works
The clever bit is that painting happens in JavaScript, in the browser, not on the server. The node draws your image onto an offscreen canvas at full source resolution, and every stroke you make is rendered there too. When you stop painting (mouseup), the mask is serialized to a base64 PNG and written into the mask_data widget. On execution, the Python side decodes that PNG back to a tensor, resizes it to exactly match the loaded image, and hands you a clean 0β1 mask.
There's no sampling or model involved - this is pure I/O plumbing, which is why it's fast and why it has zero dependencies beyond what ComfyUI already ships. A nice detail: the node hashes both the image file and the mask data to decide whether it needs to re-run, so painting a new stroke correctly triggers the downstream graph instead of silently reusing a stale result.
The inputs that matter
Most of this node is set-and-forget:
- image - pick an uploaded image or use the upload button. You can also drag-and-drop a file straight from your OS onto the node.
- mask_data - don't type this. It's the hidden widget the canvas painter fills in for you.
- brush_size - brush radius in pixels. Default 32, range 4β256. Remember it's a radius: at 32 you're painting a 64px-wide stroke.
Outputs: mask (MASK) and image (IMAGE). The mask is 1.0 where you painted (the region to regenerate) and 0.0 elsewhere. Wire both into InpaintModelConditioning or your favorite inpaint workflow - the pattern from the pack's outpainting side is to pipe this mask straight into the padding/conditioning nodes.
Installing it
The whole pack installs at once - there's no way to grab just this node:
cd ComfyUI/custom_nodes/
git clone https://github.com/elliefox-ai/comfyui-scene-generator.git ComfyUI-EllieFoxAI-scene-gen
Restart ComfyUI and it appears as ποΈ Inpaint Painter under the EllieFoxAI category. ComfyUI Manager works too - search for "comfyui-scene-generator" and install. There's no requirements.txt in the repo, so no dependency dance; it uses only what ComfyUI already provides. The pack is MIT-licensed, built by an AI agent named Ellie and human partner Alexander Dutton via OpenClaw, which you should know only so the "AI wrote it" surprise doesn't hit you later.
Common issues
- Empty mask output - if you never paint,
mask_datastays empty and you get an all-zero mask, i.e. nothing to inpaint. The node deliberately doesn't fail; it just produces nothing. - Mask looks offset or squished - the mask is force-resized to match the image dimensions exactly, so any rounding drift between canvas and file gets corrected. If it still looks off, check you're painting on the loaded image, not a stale cached one.
- Want a narrower band of change? Lower
brush_sizeand add blur in your conditioning nodes rather than fighting with a giant feathered brush.
It's a small node with one job, and it does that job well. If your inpainting flow has been making you bounce between three nodes just to get a mask, this is worth the install.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | Select an uploaded image, or use the upload button. | |
| mask_data | STRING | Painted mask data (base64 PNG). Populated by the canvas painter. | |
| brush_size | INT | 324β256 | Brush radius in pixels. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| mask | MASK | β |
| image | IMAGE | β |