Zhenzhen_Flux_Kontext
BFL's editing model on a metered API
- input_image
- image
- image_url
Flux Kontext is Black Forest Labs' instruction-based editing model - a 12B transformer that takes a prompt plus a "context image" and actually follows what you ask: change the outfit, swap the background, keep the same character across a scene. The catch is the "12B" part. That's a lot of VRAM for a model you'd only reach for on editing jobs, and Kontext's license is the restrictive one. Comfly_Flux_Kontext sidesteps both by calling BFL's API through the Zhenzhen relay - pro-tier quality on a per-image credit, no weights on your disk, no license anxiety.
The pack's changelog says it all in the margins: flux-kontext-pro runs about 0.096 yuan per image and flux-kontext-max about 0.192 - meaningfully under BFL's own rate. It's the same "cheap access to a closed model" bargain as the rest of the pack, and for Kontext specifically it's a good one because the alternative is a chunky local model you'll use occasionally.
What you actually set
- prompt - the instruction. "Put her in a red dress," "make this a night scene." This is where Kontext earns its reputation; it follows multi-step instructions better than most image models.
- input_image - the context image. Leave it disconnected and the node does text-to-image instead. Connect it and it becomes image editing with character consistency.
- model -
flux-kontext-dev,flux-kontext-pro, orflux-kontext-max.prois the sensible default;devis the cheaper tier,maxthe flagship. - guidance - default 3.5, range 1–20. Lower follows your prompt more loosely; crank it up for strict instruction-following. For editing, 3.5 is a fine starting point.
- num_of_images - 1 to 4 per call. Each one bills.
- aspect_ratio - ten presets from 21:9 to 9:21,
Defaultletting the model pick. - seed and clear_image - the latter controls whether a previously-uploaded context image sticks around for the next run; leave it
trueto keep each call self-contained.
Outputs are tidy: image (an IMAGE tensor, straight into a preview or save node) and image_url (the hosted file, handy if you need to pass it to something outside ComfyUI).
Install and key
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-zhenzhen
Restart, or grab it from ComfyUI Manager (search "Comfyui-zhenzhen"). No models to download - the pack is HTTP over an API key from ai.t8star.org (or the domestic api.seedance.nz). Paste the key into the apikey field on the node.
Notes from the trenches
Kontext is a censor-heavy model - BFL's license explicitly bars circumventing content restrictions and the weights ship with that filtering baked in, so don't expect this to be the node for anything the model's policy refuses. Upstream 500s on the relay are usually transient; re-run. And because your context image is uploaded to the relay's file endpoint, remember the standard API-wrapper math: your reference images leave the machine, and a 4-image batch costs four times as much. For one-off character-consistent edits, this is the cleanest way to get Kontext quality without the 12B living on your card.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| input_imageopt | IMAGE | — | |
| modelopt | COMBO | flux-kontext-pro | 3 options: flux-kontext-dev, flux-kontext-pro, flux-kontext-max |
| apikeyopt | STRING | — | |
| aspect_ratioopt | COMBO | Default | 10 options: Default, 21:9, 16:9, 4:3, 3:2, 1:1, +4 |
| guidanceopt | FLOAT | 3.51–20 | — |
| num_of_imagesopt | INT | 11–4 | — |
| seedopt | INT | -1-1–2147483647 | — |
| clear_imageopt | BOOLEAN | true | — |
| skip_erroropt | BOOLEAN | false | 开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| image_url | STRING | — |