BFL Bridge Fill (Inpaint/Outpaint)
Real masked inpainting in ComfyUI — FLUX.1 Fill Pro without a local checkpoint
- image
- mask
- image
Masked inpainting still owns one thing every instruction-editor can't give you: pixels outside the mask that stay bit-identical. Edit models like Kontext and Klein regenerate the whole frame and drift on what you didn't ask to change; a mask-based fill only touches the masked region. The problem is that the only checkpoint purpose-trained for the job - FLUX.1 Fill - has its best tier locked behind BFL's API. BFL Bridge Fill (Inpaint/Outpaint) is that API as a ComfyUI node: give it an image and a mask, get back a filled image, no GPU and no 12B local model to babysit.
How it works
Standard bridge behavior: the node base64-encodes your image and your mask, posts them to the flux-1-fill-pro endpoint at api.bfl.ai with your key, polls until the job is done, and returns a normal IMAGE tensor. Two mechanical details are worth knowing. The mask gets flattened to a single-channel grayscale PNG before upload - whatever alpha or extra channels your mask node produced, only the first channel survives. And note the model is hardwired: there's no model combo on this node, it always calls Fill Pro.
The inputs that matter
- image - required. Wire in whatever you're fixing.
- mask - required. The white regions are what gets regenerated; standard ComfyUI mask plumbing works, so pull a mask from Rembg, from a segmenter, or paint one by hand.
- prompt - required, and it should describe what should be there, including its surroundings. The inpainting crowd has learned the hard way that a bare "remove the cup" invites the model to invent clutter; "empty cafe table, nothing else" keeps the fill honest.
- seed, guidance, steps - the usual, with the pack's usual caveat: defaults only get forwarded when you change them, and seed 0 means "let the API pick."
The output is a single image tensor. That's the whole pipeline - there's no compositing step to add, because the API already merges the fill with your original.
The outpainting caveat
The README and the node name both say "inpaint/outpaint," but be clear-eyed about what this node actually does. It only sends image + mask - it does not expose the width/height parameters the Fill API uses to expand the canvas. So you get masked inpainting, and a big mask running to the image edge will extend the scene in place, but true canvas growth (making the picture physically bigger) isn't reachable from this node's inputs. If that's the job, you'll hit the API directly. Worth knowing the community already found Fill Pro's directional outpainting unreliable anyway - continuity breaks happen - so you're not losing much.
Installing it
ComfyUI Manager, search "comfyui-bfl-bridge", or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/cerridan/ComfyUI_BFLBridge.git
Restart ComfyUI. Requirements: ComfyUI 0.18+ (the V3 node interface), an API key from api.bfl.ai, and credits - every fill costs money, and this is very much a paid-API workflow. Dependencies are aiohttp, Pillow, numpy, all stock. No model downloads, no GPU.
The honest take
This node is a thin wrapper around a paid endpoint, and it shows its age - one commit, no model selector, no outpaint params. But the thing it wraps is genuinely the strongest masked inpainting available, and if you're on a CPU-only server or just don't want to run a 12B checkpoint, that trade is reasonable. For the classic use - remove the watermark, fix the hand, swap the lamp, leave the rest untouched - it's about as close to "just works" as inpainting gets. Just remember: when the task is only editing and you don't need untouched pixels, Kontext or Klein will do it cheaper in words than you can in mask strokes.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| prompt | STRING | — | |
| seed | INT | 00–2147483647 | — |
| guidance | FLOAT | 3.50–20 | — |
| steps | INT | 281–50 | — |
| image | IMAGE | — | |
| mask | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |