ComfyUI Node

FLUX 1.0 [fill]

The masked inpainter that actually respects your mask

By black-forest-labs·Created 2 years ago·Updated 2 years ago· 92
FLUX 1.0 [fill]
  • image
  • mask
  • IMAGE
prompt
seed0
guidance60.0
steps50
prompt_upsamplingfalse
safety_tolerance2
api_key_override
regionEU1

FLUX 1.0 [fill] is the API version of FLUX.1 Fill - the official inpainting and outpainting model from BFL's November 2024 "Flux Tools" release, and still the last purpose-trained inpainting checkpoint anybody shipped. If you've ever watched a local inpainting workflow degrade the whole image through repeated VAE encode/decode passes, this node is the cleaner path: the masking, compositing, and blending all happen on BFL's servers, so you don't have to babysit the seams.

The one thing to know up front: it really uses the mask. Give this node an image and a mask and it edits only the masked region, leaving the rest of the frame pixel-for-pixel alone. That's the superpower masked inpainting still owns over the modern sentence-driven edit models, which tend to quietly change everything. It's object removal, fixing a hand, extending a background outward - done properly.

How it works

You feed in a normal ComfyUI IMAGE and, optionally, a MASK. The node base64-encodes both and sends them to the v1/flux-pro-1.0-fill endpoint, where the server runs the inpainting and returns a finished image. If you don't provide a mask, there's no protected region - it regenerates the whole frame guided by your prompt, which is more "re-imagine" than "fix." For real outpainting, keep the mask on the original image area so the server knows what to preserve.

Inputs that matter

  • image (required) - what you're editing.
  • prompt (required) - describe what should appear in the masked area. Natural language works better than tag soup, as with all FLUX models.
  • mask (optional) - wire this from any MASK-producing node (a segmentation or background-removal node, or a manual mask). The server does the rest.
  • guidance (default 60, range 1.5–100) - this endpoint likes big guidance values; the default is high for a reason. Drop it if the fill feels over-saturated.
  • steps (15–50, default 50) - more steps, more cost. The default is the safe end.
  • safety_tolerance (0–6, default 2) - moderation dial; you lose a lot of prompt space as it tightens.

The single IMAGE output goes wherever you'd send any image - Save Image, or onward into a second pass.

Install

It's part of the official Black Forest Labs API Nodes pack, so install it once and every node in the pack comes along. ComfyUI Manager, search the pack title, or:

cd ComfyUI/custom_nodes
git clone https://github.com/black-forest-labs/bfl-comfy-nodes

restart, then set your key via export BFL_API_KEY=..., a bfl_api_key.txt next to the pack, or the node's api_key_override field. Get the key at api.bfl.ml. No models to download, no heavy dependencies - this pack adds nothing beyond what ComfyUI already ships.

The honest caveats

It's a paid API call per image, so test your prompt on a cheap small edit before you commit to a fifty-image outpaint. BFL's moderation sits in front of the model, and safety_tolerance only buys you so much. And if you're doing masked inpainting because you want bit-identical unmasked pixels and total control, you should know the local FLUX.1 Fill dev workflow gives you that for free - the API node is the convenience version, not the only version.

CategoryFlux

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
promptSTRING
maskoptMASK
seedoptINT00–4294967294
guidanceoptFLOAT60.01.5–100
stepsoptINT5015–50
prompt_upsamplingoptBOOLEANfalse
safety_toleranceoptINT20–6
api_key_overrideoptSTRING
regionoptCOMBOEU12 options: EU1, US1

Outputs (1)

NameTypeDescription
IMAGEIMAGE