You painted a mask, queued the workflow, and ComfyUI gave you back the same picture. Or a grey smudge. Or a patch that looks pasted on.
Inpainting in ComfyUI fails in a handful of predictable ways, and almost all of them come down to four things: the wrong encode node, the wrong denoise value, a mask that never reached the sampler, or a model that is not built for inpainting.
This guide walks through every common cause, in the order you should check them. It covers SD 1.5, SDXL and Flux Fill, the right node for each, and the fixes for seams, colour shifts, blurry patches and outpainting.
- Nothing changes: the mask did not save (click Save in the Mask Editor), or denoise is too low for the node you used.
- Grey or blank patch: you used VAE Encode (for Inpainting) with denoise below 1.0. That node needs denoise 1.0.
- Normal checkpoint: use VAE Encode + Set Latent Noise Mask, with denoise around 0.5 to 0.8.
- Inpaint model or Flux Fill: use InpaintModelConditioning (or VAE Encode for Inpainting) with denoise 1.0.
- Flux Fill:
flux1-fill-dev.safetensorsinComfyUI/models/diffusion_models/, high guidance (BFL’s own example uses 30). - Seams or colour shift: grow and blur the mask, or use crop-and-stitch nodes and a colour match.
Quick Diagnosis Table
Find your symptom, then jump to the fix.
| Symptom | Most likely cause | Fix |
|---|---|---|
| Output is identical to the input | Mask not saved, or empty | Fix 1 |
| Masked area is grey, flat or blank | VAE Encode (for Inpainting) with denoise below 1.0 | Fix 2 |
| Only a faint change in the mask | Denoise too low with Set Latent Noise Mask | Fix 3 |
| New content ignores the rest of the picture | Normal model at denoise 1.0, or prompt too vague | Fix 4 |
| Visible edge or halo round the patch | Hard mask edge, no blending | Fix 5 |
| Whole image shifted colour slightly | VAE round trip of the full image | Fix 5 |
| Small face or hand comes out mushy | Mask area too small at full image size | Fix 6 |
| Flux Fill result is washed out or ignores prompt | Guidance too low, wrong model file | Flux Fill |
The Three Inpaint Encode Routes
Most broken inpaint workflows mix these up. Pick one route based on your model.
| Route | Use with | Denoise | What it does |
|---|---|---|---|
| VAE Encode + Set Latent Noise Mask | Normal SD 1.5, SDXL or Flux dev checkpoints | About 0.5 to 0.8 | Keeps the original pixels under the mask and changes them partly |
| VAE Encode (for Inpainting) | Dedicated inpainting checkpoints | 1.0 only | Blanks the masked area to grey before sampling, then fills it from scratch |
| InpaintModelConditioning | Inpaint models and Flux Fill | 1.0 | Sends the image and mask into the conditioning; with noise_mask on, only the masked area changes |
The key rule from Stable Diffusion Art’s guide: with a normal model, do not use VAE Encode (for Inpainting). Use plain VAE Encode and Set Latent Noise Mask instead. The inpainting encode node is meant for inpainting models, and it only works at denoise 1.0.
Fix 1: The Mask Never Reached the Sampler
If the output is identical to the input, check the mask before anything else.
- Save the mask. Right-click the Load Image node, choose Open in MaskEditor, paint, then click Save (in older builds, “Save to node”). Closing the editor without saving throws the mask away.
- Check the mask output is connected. The Load Image node has a
MASKoutput. It must go into Set Latent Noise Mask, VAE Encode (for Inpainting) or InpaintModelConditioning. - Preview the mask. Add a Convert Mask to Image node and a Preview Image node. White is the area that will change. If the preview is all black, the mask is empty.
- Check for inverted masks. Some workflows and loaders treat the mask the other way round. If the wrong part changes, add an InvertMask node.
- Check a stale image. If you replaced the picture in Load Image, the old mask may have gone with it. Paint it again.
A subtle one from the comfyui-inpaint-nodes README: masks with values like 0.9999 instead of exactly 1.0 can break masking. Their Stabilize Mask node snaps those values to 1.0.
Fix 2: Grey or Blank Patch
This is the most common inpainting complaint. VAE Encode (for Inpainting) replaces the masked pixels with grey before sampling. If denoise is below 1.0, the sampler does not fully regenerate that area, so some of the grey survives.
- Set denoise to 1.0 on the KSampler whenever you use VAE Encode (for Inpainting).
- Or switch routes. If you want a partial change that keeps the original underneath, use VAE Encode + Set Latent Noise Mask instead.
- Use an inpainting model with this node. A normal checkpoint at denoise 1.0 often paints something that does not match the surroundings.
The node also has a grow_mask_by setting (6 pixels by default in ComfyUI core). It expands the mask a little so the edges blend. If you see a thin outline, raise it to 10 to 20.
Fix 3: The Image Barely Changes
With Set Latent Noise Mask, denoise controls how far the masked area can move away from the original.
| Denoise | Result |
|---|---|
| 0.3 to 0.4 | Light touch-up: skin, texture, small fixes |
| 0.5 to 0.7 | Clear change that still follows the original shapes and colours |
| 0.75 to 0.9 | Bigger change, such as a new shirt or a new object |
| 1.0 | Ignores what was there; often clashes with a normal model |
Stable Diffusion Art suggests about 0.6 as a starting point for a normal model, and warns that going too high gives incoherent results. If 0.8 still changes too little, the original colours under the mask are steering the result.
Paint over the area roughly in an image editor first, or switch to an inpainting model at denoise 1.0.
Also check the prompt. It should describe what you want inside the mask, such as “red leather jacket”, not the whole picture.
Fix 4: The Wrong Kind of Model
Inpainting models are trained to see the surrounding picture and fill a hole that matches it. Normal models are not. That difference matters most at denoise 1.0.
- SD 1.5: use an inpainting checkpoint (many popular models ship an “inpainting” version). Put it in
ComfyUI/models/checkpoints/. - SDXL: you can turn a normal SDXL checkpoint into an inpaint model with the Fooocus inpaint patch from Acly/comfyui-inpaint-nodes. The README says it does not work with distilled merges (Turbo, Lightning, Hyper).
- Flux: use FLUX.1 Fill [dev], covered below, not the normal Flux dev model.
- ControlNet inpaint: a normal model plus an inpaint ControlNet lets you use high denoise without losing coherence.
Not sure where a file goes? Our ComfyUI model folders cheat sheet lists every folder.
Fix 5: Seams, Halos and Colour Shifts
Visible edges come from a hard mask boundary.
- Raise
grow_mask_by, or use a Grow Mask node, then a blur or feather node, so the edge fades instead of cutting. - Make the mask a little bigger than the object. The inpaint-nodes README stresses that the mask must be large enough to avoid seams.
- Turn on Differential Diffusion (a core node that patches the model) so a soft mask gives a soft transition.
Colour or brightness shifts happen because the whole image goes through the VAE and back, which changes it slightly everywhere.
- Paste only the inpainted area back onto the original with an ImageCompositeMasked node, using the same mask (grown a little).
- Or use Color Match (Masked) from comfyui-inpaint-nodes, with the original as
referenceand the output astarget.
Fix 6: Small Areas Come Out Blurry
If you inpaint a small face in a large photo, the model only gets a few dozen latent pixels to work with, so detail turns to mush.
The fix is to crop, inpaint at full resolution, and paste back. The ComfyUI-Inpaint-CropAndStitch pack does this in two nodes:
- Inpaint Crop cuts a box round the mask (with some context) and scales it up to a size the model likes, for example 1024 px.
- Run your normal inpaint on the crop.
- Inpaint Stitch scales the result back down and blends it into the original.
Install it from ComfyUI Manager by searching “Inpaint-CropAndStitch”. For faces specifically, a face detailer node does the same job automatically.
Flux Fill: Files and Settings That Work
FLUX.1 Fill [dev] is Black Forest Labs’ inpainting and outpainting model. These are the files from the ComfyUI Flux Fill tutorial:
| File | Folder | From |
|---|---|---|
flux1-fill-dev.safetensors |
ComfyUI/models/diffusion_models/ |
black-forest-labs/FLUX.1-Fill-dev (accept the licence first) |
clip_l.safetensors |
ComfyUI/models/text_encoders/ |
comfyanonymous/flux_text_encoders |
t5xxl_fp16.safetensors |
ComfyUI/models/text_encoders/ |
comfyanonymous/flux_text_encoders |
ae.safetensors |
ComfyUI/models/vae/ |
black-forest-labs/FLUX.1-schnell |
The templates are Flux.1 Inpaint (flux_fill_inpaint_example) and Flux.1 Outpaint (flux_fill_outpaint_example) in the template browser.
The settings that trip people up:
- Guidance: Flux Fill wants much higher guidance than Flux dev. Black Forest Labs’ own example on the model card uses 30. At the usual 3.5, fills often come out washed out or ignore the prompt.
- CFG: 1 on the KSampler, with guidance set in a FluxGuidance node.
- Denoise: 1.0, with the image and mask going in through InpaintModelConditioning.
- Model file: make sure Load Diffusion Model shows the fill file, not normal Flux dev.
The fill model is about the same size as Flux dev, so 12 GB cards are tight. GGUF versions work through ComfyUI-GGUF. For instruction-based edits rather than masks, FLUX.1 Kontext Dev or Qwen-Image 2.1 Edit may suit you better.
Outpainting Problems
Outpainting extends the canvas and fills the new border.
- Use Pad Image for Outpainting. Set how many pixels to add on each side. It outputs the bigger image and a mask of the new area.
- Add feathering on the pad node so the join blends.
- Extend in steps. Adding 256 px at a time looks better than doubling the width in one go.
- Use an inpaint model or Flux Fill at denoise 1.0. A normal model at lower denoise has nothing to keep in the blank border.
- Pre-fill the border with the Inpaint (using Model) node and LaMa from comfyui-inpaint-nodes, so the sampler starts from a rough continuation instead of grey.
For a whole-video version of outpainting, see the Reframe node in our H3 Max editing nodes guide.
Helper Node Packs
| Pack | Why you might want it | Models and folder |
|---|---|---|
| Acly/comfyui-inpaint-nodes | Fooocus inpaint for SDXL, LaMa and MAT fill, Expand, Shrink and Stabilize Mask, Color Match | ComfyUI/models/inpaint/: Fooocus files from lllyasviel/fooocus_inpaint, big-lama.pt, MAT_Places512_G_fp16.safetensors |
| lquesada/ComfyUI-Inpaint-CropAndStitch | Crop, inpaint at full resolution, stitch back | None |
To install either, clone it into ComfyUI/custom_nodes/ or use ComfyUI Manager, then restart. The inpaint-nodes pack needs pip install opencv-python for its telea and navier-stokes fill modes. For a GIMP-based way to inpaint with ComfyUI behind it, see OpenFill, and our ComfyUI errors guide for general errors.
FAQ
Why does ComfyUI inpainting return the same image?
Usually the mask was never saved in the Mask Editor, or it is not connected to the encode node. Preview the mask to confirm it has white areas.
What denoise should I use for inpainting?
About 0.5 to 0.8 with a normal model and Set Latent Noise Mask. Exactly 1.0 with VAE Encode (for Inpainting), InpaintModelConditioning or Flux Fill.
Should I use VAE Encode (for Inpainting) or Set Latent Noise Mask?
Set Latent Noise Mask with a normal checkpoint. VAE Encode (for Inpainting) with a dedicated inpainting checkpoint at denoise 1.0.
Why is my inpainted area grey?
VAE Encode (for Inpainting) blanks the area to grey and needs denoise 1.0 to fill it completely. Set denoise to 1.0 or change node.
What guidance does Flux Fill need?
Much higher than normal Flux. Black Forest Labs’ example uses 30. Keep KSampler CFG at 1.
How do I stop seams round the inpainted area?
Grow and feather the mask, use Differential Diffusion, and composite only the masked area back onto the original.
Sources
- ComfyUI docs: Flux.1 Fill Dev (files, folders, templates)
- ComfyUI docs: VAE Encode (for Inpainting)
- Acly/comfyui-inpaint-nodes (Fooocus inpaint, mask tools, model folder)
- Stable Diffusion Art: How to inpaint in ComfyUI (node choice, denoise)
- black-forest-labs/FLUX.1-Fill-dev (guidance example, licence)



