Zhenzhen_Flux_Kontext_Edit
Swap the Scene, Keep the Subject
- image
- image
- image_url
Kontext, the edit-flavored way: this is the sibling of the _bfl node but aimed at re-contextualizing an image you already have rather than generating from scratch. Same family of closed BFL models, same proxy plumbing, but the workflow is "here's my image, here's the new situation I want it in." It also gives you the cheapest member of the family: flux-kontext-dev.
This is the one I'd actually reach for when I want to test the whole Kontext thing on a single job without committing to the bigger paid variants. It's a per-call API node, so your GPU is off the hook entirely - you're paying the proxy for the inference, not your power bill.
How it works
You send a prompt plus an optional source image, base64-encoded through the Comfly proxy to BFL's Kontext API, and the node polls until the edited image lands. Unlike some of the pack's other nodes, the README explicitly notes that passing the image in here does not trigger an extra upload fee - the image is sent directly with the request. Small mercy, but on a per-call pricing model it adds up if you're iterating.
The inputs that matter
- prompt - what you want done. For Kontext-style editing, describe the new scene or the change: "same camera, put the product on a marble table in a sunlit studio" beats "edit this."
- image - the source to re-contextualize. Optional in the sense that you can prompt for a fresh Kontext generation without it, but the edit workflow pretty much demands it.
- model -
flux-kontext-dev(default),flux-kontext-pro, orflux-kontext-max. Dev is the budget pick; pro is the quality default; max is the expensive headroom. Note this node's default differs from the_bflnode - here you start on dev. - num_of_images - 1 to 4, default 1. More images = more API spend per call; the README warns the bill scales with how much you generate.
- aspect_ratio - nine ratios, default
1:1. Only really matters for text-to-image runs; if you're editing an input image the output follows the source. - seed - default
-1(random); set it to keep a take reproducible.
Outputs are image (IMAGE tensor) and image_url (STRING - the hosted file). Keep the URL around; that's your durable copy if you don't save the tensor.
Install
Same drill as every node in the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/ainewsto/Comfyui_Comfly
Restart ComfyUI. Or search Comfyui_Comfly in ComfyUI Manager. No model downloads - the requirements.txt is the standard aiohttp/requests/Pillow/numpy plus torch/transformers you already run. Key from ai.comfly.chat goes in Comflyapi.json or the node's apikey field.
Where people get burned
People treat Kontext like a freeform editor and then fight the result. It's not Photoshop - it's "subject in a new context," so the prompt should define the scene, not request surgical pixel changes. And if you bump num_of_images to 4 "just to see options," you've just multiplied the per-call cost fourfold, so set it to what you'll actually use. Failures arrive as an error string in response rather than a crash; read it before burning another credit.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| imageopt | IMAGE | — | |
| modelopt | COMBO | flux-kontext-pro | 3 options: flux-kontext-dev, flux-kontext-pro, flux-kontext-max |
| apikeyopt | STRING | — | |
| aspect_ratioopt | COMBO | 1:1 | 9 options: 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, +3 |
| num_of_imagesopt | INT | 11–4 | — |
| seedopt | INT | -1-1–2147483647 | — |
| skip_erroropt | BOOLEAN | false | 开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| image_url | STRING | — |