Flux Inpainting
FluxInpainting — the all-in-one Flux Fill node from ComfyUI-Flux-Inpainting
- image
- mask
- image
If you've ever tried to hand-wire FLUX.1 Fill in ComfyUI - UNETLoader, DualCLIPLoader, a couple of CLIPTextEncode nodes, InpaintModelConditioning, KSampler, VAEDecode - you know it's not exactly one click. FluxInpainting is rubi-du's answer to that: dump a prompt, an image, and a mask into one node, get a finished image out the other end. No graph plumbing required.
What it actually does
This isn't ComfyUI's native model-loading pipeline wearing a trenchcoat. Under the hood it wraps Hugging Face's diffusers FluxFillPipeline directly - the node loads the transformer, VAE, and text encoders itself and runs the whole inpaint in one call. You can tell because the model folder structure the README asks for looks like a cloned HF repo (transformer/, text_encoder/, scheduler/, vae/ subfolders), not a single .safetensors file. That's a deliberate trade: you give up the ability to swap samplers or stick a LoRA in the chain, and in return get a node you can plug a prompt into and walk away from.
FLUX.1 Fill dev is Black Forest Labs' purpose-trained inpainting/outpainting model - still the only widely-used open checkpoint actually trained for masking rather than a regular model with a mask bolted on. That's the whole reason this pack is worth having around even in a 2026 where instruction-editing models (Qwen-Image-Edit, Flux 2 Klein) have taken over most "just change this" jobs: those models re-emit the whole frame and drift a little every pass, while masked inpainting like this only touches what's under the mask.
Inputs and output
Four things you actually set, plus two you can mostly leave alone:
- prompt - a plain multiline text box. This node builds its own conditioning internally, so you don't need CLIPTextEncode anywhere upstream.
- image / mask - your source image and the region to regenerate.
- num_inference_steps - defaults to 50, range 10–60. Flux Fill doesn't need Flux's usual 20-30; give it the room.
- guidance_scale - defaults to 30, range 0.1–30. That's not a typo or a UI bug: BFL's own diffusers example for Flux Fill really does use guidance around 30, way higher than a normal Flux Dev generation's 3.5. Turning it down will just make the fill ignore your prompt.
- cached - a boolean, off by default. Flip it on and the node should keep the pipeline resident in memory between queue runs instead of reloading everything from disk each time, which matters a lot when "everything" is a 12B transformer plus two text encoders.
The single output is image - wire it straight into a Save/Preview node, or composite it back over your original if you're doing a small fix (see the troubleshooting note below).
Installing it
Three ways, per the README:
- ComfyUI Manager - search "ComfyUI-Flux-Inpainting" and install.
- Manual clone -
cd ComfyUI/custom_nodes && git clone https://github.com/rubi-du/ComfyUI-Flux-Inpainting.git, thencd ComfyUI-Flux-Inpainting && pip install -r requirements.txt, then restart. Don't skip thepip install- it pulls in real Python deps (diffusers, bitsandbytes for the NF4 weights) beyond what ComfyUI ships with, and skipping it is the most common reason a node import silently fails. - Download and unzip the source into
custom_nodesby hand.
The bigger lift is the model download, not the node install. You need two separate model directories under ComfyUI/models/: FLUX.1-Fill-dev (vae, scheduler, text_encoder, etc. from BFL's official repo) and FLUX.1-Fill-dev-nf4 (the transformer and second text encoder from sayakpaul's NF4 build). That NF4 quantization is what makes this pack worth using over the full fp16 stack - it's a 4-bit BitsAndBytes squeeze that's the difference between needing 24GB+ VRAM and running comfortably on much less. Neither folder is a single-file drop; match the README's directory tree exactly or the pipeline won't find its pieces.
Where people get stuck
- Skipped
pip install -r requirements.txt. Cloning alone isn't enough - the extra deps are what let it load the NF4 weights. - Wrong model folder layout. Diffusers-style subdirectories, not the usual single-file
.safetensorsdrop. If the node errors on load, check the structure against the README's tree. - No LoRA slot. Community reports on Flux Fill plus a character LoRA generally describe mixed results even in the native pipeline, and this node has no input for one at all - you'd need ComfyUI's own hand-wired Flux Fill graph instead.
- The pack looks frozen. Last update was December 2024. Don't expect a quick fix if a future ComfyUI or diffusers update breaks something.
- Two nodes with the same name. You'll also find
Flux-Inpaintingwith identical inputs - same underlying node, different registered name, not a second thing to learn.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| image | IMAGE | — | |
| mask | MASK | — | |
| num_inference_steps | INT | 5010–60 | — |
| cached | BOOLEAN | false | — |
| guidance_scale | FLOAT | 30.00.1–30 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |