Recraft Image Inpainting
The mask still wins when the rest of the image has to stay put
- image
- mask
- recraft_style
- IMAGE
Every instruction-editing model that's taken over the scene lately - Qwen-Image-Edit, Flux Kontext, Flux 2 Klein - has one structural weakness: it regenerates the whole frame, so the parts you didn't ask about come back close but not identical. Fine for one edit. A disaster when you're chaining five edits and every pass drifts the details a little further.
Mask-based inpainting still owns the opposite property: the pixels outside the mask don't move. Not close, not similar - identical. The Recraft Image Inpainting node is that classic masked-inpaint flow, handed to a hosted model that does it well and hands you back a clean image.
What it actually is
A core partner node - ships with ComfyUI, no install, cloud-backed through Comfy's proxy to Recraft's API. Sign in with your ComfyUI account, spend credits per call, and the node does the work on Recraft's servers. It's synchronous: upload, submit, poll, and an IMAGE tensor comes back into your graph. Your machine orchestrates; it doesn't render.
The inputs that matter
The shape is exactly what mask-inpaint workflows look like locally, minus the model download:
- image - the base image.
- mask - the region to regenerate. White where you want Recraft to redraw, black where it must stay untouched. Make it in the UI's mask editor or with a segment node; sloppier masks give you seams.
- prompt - what goes in the masked area. The unmasked part never sees it.
- n (1–6) - how many candidates to generate. Pick 1 for a clean run; crank it when you're hunting for a good take on a tricky region.
- seed - and here's a twist worth knowing: the tooltip says the seed only decides whether the node re-runs. Results are nondeterministic regardless. Don't expect seed-locked reproducibility; it's a cloud model behind Comfy, not a local sampler.
- recraft_style (optional) - a style input, and it expects the custom
RECRAFT_V3_STYLEtype produced by the other Recraft style nodes (the StyleV3 ones, Create Style, and so on). Wire one in to lock the inpainting to a look instead of hoping the prompt carries it. - negative_prompt (optional) - undesired elements, e.g.
blurry, distorted, extra fingers. Recraft's models are decent at honoring it.
The output is IMAGE (a batch if n > 1), which you can Save or keep feeding downstream.
Where it fits
This is the tool for the jobs the KB's inpainting essay calls "what the mask still uniquely gives you": fixing a single region - an object to remove, a garment to swap, a face to repair - while keeping every other pixel bit-identical, or compositing something at an exact boundary you choose rather than one the model infers. If you're doing a chain of edits, mask-inpainting each step stops the drift that full-frame editors accumulate.
It's also the disciplined route for fixing a generated image's one bad element - that mangled hand, that wrong sign - instead of re-rolling the whole thing and hoping.
Gotchas
- It costs credits per call, and
n > 1multiplies the bill. Iterate withn = 1and a vague prompt, then commit once you've got the region right. - Nondeterminism means the exact output shifts between runs. It's a feature for exploring, annoying if you wanted a duplicate.
- The usual partner-node rules apply: needs a Comfy account with credits, and the localhost-only login quirk if you're serving ComfyUI on a LAN.
- One real limitation: it's a masked edit, not a full-frame editor. You can't make it "change the whole scene but keep the subject" - that's a different node's job.
When a full-frame edit model keeps nudging the background, and you need one region changed and nothing else, stop fighting the drift and paint a mask. That's what this node is for.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| prompt | STRING | Prompt for the image generation. | |
| n | INT | 11–6 | The number of images to generate. |
| seed | INT | 00–18446744073709550000 | Seed to determine if node should re-run; actual results are nondeterministic regardless of seed. |
| recraft_styleopt | RECRAFT_V3_STYLE | — | |
| negative_promptopt | STRING | An optional text description of undesired elements on an image. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |