BFL Image Expander (Pro 1.0)
Outpainting your canvas without touching your GPU
- image
- IMAGE
- STRING
The BFL Image Expander is an outpainting node: you hand it an image, tell it how many pixels to grow on each side, and it fills the new canvas with content that matches what's already there. Outpainting - extending a photo or render beyond its original borders - is one of those jobs local workflows never quite make painless. This node pushes it all to BFL's servers.
Here's the local context: inpainting and outpainting on your own machine has a well-documented cost. Every VAE encode/decode cycle degrades the image, which is why the community's oldest rule is "composite the result back onto the original pixels, don't pass the whole frame through again." A server-side fill model sidesteps a chunk of that discipline for you - BFL's flux-pro-1.0-expand model does the expansion and returns a finished image. You're not building the composite; you're getting the answer.
What it is
A node from charlyad142/ComfyUI_bfl_api_pro_nodes that calls the flux-pro-1.0-expand API endpoint. It's the pack's version of what Flux Fill does for outpainting: grow the image in any direction and let the model invent what belongs there.
How it works
The node base64-encodes your image, then POSTs it with your four expansion amounts and prompt to https://api.bfl.ai/v1/flux-pro-1.0-expand, using your API key in the x-key header. BFL returns a task ID, the node polls get_result until the work is done, downloads the expanded image from Azure Blob Storage, and outputs it as a standard IMAGE tensor plus a STRING status line (✓ or ✗ Error: ...). On failure you get a red placeholder image and the error text in that string output.
The inputs that matter
The whole point of this node is four integers plus a prompt:
top,bottom,left,right(each 0–2048, default 0) - how many pixels to add on each side. Zero means "don't grow this side." This is the input to get right; if you want to extend a 1024px image into a 4:3 landscape, you're adding most of the width toleftandright.prompt- required, multiline. Describe what should live in the new space ("a beach continuing to the left, gentle waves, same lighting"). The more you match the existing image's light and mood, the harder it is to spot the seam.steps(15–50, default 50) andguidance(1.5–100, default 60) - quality dials. Keep them at default unless you're iterating and want speed or a looser fit.prompt_upsampling(defaultfalse) - flip on to let BFL rewrite your prompt internally.seed(default -1) - fix it to reproduce a particular expansion.
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 ComfyUI. No models, no requirements.txt - just requests and Pillow, which ComfyUI already has.
Then an API key. The pack's recommended spot is config.ini in the node's root folder:
[API]
X_KEY = your_api_key_here
That file wins over the per-node x_key field. Keys from auth.bfl.ai.
Troubleshooting
Standard pack fare: 401 means bad key or empty credits, 422 a validation error, 429 rate limiting. Moderation messages are BFL's safety filters. One trap worth knowing: expansion is where a weak prompt shows up worst - if you add pixels and the model fills them with content that clashes with the original (different light, different scale), that's not a bug, that's the API following a vague prompt. Feed it details about the existing scene and keep your expansion amounts reasonable per call; you can always expand again in steps.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| top | INT | 00–2048 | — |
| bottom | INT | 00–2048 | — |
| left | INT | 00–2048 | — |
| right | INT | 00–2048 | — |
| prompt | STRING | — | |
| steps | INT | 5015–50 | — |
| guidance | FLOAT | 60.001.5–100 | — |
| output_format | COMBO | jpeg | 2 options: jpeg, png |
| safety_tolerance | INT | 20–6 | — |
| x_key | STRING | — | |
| seedopt | INT | -1 | — |
| prompt_upsamplingopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| STRING | STRING | — |