ComfyUI Node

Flux Inpainting

Flux Inpainting — the ComfyUI-Flux-Inpainting node for FLUX.1 Fill

By rubi-du·Created 2 years ago·Updated about a year ago· 45
Flux Inpainting
  • image
  • mask
  • image
prompt
num_inference_steps50
cachedfalse
guidance_scale30.0

Quick heads-up before anything else: if you've also seen a node called FluxInpainting (no space, no hyphen) from the same pack, you're not going crazy - they take the exact same inputs and produce the exact same output. That's almost certainly two registrations of one underlying class (the display name "Flux Inpainting" with a space versus the internal class name FluxInpainting), not two different tools you need to learn separately. Whichever one your search landed you on, this is what it does.

What this node is for

Flux Inpainting is the all-in-one node from rubi-du's ComfyUI-Flux-Inpainting pack - feed it a prompt, an image, and a mask, and it hands back a finished inpaint. It wraps Black Forest Labs' FLUX.1 Fill dev model, the only widely-used open checkpoint actually trained for masked inpainting rather than a general model with a mask taped on. That distinction still matters in 2026: instruction-editing models like Qwen-Image-Edit and Flux 2 Klein have taken over most "just fix this" jobs, but they re-render the whole frame each pass, so anything outside your mask drifts a little every time. A dedicated inpainting model like this doesn't have that problem - only the masked region ever changes.

Because it also happens to handle outpainting (the README ships a separate outpainting example workflow using this same node), it's worth thinking of it less as "an inpaint node" and more as "the general mask-and-regenerate tool" for this pack. Extending a canvas is the same operation with the mask flipped onto the new, empty area - nothing about the node changes.

How it works under the hood

This is a full pipeline in one box, not a thin wrapper around ComfyUI's usual model/sampler/decode chain. It loads the Flux Fill transformer, VAE, and text encoders itself and runs Hugging Face's diffusers FluxFillPipeline internally on your prompt, image, and mask. That's why the README asks you to lay out models in diffusers' own folder format (transformer/, text_encoder/, vae/, scheduler/ subdirectories) rather than the single-file .safetensors drop you're used to elsewhere in ComfyUI - it's genuinely a different loading mechanism, not just a different folder name.

The inputs that matter

  • prompt - plain multiline text; there's no separate CLIP encode step, this node builds its own conditioning from the string.
  • image and mask - the source image and the region to regenerate.
  • num_inference_steps (default 50, 10–60) and guidance_scale (default 30, 0.1–30) - note that 30 default on guidance isn't broken, it's Flux Fill's actual documented setting; a normal Flux Dev generation runs around 3.5, but Fill genuinely wants much higher guidance to follow the prompt inside the mask.
  • cached - off by default; turning it on should keep the loaded pipeline in memory across runs instead of reloading a 12B model plus two text encoders from disk every single time.

Output is a single image, ready for a preview/save node or for compositing back over your original if you only wanted a small, contained fix.

Installing it

Same as the rest of the pack: search "ComfyUI-Flux-Inpainting" in ComfyUI Manager, or git clone it into custom_nodes and pip install -r requirements.txt before restarting. That pip step isn't optional - it pulls in diffusers and bitsandbytes, which is what actually lets the node load the NF4-quantized weights.

You'll need two model folders under ComfyUI/models/: the base FLUX.1-Fill-dev (vae, scheduler, text encoder - BFL's repo) and FLUX.1-Fill-dev-nf4 (the 4-bit-quantized transformer - sayakpaul's build). The NF4 quantization is the point: it's what makes running Flux Fill's 12B transformer realistic on cards that can't fit the full fp16 stack.

Common problems

  • Import errors after cloning usually trace back to a skipped pip install -r requirements.txt.
  • "Model not found" on load almost always means the model folders aren't laid out the way the README's directory tree shows - this pack expects diffusers-style subfolders, not one file.
  • No LoRA input anywhere. If your workflow needs a character LoRA on top of Flux Fill, this node has no slot for it - you'd need to build the hand-wired ComfyUI Flux Fill graph (UNETLoader → InpaintModelConditioning → KSampler) instead, and even there, community reports on Flux Fill plus character LoRAs describe mixed results.
  • Nothing's been updated since December 2024. Treat this as a stable, frozen snapshot rather than actively maintained - if a ComfyUI or diffusers update breaks something down the line, don't expect an upstream fix quickly.
CategoryInpainting

Inputs (6)

NameTypeDefaultDescription
promptSTRING
imageIMAGE
maskMASK
num_inference_stepsINT5010–60
cachedBOOLEANfalse
guidance_scaleFLOAT30.00.1–30

Outputs (1)

NameTypeDescription
imageIMAGE