FooocusInpaintWrapper
Fooocus-grade inpainting inside ComfyUI — the whole engine, vendored
- image
- mask
- image
Fooocus's inpainting has a reputation that outlived Fooocus. Years after lllyasviel froze the project to bug-fixes-only, people still describe its masked inpaint as the thing they could never quite replicate elsewhere - and this node is the most literal way to get it: it doesn't reimplement Fooocus's inpaint, it drags the entire Fooocus codebase into your ComfyUI install and runs it for you. The name is a lie in a good way: no API, no separate UI, no key. You wire in an image and a mask, it hands the job to Fooocus's own engine, and a finished IMAGE comes back out.
What you're actually installing
The pack is one node, FooocusInpaintWrapper, and a vendored copy of the whole Fooocus repo under Fooocus/. The README says it plainly: the author copied practically all of Fooocus's code, wrote a thin bridge that converts ComfyUI tensors into Fooocus's input format, then patched the pipeline so the worker runs synchronously and writes progress to a percentage.txt file the node polls. It's an "embrace and vendor" hack, not a careful reimplementation - and it works.
The engine itself is the real Fooocus magic: its inpaint_v26 patch applied on top of any SDXL checkpoint, plus the fixed-resolution sampling, refiner swap and negative ADM guidance that make Fooocus output look the way it does. That means one hard constraint: this is SDXL-only, permanently. No Flux, no Qwen. Fooocus is a frozen SDXL machine and this node inherits both the strength and the ceiling.
The inputs that matter
For a beginner, five of them do the real work:
- image and mask - required. Draw the mask wherever you want changes. Anything unmasked comes back bit-identical, which is the entire remaining case for mask-based inpainting in an era of whole-frame edit models.
- performance -
Quality,Speed,Extreme Speed,Lightning,Hyper-SD. These are Fooocus's own presets;Speedis the default and a fine place to start. - prompt - what should be in the masked area.
negative_promptis optional. - checkpoint - auto-lists everything in your
models/checkpointsfolder. Empty? It silently falls back to a bundledjuggernautXL_v8Rundiffusion.safetensors. - seed - standard noise seed for reproducibility.
Two optional ones are worth knowing because they map to Fooocus features you can't get elsewhere: method (Improve Detail / Modify content) switches between a light detail-only pass and a full content replacement inside the mask, and outpainting (Left, Right, Top, Bottom, or combined) extends the canvas in that direction instead of filling a mask. There are also five lora1–lora5 slots with weights, picked from your models/loras folder. Everything else - resolution (fixed at 1152×896), sampler (dpmpp_2m_sde_gpu/karras), refiner - is hardcoded Fooocus opinion. You don't tune those, and that's the deal.
Installing it
Via ComfyUI Manager, search "ComfyUI Fooocus Inpaint Wrapper". Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/iacoposk8/ComfyUI-Fooocus-Inpaint-Wrapper
cd ../..
python_embeded/python.exe -m pip install -r ComfyUI/custom_nodes/ComfyUI-Fooocus-Inpaint-Wrapper/Fooocus/requirements_versions.txt
That second step is the one that bites. The pack has no top-level requirements.txt - the real dependencies live inside Fooocus/requirements_versions.txt, a big pinned list that includes gradio, rembg, GroundingDINO, SAM and onnxruntime, all installed into your shared ComfyUI Python environment. Manager will happily install the node and then leave you with a node that errors on load until you run that pip command yourself. Expect conflicts if you run other node packs with picky pins; this list is not shy about forcing versions like numpy==1.26.4.
The first run is also slow by design: the constructor downloads models it decides you need - the ~7GB juggernautXL_v8Rundiffusion checkpoint, the GPT prompt-expansion model, an SDXL VAE-approx, and an offset LoRA - straight into your ComfyUI models/ folders. Watch the terminal; it looks hung until the download bar finishes.
What to watch for
Because it runs the real Fooocus worker synchronously, the node blocks while generating - a slow SDXL inpaint is normal, and progress shows up via the percentage hack. And because that hack is a manual patch into vendored code, the README itself warns the instructions can rot - "several things could change and these instructions could no longer be valid." If previews stop updating or it throws on a fresh Fooocus copy, that's the drift talking.
Worth knowing before you commit to a heavy dependency tree for one node: if all you want is the patch, Acly's maintained comfyui-inpaint-nodes (Apply Fooocus Inpaint) gives you the same inpaint_v26 quality in a lean, graph-friendly form. Reach for this wrapper when you want the whole Fooocus experience - presets, outpainting, method switching, bundled checkpoint - in a single node.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | MASK | — | |
| performance | COMBO | Speed | 5 options: Quality, Speed, Extreme Speed, Lightning, Hyper-SD |
| checkpoint | COMBO | No checkpoints found | 1 options: No checkpoints found |
| prompt | STRING | — | |
| guidance_scale | FLOAT | 4.000–30 | — |
| image_sharpness | FLOAT | 2.000–30 | — |
| seed | INT | 00–18446744073709550000 | The random seed used for creating the noise. |
| negative_promptopt | STRING | — | |
| methodopt | COMBO | 3 options: , Improve Detail, Modify content | |
| inpaint_additional_promptopt | STRING | — | |
| outpaintingopt | COMBO | 7 options: , Left, Right, Top, Bottom, Top + Bottom, +1 | |
| lora1opt | COMBO | None | 2 options: No checkpoints found, None |
| lora1_weightopt | FLOAT | 0.10-2–2 | — |
| lora2opt | COMBO | None | 2 options: No checkpoints found, None |
| lora2_weightopt | FLOAT | 0.10-2–2 | — |
| lora3opt | COMBO | None | 2 options: No checkpoints found, None |
| lora3_weightopt | FLOAT | 0.10-2–2 | — |
| lora4opt | COMBO | None | 2 options: No checkpoints found, None |
| lora4_weightopt | FLOAT | 0.10-2–2 | — |
| lora5opt | COMBO | None | 2 options: No checkpoints found, None |
| lora5_weightopt | FLOAT | 0.10-2–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |