ComfyUI Node

Inpaint Model

InpaintModelConditioning and ControlNet, fused into one node

By CY-CHENYUE·Created 2 years ago·Updated 2 years ago· 93
Inpaint Model
  • positive
  • negative
  • inpaint_image
  • mask
  • vae
  • control_net
  • control_image
  • positive
  • negative
  • latent
strength0.50
start_percent0.000
end_percent1.000

What it is

Despite the name, this node doesn't load a model - nothing here downloads a checkpoint or points at a file on disk. It's the conditioning-prep node in ComfyUI-InpaintEasy's crop/inpaint/merge trio, and what it actually does is fuse two things you'd normally wire up separately: ComfyUI's own InpaintModelConditioning (the step that properly encodes your image and mask into a latent the sampler knows is an inpaint job, not a fresh generation) and an optional ControlNet apply pass on top. If your workflow needs structural guidance while inpainting - keeping a hand's pose while you fix its fingers, say - this is normally two nodes; here it's one.

That combo matters because it's exactly the shape of "standard model inpainting" from the pre-2026 playbook: a checkpoint, a VAE, positive/negative conditioning, an inpaint mask, optionally a ControlNet for structure. It's a good fit if you're inpainting on an SDXL, SD1.5, or Flux Fill-style stack. It is not the newer surgery you'd need to force a modern instruction-editing model like Qwen-Image-Edit or Flux Klein into true masked inpainting - that requires feeding the masked image in as a reference latent on top of InpaintModelConditioning, which this node doesn't do. Know which stack you're on before you reach for it.

How it works

You give it your positive/negative conditioning, the image and mask you want inpainted, and a VAE. It runs the standard inpaint-conditioning encode - this is what actually tells the sampler "only touch what's under the mask, treat everything else as fixed context" - and hands back conditioning plus a latent ready for your KSampler. If you also plug in a control_net and control_image, it layers a ControlNet apply pass on top using the same conditioning, governed by strength, start_percent, and end_percent. Skip those two optional inputs and it just does the conditioning step alone.

The inputs that matter

  • inpaint_image and mask - the region you're fixing. These should already be the right size (feed them from Image and Mask Resize or Crop By Mask upstream).
  • vae - needs to match whatever checkpoint you're sampling with, same as anywhere else in ComfyUI. A mismatched VAE is a classic cause of washed-out or shifted colors on the output.
  • positive / negative - your usual conditioning, passed through (and modified if ControlNet is attached).
  • strength - 0 to 10, default 0.5. This is the ControlNet strength dial, not a denoise setting, and it only does anything if you've wired up control_net. The default is conservative; per the community's own advice on inpainting with structural guidance, keep it well under half strength (people cite under 0.55 as a reasonable ceiling) so the ControlNet nudges the composition rather than fighting the mask.
  • start_percent / end_percent - 0 to 1, defaults 0 and 1. When during sampling the ControlNet is active. The standard trick for inpainting specifically is applying structural guidance only early - something like start 0, end 0.5 - so it steers the initial shape and then gets out of the way for the detail pass.

Outputs: positive, negative (both patched, wire straight into your sampler), and latent (the properly-encoded inpaint latent - don't swap in a plain EmptyLatentImage here, that's the whole point of using this node over just sampling raw).

Installing it

ComfyUI Manager: search "ComfyUI-InpaintEasy" and install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/CY-CHENYUE/ComfyUI-InpaintEasy

Restart. No model files to fetch - it's a wiring node, not a loader, so whatever checkpoint/VAE/ControlNet you already have loaded elsewhere is what it uses.

Common issues

ControlNet inputs are there but nothing changes. Both control_net and control_image are optional - if either is missing, the node silently skips the ControlNet pass and just does the base conditioning encode. Check both are actually wired.

Result ignores the mask entirely, regenerates the whole image. That's usually not this node - check your sampler's denoise setting. A denoise near 1.0 with a small mask can still look like it's overwriting more than expected if the mask itself is too soft or too large; tighten mask_blur_radius upstream or shrink the mask.

ControlNet fighting the inpaint, structure looks warped instead of preserved. Strength defaults to 0.5 but the slider goes to 10 - it's easy to crank it too high chasing more structural fidelity and get the opposite. Pull it back down, and consider narrowing end_percent so it only guides the early denoising steps rather than the whole pass.

CategoryInpaintEasy

Inputs (10)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
inpaint_imageIMAGE
maskMASK
vaeVAE
strengthFLOAT0.500–10
start_percentFLOAT0.0000–1
end_percentFLOAT1.0000–1
control_netoptCONTROL_NET
control_imageoptIMAGE

Outputs (3)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT