Flux Transformer Inpainting
FluxTransformerInpainting — Flux Fill with your own CLIP and VAE plugged in
- conditioning
- image
- mask
- vae
- image
This is the "give me control" node in rubi-du's Flux Fill pack. Where FluxInpainting swallows a raw prompt and does everything itself, and FluxSimpleInpainting lets you bring your own conditioning but still handles VAE internally, FluxTransformerInpainting hands both the conditioning and the VAE back to you. The only thing it still owns is the transformer itself - the actual Flux Fill diffusion weights.
What it's for
FLUX.1 Fill dev is Black Forest Labs' dedicated inpainting/outpainting model, and it's still the reference point everyone measures newer masked-editing tricks against - the model most other tools are trying to approximate rather than replace, because it was actually trained on masked pairs rather than having a mask bolted onto a general checkpoint. This node exists so you can drop that model into a more normal-looking ComfyUI graph: your own DualCLIPLoader + CLIPTextEncode for the prompt, your own VAE loader for encoding/decoding, and this node just doing the inpaint sampling itself.
Per the pack's own README, this node "only needs to load the transformer submodel from the FLUX.1-Fil-dev-nf4 model" - it doesn't touch the rest of the full Fill model the way FluxInpainting does. Notice there's no model-path dropdown in this node's inputs, unlike its GGUF sibling; it expects the NF4 transformer to already be sitting in the fixed folder the README's directory layout describes and picks it up from there automatically.
Inputs and output
- conditioning - a
CONDITIONINGobject, i.e. whatever yourCLIPTextEncode(fed from a Flux-compatibleDualCLIPLoader) produces upstream. - vae - an
AUTOENCODERinput. This comes fromFluxVAELoader, the sibling node in this same pack - not ComfyUI's native VAE loader. It's a different type on purpose, so the two only connect to each other. - image / mask - the source image and the region to regenerate.
- num_inference_steps - default 50, range 10–60.
- guidance_scale - default 30, range 0.1–30. That high default isn't a bug; Flux Fill's documented guidance really does sit up near 30, well above a normal Flux Dev generation's 3.5. Dial it down too far and the fill stops respecting your prompt.
- cached - off by default; turning it on should keep the transformer resident in memory across runs rather than reloading it from disk on every queue, which is worth doing given it's a multi-gigabyte NF4 model.
Output is a single image - feed it into a save/preview node, or composite the masked region back onto your original if you're doing a small, targeted fix.
Installing it
Search "ComfyUI-Flux-Inpainting" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/rubi-du/ComfyUI-Flux-Inpainting.git
cd ComfyUI-Flux-Inpainting
pip install -r requirements.txt
then restart. The pip install step brings in diffusers and bitsandbytes, which is what lets the node load the 4-bit-quantized transformer at all - skip it and you'll likely get import errors instead of a working node.
For the model itself, you need the transformer (and text_decoder_2) submodel from sayakpaul/FLUX.1-Fill-dev-nf4 placed at ComfyUI/models/FLUX.1-Fill-dev-nf4/transformer, following the README's directory tree exactly. Since this node loads no other submodels, you don't need the rest of the full FLUX.1-Fill-dev folder that the monolithic nodes require - just make sure you separately have a VAE (via FluxVAELoader, which needs its own vae file in ComfyUI/models/vae) and a Flux-compatible CLIP setup for the conditioning.
Common issues
- "Model not found" errors almost always mean the NF4 transformer isn't in the exact fixed path the README describes - there's no widget to point this node somewhere else, so folder placement has to be right.
vaeinput rejected or won't connect - that port wantsFluxVAELoader'sAUTOENCODERoutput, not ComfyUI's nativeVAELoader. They look similar but are different types.- Conditioning built the wrong way - this node expects Flux-style dual conditioning (
DualCLIPLoader→CLIPTextEncode), same as the rest of a Flux graph. - Skipped
pip install -r requirements.txtis the single most common reason this and every other node in the pack fails to import cleanly. - No LoRA slot anywhere in this node - if you need a character or style LoRA over Flux Fill, you're back to hand-building ComfyUI's native Flux Fill graph, and even that combination has a reputation in the community for being inconsistent.
- Frozen since December 2024. This pack hasn't been updated since it added the GGUF node - expect a stable snapshot, not active maintenance against newer ComfyUI releases.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| image | IMAGE | — | |
| mask | MASK | — | |
| num_inference_steps | INT | 5010–60 | — |
| cached | BOOLEAN | false | — |
| guidance_scale | FLOAT | 30.00.1–30 | — |
| vae | AUTOENCODER | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |