Nodes/ComfyUI Inpaint Nodes/Apply Fooocus Inpaint
ComfyUI Node Runs on cloud

Apply Fooocus Inpaint

Turn any SDXL checkpoint into an inpaint model

By Acly·Created 3 years ago·Updated 3 months ago· 1,232
Apply Fooocus Inpaint
  • model
  • patch
  • latent
  • model

This node does one specific thing: it patches an ordinary SDXL checkpoint so it behaves like a purpose-built inpainting model. No separate model file to swap in, no fine-tune - it grafts a small patch onto the model you already loaded, the same trick that made Fooocus's inpainting famously good back when Fooocus was the tool everyone pointed beginners at. Acly (also the person behind the Krita AI Diffusion plugin) ported the patch into ComfyUI as this node pack, and it's still the standard way to get Fooocus-quality inpainting outside Fooocus itself.

Why bother when Flux Fill or a modern edit model exists? Because masked inpainting still owns things instruction-editing can't touch - bit-identical unmasked pixels, a real denoise dial instead of a yes/no instruction, and full support for the SDXL/Illustrious checkpoints the uncensored side of this hobby still runs on. If you're working in that stack, this is one of the more reliable ways to get a proper inpaint model without training one.

How it works

The patch is applied at the model level, not as a separate sampler step. You load it with Load Fooocus Inpaint, feed it in here along with your checkpoint's model and a latent, and out comes a patched model - ready to drop straight into a normal KSampler. Everything downstream (prompt, sampler, steps) works exactly like a regular generation; the model itself now understands the masked region as something to fill in.

Inputs and outputs

  • model - your SDXL checkpoint's MODEL output.
  • patch - the INPAINT_PATCH from Load Fooocus Inpaint.
  • latent - where you have two real choices. Wire in ComfyUI's own VAE Encode (for Inpainting) if you're fine with full 1.0 denoise and no existing content bleeding through. If you want to keep some of the original image (denoise under 1.0), use this pack's VAE Encode & Inpaint Conditioning node instead and connect its latent_inpaint output here - a plain InpaintModelConditioning latent won't work.

The single output is a patched model, which goes straight into your KSampler.

Installing it

Grab the pack through ComfyUI Manager (search "ComfyUI Inpaint Nodes"), or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Acly/comfyui-inpaint-nodes.git

Restart ComfyUI. Then get the actual patch model - download it from lllyasviel/fooocus_inpaint on Hugging Face and drop it into ComfyUI/models/inpaint. That's a separate step from installing the node pack, and it's the one people forget.

Common issues

Use the real checkpoint, not a distilled merge. The README is blunt about this: Turbo, Lightning, and Hyper merges don't work with the patch. You need the regular SDXL checkpoint the merge was distilled from.

"Fried," oversaturated results with visible halos at the mask edge are a real complaint people hit with this exact node pair - one recent thread had a user getting burnt skin tones and neck seams on an Illustrious checkpoint with LoRAs loaded and denoise cranked to 1.0. Before blaming the LoRA stack, check two things the replies actually nailed down: your sampler/scheduler combo (Euler + Beta is the safe default; if your checkpoint has recommended settings - WAI-Illustrious, for instance, wants Euler ancestral - use those, not whatever the example workflow ships with), and your denoise value. 1.0 is aggressive even for a big pose change - it's effectively regenerating the masked region from scratch, and it's often the actual cause of the style mismatch, not the patch itself.

Seams at the mask boundary are usually a masking problem, not a patch problem - feather your mask (Expand Mask in this same pack has a blur option) before it reaches the VAE encode step.

Categoryinpaint

Inputs (3)

NameTypeDefaultDescription
modelMODEL
patchINPAINT_PATCH
latentLATENT

Outputs (1)

NameTypeDescription
modelMODEL