Nodes/ComfyUI BFL API Pro Nodes/BFL Inpainting (Pro 1.0 Fill)
ComfyUI Node

BFL Inpainting (Pro 1.0 Fill)

True mask-based inpainting with a fill model on BFL's servers

By charlyad142·Created about a year ago·Updated 9 months ago· 0
BFL Inpainting (Pro 1.0 Fill)
  • image
  • mask
  • IMAGE
  • STRING
prompt
steps50
guidance60.00
output_formatjpeg
safety_tolerance2
x_key
seed-1

This node is old-school in the best way: you give it an image and a mask, and it only regenerates what's inside the mask. In 2026 that's almost a statement of intent. The editing world moved hard toward "type a sentence, get a new image" - instruction-editing models like Kontext and Klein that take the whole frame in and emit a whole new one. And that's fine until you realize the unmasked parts came back subtly changed.

That's the one thing mask-based inpainting still owns: the pixels outside the mask don't move. Local lore is full of warnings about this - every VAE encode/decode degrades the image, so the community's rule was always "composite the inpainted region back onto the originals." This node hands that whole problem to BFL's flux-pro-1.0-fill model, which is a dedicated fill model trained to understand the mask as a condition, not just a "generate here" zone.

What it is

A node from charlyad142/ComfyUI_bfl_api_pro_nodes that calls the flux-pro-1.0-fill endpoint. Wire in an image and a mask, describe what should replace the masked area, and get back the edited image. No local model, no VRAM hit - you're paying BFL per call.

How it works

The node base64-encodes both your image and your mask, POSTs them with the prompt to https://api.bfl.ai/v1/flux-pro-1.0-fill using your API key in the x-key header, then polls get_result and downloads the finished image from Azure Blob Storage. Outputs are the pack's standard pair: an IMAGE tensor and a STRING status line ( or ✗ Error: ...), with a red placeholder image standing in on failure.

The inputs that matter

  • image - the picture to edit.
  • mask - a ComfyUI MASK, which is the important one. Anything that produces a mask works: draw one, threshold one, run a segmenter. The server treats white as "regenerate here." Mask quality is the single biggest lever on result quality - a sloppy mask gives you a sloppy edit.
  • prompt - describe what belongs in the masked region ("a red coffee mug on the desk"). Keep the description scoped to the hole; the model's job is filling the masked area, not reinterpreting the scene.
  • steps (15–50, default 50) and guidance (1–100, default 60) - quality dials. Defaults are sensible; drop steps if you're iterating fast.
  • seed (default -1) - fix it to reproduce a fill.

safety_tolerance runs 0–6 here, output_format defaults to jpeg.

Installing it

Search "ComfyUI BFL API Pro Nodes" in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/charlyad142/ComfyUI_bfl_api_pro_nodes

Restart. No models to download and no requirements.txt - requests and Pillow, already in ComfyUI.

You need a BFL API key. Recommended: config.ini in the node's root folder:

[API]
X_KEY = your_api_key_here

That wins over the per-node x_key field. Keys from auth.bfl.ai.

Troubleshooting

The pack's standard failure set applies: 401 bad key/no credits, 422 validation, 429 rate limiting, moderation messages from BFL's filters. The failure mode people actually hit with inpainting is mask-related: a mask that's too tight leaves the generated content fighting the edges, and one that's too loose lets the model touch things you wanted untouched. If the fill comes back with visible seams, feather the mask a bit and keep the prompt scoped to the masked area. And remember this is per-call billing - iterate on the mask first, not on 50-step reruns.

CategoryBFL/Inpainting

Inputs (9)

NameTypeDefaultDescription
imageIMAGE
maskMASK
promptSTRING
stepsINT5015–50
guidanceFLOAT60.001–100
output_formatCOMBOjpeg2 options: jpeg, png
safety_toleranceINT20–6
x_keySTRING
seedoptINT-1

Outputs (2)

NameTypeDescription
IMAGEIMAGE
STRINGSTRING