Nodes/ComfyUI-FLUX-BFL-API/Flux Pro Expand (BFL)
ComfyUI Node

Flux Pro Expand (BFL)

Directional outpainting the old way

By gelasdev·Created 2 years ago·Updated 26 days ago· 49
Flux Pro Expand (BFL)
  • config
  • IMAGE
image
prompt
top0
bottom0
left0
right0
steps50
prompt_upsamplingfalse
guidance60.00
safety_tolerance2
output_formatjpeg
seed-1
webhook_url
webhook_secret

Flux Pro Expand (BFL) is the older, simpler way to outpaint: instead of defining a whole new canvas and positioning your image on it like Flux Outpaint does, you just say "add X pixels on top, Y on the bottom, Z on the left, W on the right" and the model extends each edge in place. It hits BFL's flux-pro-1.0-expand endpoint, the same model that predates the newer flux-tools/outpainting-v1 - think of this as the direct, no-thought outpainting node in the ComfyUI-FLUX-BFL-API pack.

For a lot of outpainting jobs this is the one you actually want. It's dead simple: four numbers describe exactly how the frame grows, the original pixels stay where they are, and the model fills the new margins to match. Flux Outpaint gives you more control (canvas placement, offsets, fast mode) but demands you think about layout; Expand is "make it taller by 512 pixels, please."

How it works

Standard pack mechanics under the hood: build the request, POST to flux-pro-1.0-expand, poll get_result?id=... every 5 seconds until ready, return an IMAGE. The endpoint takes your image (base64), the four padding values, and the usual generation knobs - steps, guidance, prompt_upsampling. The source image is the primary signal for what the extension should look like; the prompt is secondary guidance for the new content.

The inputs that matter

  • image - base64 string of the source (from Image to Base64 (BFL)).
  • top / bottom / left / right - pixels to add on each edge, 0–2048 each. Zero means "don't grow that side." This is the whole point of the node: directional, explicit padding.
  • prompt - describes what should fill the new margins. "A misty mountain range continues to the right" beats "more of the same" when the model is deciding what belongs outside the frame.
  • steps - 15–50, default 50. It defaults to the max; drop it to 30-ish if you want speed and don't need the last bit of polish.
  • guidance - 1.5–100, default 60. Unusual range because it maps to BFL's internal scale, not the 1–10 you're used to locally. Leave it alone unless you know BFL's API.
  • safety_tolerance - 0–6, default 2, moderation strictness.
  • output_format - jpeg (default) or png.
  • Optional seed, webhook_url/secret, config.

Output: one IMAGE tensor.

Installing it

Same pack, same install:

cd ComfyUI/custom_nodes
git clone https://github.com/gelasdev/ComfyUI-FLUX-BFL-API.git

Restart, key in config.ini or a Flux Config (BFL) node. Nothing heavy to install - torch is the only declared dep and ComfyUI already has it.

Where people get burned

  • Black output. The pack's universal failure tell - moderation, API error, or polling exhausted after ~200s. Read the [BFL] logs; each POST prints a full curl equivalent so you can replay the call directly against BFL.
  • Asking for asymmetric growth and getting a lazy result. The model fills each margin independently; if one edge needs rich new content (a building, a person) and another is plain sky, the sky edge will look great and the building edge may need multiple tries. That's the model, not your settings.
  • Expecting the newer tool's features. No mode: fast, no canvas offsets, no auto-crop. This is the legacy path. If you need those, that's Flux Outpaint (BFL).

Verdict: Expand is the muscle-memory outpainting node. When you know exactly how many pixels you want on each side, it's the least fiddly option in the pack - and since it's the older endpoint, it's also the one whose quirks are most documented.

CategoryBFL

Inputs (15)

NameTypeDefaultDescription
imageSTRING
promptSTRING
topINT00–2048
bottomINT00–2048
leftINT00–2048
rightINT00–2048
stepsINT5015–50
prompt_upsamplingBOOLEANfalse
guidanceFLOAT60.001.5–100
safety_toleranceINT20–6
output_formatCOMBOjpeg2 options: jpeg, png
seedoptINT-1
webhook_urloptSTRING
webhook_secretoptSTRING
configoptBFL_CONFIG

Outputs (1)

NameTypeDescription
IMAGEIMAGE