Inpaint Canvas: Krita-style inpainting inside one ComfyUI node

Inpainting in ComfyUI has always meant a chain of nodes: paint a mask, crop, generate, stitch, load the result somewhere to compare, repeat. Every iteration goes through the whole graph again. Inpaint Canvas replaces that chain with an editor. You select an area, hit Generate, and the result comes back as a layer on top of your image. If you don't like it, generate again. If you like half of it, erase the other half. Everything stays editable until you export.
Open source (GPL-3.0) and works with any inpainting chain: Flux, Flux.2 Klein, Flux Kontext, Qwen Image Edit, SDXL, local models or API.
## The round trip
The node has two outputs that matter: crop_image and mask. Wire them into whatever inpainting chain you use, and wire the chain's output back into the node's result input. That is the whole setup.

Inside the editor you draw a selection, write a prompt and press Generate. The node crops the selected area with some context, your chain generates, and the result lands as a new layer exactly where the selection was. The rest of the image is never touched.

## Colour match per layer This is the feature I use the most. Every result layer has a Match slider. It shifts the colours of the generated area towards the image underneath, so a result from a different model or seed blends in instead of sitting on top like a sticker. It is per layer and non-destructive, so you can dial it in after the fact.

## Layers like a real editor Layers have thumbnails, opacity, blend modes, lock and alpha lock. Only the active layer is expanded, the rest stay compact. Duplicate, merge down, rename, reorder by drag. Ctrl+click on the canvas picks the layer under the cursor.

Drop an image onto the canvas and it becomes a new image layer. Reference layers for Flux.2 and Kontext multi-reference editing have their own list, they travel with the crop as extra batch images but are not part of your picture. ## Selection Rectangle, lasso, magic wand, quick mask painting, feather, grow, shrink, invert. Selections can be saved and reloaded. Object selection by text works with SAM3 ("the car", "the left headlight"), and RMBG removes backgrounds. Hover an object with the object tool and it lights up before you click.

## Retouch, filters, text Smudge, clone stamp and healing brush for the small fixes that don't need a model. Paint and erase on any layer. Filter layers are non-destructive and sit in the stack like everything else: curves, levels, colour balance, HSL, film grain with presets, and LUT files. Move them, hide them, delete them, the pixels below are untouched.

Text layers use bundled open-source fonts and are edited directly on the canvas. Rotate at the corners, snap to guides, flip, or type exact numbers.

## Canvas, compare, export The canvas tool drags the borders to extend (outpaint) or crop the image. Compare shows two results side by side with a draggable divider, or hold backslash for before and after.

Export as PNG with the workflow embedded, JPG, WebP, or as PSD and OpenRaster with all layers intact, so you can continue in Photoshop, Krita or GIMP.

## Example workflows Two workflows are attached to this article and included in the repo under examples/. **Flux.2 Klein, local.** The node frees the helper models (SAM3, RMBG, Qwen-VL) from VRAM before the generation starts, so they don't compete with the diffusion model.

**Flux.2 via API.** Same editor, generation runs through the API node, helper models stay loaded.

## Install - ComfyUI Manager: search for **Inpaint Canvas** - GitHub: https://github.com/DenRakEiw/ComfyUI-InpaintCanvas - Manual: GUIDE.md in the repo covers every tool and shortcut Optional helpers: select by text needs the comfyui-rmbg pack (SAM3), cutouts use RMBG-2.0 from the same pack, prompt upsampling uses ComfyUI-QwenVL. The model weights are downloaded on first use. The README has the full table. ## Feedback wanted I built this over a couple of weekends and everything makes sense to me, which is exactly why I can't judge how intuitive it is for someone else. If you get stuck, have to hunt for a button, or expect a tool to behave differently, tell me in the comments or open an issue on GitHub. That is the feedback that improves the next version.


