Stability Inpainting
Classic masked inpainting, hosted — untouched pixels stay untouched
- image
- mask
- IMAGE
Inpainting is the masked-edit workhorse of the pack: you draw a mask over what you want changed, type what should be there instead, and the masked region gets regenerated while everything outside the mask stays byte-for-byte identical. That last bit is the whole reason masked inpainting still matters in 2026 - the new crop of instruction-edit models (Flux Kontext, Qwen-Image-Edit) can do a lot from a sentence, but they re-emit the whole frame and the unmasked parts drift. A mask guarantees the rest of the image doesn't move. This node gives you that guarantee, hosted.
It's a cloud node from the official "Stability API nodes for ComfyUI" pack, calling stable-image/edit/inpaint on Stability's servers. Zero VRAM, credits per call, API key required. Locally you'd run a dedicated inpainting model - free, but it needs VRAM and a checkpoint. The community's "not local, not interested" verdict on this pack stands; this node is for when you want the masked-edit guarantee without the local stack.
How it works
You need three things: image, mask, and prompt. The mask is a standard ComfyUI MASK tensor - draw it on the node's preview, or generate it in a workflow (a segmentation model, color-to-mask, whatever) and feed it in. The node converts it to a PNG and uploads it alongside the image. Feed no mask and the request is incomplete; the server bounces it.
The controls that matter:
- prompt - what the masked area becomes. Since everything outside the mask is frozen, this only describes the region you're changing.
- grow_mask (0–20, default 5) - how many pixels the masked region expands before regenerating. It's your seam dial: too low leaves a fringe, too high eats into the good pixels. Default 5 is right for most subjects.
- negative_prompt - steering for the fill.
- seed - re-roll a fill you didn't like.
The pack's shared furniture follows: style + style_preset (ignored unless style is on), output_format. One IMAGE out, into Save Image or downstream.
Installing it
From the "Stability API nodes for ComfyUI" pack - ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Stability-AI/ComfyUI-SAI_API
# restart ComfyUI
No model downloads; requests is the only dependency beyond ComfyUI's stack. Key via SAI_API_KEY, a sai_platform_key.txt file, or the per-node api_key_override (don't share workflows using that - the key travels in the JSON).
Common issues
- "bad_request" - you almost certainly didn't feed a mask. It needs a
MASK, not an image. - Seam artifacts -
grow_masktoo low. Bump it a few pixels and re-run. - The fill ignores your prompt - check you're describing the masked region, not the whole scene; the model only hears about the region it's regenerating.
- "payment_required" - credits ran out.
If you've been burned by edit models silently drifting everything else in the frame, this is the correct tool for the job. It's narrow, it's paid, and it does the one thing masked inpainting still uniquely guarantees: the pixels you didn't touch are the pixels you keep.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| prompt | STRING | — | |
| maskopt | MASK | — | |
| negative_promptopt | STRING | — | |
| grow_maskopt | INT | 50–20 | — |
| seedopt | INT | 00–4294967294 | — |
| styleopt | BOOLEAN | false | — |
| style_presetopt | COMBO | 17 options: 3d-model, analog-film, anime, cinematic, comic-book, digital-art, +11 | |
| output_formatopt | COMBO | 3 options: png, webp, jpeg | |
| api_key_overrideopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |