Nodes/Comfyui-geminiapi/Flux Kontext Pro
ComfyUI Node

Flux Kontext Pro

The fast API editor for the in-context workflow

By zhanglongxiao111·Created 11 months ago·Updated 9 months ago· 3
Flux Kontext Pro
  • image
  • image
promptMake this a 90s cartoon
api_key
aspect_ratiomatch_input_image
output_formatjpg
safety_tolerance2

This is the other half of the Flux Kontext pair in this pack, and it's worth reading the Max node's writeup because they're the same node with one letter different. FluxKontextProNode calls black-forest-labs/flux-kontext-pro on Replicate; FluxKontextMaxNode calls the Max slug. Same code, same inputs, same outputs, same black-image-on-failure behavior. The only real question is which tier you want, and that's a BFL pricing and capability question, not a node question.

Kontext Pro is the API workhorse of the Flux 1 editing line - the tier BFL shipped in May 2025 alongside Max, and the one surfaced in the BFL Playground for fast iterative editing. If you're building a ComfyUI workflow that chains edits - "change the shirt, now change the lighting, now extend the background" - Pro is the cheaper, snappier default, and Max is the upgrade you reach for when prompt adherence or typography is the bottleneck. Both are instruction-based editors that consume your reference image in-context rather than via adapter embeddings, which is the trick that makes the character stay the same person across the whole chain.

The practical setup

Like its sibling, this node is not Gemini despite the pack name - the api_key field takes your Replicate API token. Feed it an IMAGE plus a prompt (default "Make this a 90s cartoon"), pick an aspect_ratio (default match_input_image, usually right), an output_format (jpg/png), and a safety_tolerance (0–6, default 2 - the content filter), and you get one edited image tensor back. That's the entire input surface; there are no optional ports to trip over.

Installing and watching for the trap

cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/zhanglongxiao111/Comfyui-geminiapi.git
cd Comfyui-geminiapi
python -m pip install -r requirements.txt

Restart, find it under ExternalAPI/Image/Edit. ComfyUI Manager users can just search "Comfyui-geminiapi".

The trap is the same one: any exception - bad token, rate limit, filter rejection - is swallowed and returned as a black 512×512 tensor. A black image out of this node is a failure state, not an artistic choice, so keep the console open. And a note from the Kontext history: the Pro/Max API tiers sit on the same heavily censored, anti-circumvention-licensed family as the rest of Flux Kontext. If you need unrestricted instruction editing, Qwen-Image-Edit is the local, Apache-2.0 alternative - and if you just want the fastest path to character-consistent edits without downloading a 12B model, this node is it.

CategoryExternalAPI/Image/Edit

Inputs (6)

NameTypeDefaultDescription
imageIMAGE
promptSTRINGMake this a 90s cartoon
api_keySTRING
aspect_ratioCOMBOmatch_input_image14 options: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, +8
output_formatCOMBOjpg2 options: jpg, png
safety_toleranceINT20–6

Outputs (1)

NameTypeDescription
imageIMAGE