Nodes/ComfyUI BFL API Pro Nodes/BFL Image Expander (Pro 1.0)
ComfyUI Node

BFL Image Expander (Pro 1.0)

Outpainting your canvas without touching your GPU

By charlyad142·Created about a year ago·Updated 9 months ago· 0
BFL Image Expander (Pro 1.0)
  • image
  • IMAGE
  • STRING
top0
bottom0
left0
right0
prompt
steps50
guidance60.00
output_formatjpeg
safety_tolerance2
x_key
seed-1
prompt_upsamplingfalse

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 to left and right.
  • 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) and guidance (1.5–100, default 60) - quality dials. Keep them at default unless you're iterating and want speed or a looser fit.
  • prompt_upsampling (default false) - 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.

CategoryBFL/Expansion

Inputs (13)

NameTypeDefaultDescription
imageIMAGE
topINT00–2048
bottomINT00–2048
leftINT00–2048
rightINT00–2048
promptSTRING
stepsINT5015–50
guidanceFLOAT60.001.5–100
output_formatCOMBOjpeg2 options: jpeg, png
safety_toleranceINT20–6
x_keySTRING
seedoptINT-1
prompt_upsamplingoptBOOLEANfalse

Outputs (2)

NameTypeDescription
IMAGEIMAGE
STRINGSTRING