Nodes/ComfyUI BFL API Pro Nodes/BFL Flux Kontext (Pro/Max)
ComfyUI Node

BFL Flux Kontext (Pro/Max)

Kontext Pro/Max over the API, for edits that keep a face consistent

By charlyad142·Created about a year ago·Updated 9 months ago· 0
BFL Flux Kontext (Pro/Max)
  • input_image
  • input_image_2
  • input_image_3
  • input_image_4
  • IMAGE
  • STRING
prompt
modelflux-kontext-pro
output_formatpng
safety_tolerance2
x_key
seed-1
aspect_ratio
prompt_upsamplingfalse

Kontext is BFL's instruction-based editing model - the one that keeps a character consistent while you change what they're wearing, where they're standing, or what's in their hand. This node is the API version of it, and it's worth separating from the local Kontext story, because the local open-weights Kontext dev model got a rough ride in the community.

The local version's reputation: people found it genuinely good at some edits but heavily censored, prone to anatomical glitches at certain scales, and by mid-2026 largely superseded for editing by Klein and Qwen-Image-Edit - "Kontext was for me just a tech demo" was a common enough take. But that's the local, non-commercial dev tier. This node hits flux-kontext-pro and flux-kontext-max, BFL's paid API models. Same family, different tier, and the whole point is that you're paying BFL to run them so your GPU never sees them.

What it is

A node from charlyad142/ComfyUI_bfl_api_pro_nodes with a model dropdown offering flux-kontext-pro (default) and flux-kontext-max. It takes a prompt plus up to four reference images and produces an edited image that holds character and object identity across generations - the API version of Kontext's core trick.

How it works

The node base64-encodes the input images you wire in, POSTs them with your prompt to https://api.bfl.ai/v1/flux-kontext-pro (or -max) using your API key in the x-key header, then polls for the result and downloads the finished image from Azure Blob Storage. Two outputs, like every node in this pack: an IMAGE tensor and a STRING status line - on success, or a ✗ Error: ... message on failure (with a red placeholder image standing in for a crash).

The inputs that matter

  • prompt - required, multiline. This is an instruction-based model: "change the shirt to a red leather jacket, keep the face identical" type phrasing works far better than tag soup. Kontext-style editing rewards telling the model what to preserve as much as what to change.
  • input_image through input_image_4 - up to four reference images. The character/object you want held consistent goes here. The more context images you feed, the more material the model has to lock onto.
  • aspect_ratio - a free-text field (default empty). Type something like 16:9 or 1:1 if you need a specific shape; leave blank for the API default.
  • prompt_upsampling (default false) - unlike the Flux 2 Flex node, this defaults off. Flip it on if you want BFL to enrich your prompt first.
  • seed (default -1) - set a number to make a run reproducible.

Note the differences from the Flux 2 nodes: Kontext caps at four input images, safety_tolerance runs 0–6, and the default output format is png (the others default 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, no requirements.txt - it runs on requests and Pillow, already in ComfyUI.

API key time. Recommended: config.ini in the node's root folder:

[API]
X_KEY = your_api_key_here

That takes priority over the per-node x_key field. Keys come from auth.bfl.ai.

Troubleshooting

Same pack-wide failure modes: 401 = bad key or no credits, 422 = validation error, 429 = rate limit, and moderation messages mean BFL's safety filters flagged the request - worth knowing before you push an edit too far, since Kontext's API models carry the same censorship DNA the community complained about on the local tier. If your character drifts between generations rather than failing outright, that's the model, not the node: keep the reference images steady and be explicit about preservation in the prompt.

CategoryBFL/Kontext

Inputs (12)

NameTypeDefaultDescription
promptSTRING
modelCOMBOflux-kontext-pro2 options: flux-kontext-pro, flux-kontext-max
output_formatCOMBOpng2 options: jpeg, png
safety_toleranceINT20–6
x_keySTRING
input_imageoptIMAGE
input_image_2optIMAGE
input_image_3optIMAGE
input_image_4optIMAGE
seedoptINT-1
aspect_ratiooptSTRING
prompt_upsamplingoptBOOLEANfalse

Outputs (2)

NameTypeDescription
IMAGEIMAGE
STRINGSTRING