BFL Flux Kontext (Pro/Max)
Kontext Pro/Max over the API, for edits that keep a face consistent
- input_image
- input_image_2
- input_image_3
- input_image_4
- IMAGE
- STRING
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_imagethroughinput_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 like16:9or1:1if you need a specific shape; leave blank for the API default.prompt_upsampling(defaultfalse) - 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.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| model | COMBO | flux-kontext-pro | 2 options: flux-kontext-pro, flux-kontext-max |
| output_format | COMBO | png | 2 options: jpeg, png |
| safety_tolerance | INT | 20–6 | — |
| x_key | STRING | — | |
| input_imageopt | IMAGE | — | |
| input_image_2opt | IMAGE | — | |
| input_image_3opt | IMAGE | — | |
| input_image_4opt | IMAGE | — | |
| seedopt | INT | -1 | — |
| aspect_ratioopt | STRING | — | |
| prompt_upsamplingopt | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| STRING | STRING | — |