FL Fal Kontext API
Flux Kontext's editing without hosting the weights
- image_1
- images
- image_urls
- status_msg
Flux Kontext - the instruction-based image editor everyone in the Flux ecosystem knows for character-consistent edits and shockingly good watermark removal - called through Fal.ai's Pro-tier API instead of running the open-weight Dev model locally. That distinction matters more than it looks: the Dev weights ship under a Non-Commercial license with an anti-circumvention clause that made NSFW LoRAs for it a license violation and got them purged from CivitAI and HuggingFace. The Pro API sidesteps all of that, because you're not hosting weights at all - you're paying per call.
The mechanism
Same in-context editing approach Kontext is known for: it concatenates your reference image into the model's context alongside a text instruction rather than injecting it through an adapter, which is why Kontext holds a subject's identity across edits better than most alternatives. This node batches, too - inputcount (1-100) controls how many prompt/image pairs get dynamically exposed (prompt_1 is the first of them), and each pair fires as its own async API call, with all the resulting images coming back batched.
Inputs and outputs that matter
api_key is your Fal.ai key. prompt_1 is the edit instruction - "Put a donut next to the flour" is literally the node's own default, a nod to BFL's original Kontext demo prompt. image_1 (optional) is the reference to edit; leave it empty and Kontext just generates from the prompt with no reference. guidance_scale (1-20, default 3.5) sets how strictly it follows the prompt versus improvising. aspect_ratio gives nine presets, num_images (1-4) sets outputs per call, output_format is jpeg or png, and safety_tolerance is a string enum from "1" through "6" - higher numbers loosen Fal/BFL's own content filter on the API, which is separate from anything about the underlying model itself. seed and max_retries round it out; retry_indefinitely and sync_mode are optional overrides for the same reasons as this pack's other Fal nodes.
Outputs: images, image_urls, status_msg.
Installing it
ComfyUI Manager: search Fill-Nodes, install, restart. Manually: cd ComfyUI/custom_nodes && git clone https://github.com/filliptm/ComfyUI_Fill-Nodes, then restart.
Where people get burned
Kontext's known weakness - anatomy degrading when a full body is small in frame, heads and hair artifacting - is a property of the Kontext model family itself, not something this node introduces. Don't expect the API tier to fix full-body shots the local model struggles with; keep edits tighter on the subject if you're seeing it.
And because this is the Pro API rather than local weights, none of the Dev-license NSFW restrictions technically apply to what you send it - but Fal's safety_tolerance filtering and BFL's own API-side moderation still gate what comes back, so expect refusals on some prompts regardless of how you set that slider.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| inputcount | INT | 11–100 | — |
| api_key | STRING | — | |
| seed | INT | 00–2147483647 | — |
| max_retries | INT | 31–5 | — |
| prompt_1 | STRING | Put a donut next to the flour. | — |
| guidance_scale | FLOAT | 3.51–20 | — |
| num_images | INT | 11–4 | — |
| aspect_ratio | COMBO | 1:1 | 9 options: 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, +3 |
| output_format | COMBO | jpeg | 2 options: jpeg, png |
| safety_tolerance | COMBO | 2 | 6 options: 1, 2, 3, 4, 5, 6 |
| image_1opt | IMAGE | — | |
| retry_indefinitelyopt | BOOLEAN | false | — |
| sync_modeopt | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| image_urls | STRING | — |
| status_msg | STRING | — |