Nodes/KIE.ai Nodes Next/Flux-2 - Pro Image to Image
ComfyUI Node

Flux-2 - Pro Image to Image

Merging two references with one sentence

By felipederosilva·Created about a month ago·Updated about 22 hours ago· 3
Flux-2 - Pro Image to Image
  • input_urls
  • image
  • url
  • all_urls_json
  • task_id
  • raw_json
  • credits_consumed
  • credits_left
◄promptThe jar in image 1 is filled with capsules exactly same as image 2 with the exact logo►
◄aspect_ratio1:1►
◄resolution1K►
◄nsfw_checkerfalse►
◄timeout_seconds1200►
◄callback_url►

The interesting thing FLUX.2 does is take several images and reason across them - "fill the jar in image 1 with the capsules from image 2, matching the logo exactly." That's not restyling; it's compositing by description, and it's the node's default prompt for a reason. The Pro tier is the version you use when the merge actually has to hold up at full resolution.

If your job is "change the jacket colour on this photo," you're paying too much here. Local editors and cheaper hosted tiers do single-image edits fine. This node earns its price when there are two or more references and the relationship between them is the hard part.

How it works

input_urls is an IMAGE socket with a plural name, and that's deliberate: a ComfyUI image batch goes up as a list of separate images, each converted to PNG and uploaded to KIE before the request is sent. The model then addresses them by position - image 1, image 2, image 3 - counting in batch order.

So the workflow is: load or generate your references, batch them in the order you plan to talk about them, write a prompt that names them by number, and let the model do the merge. The node submits the job, polls it, downloads the result and hands back a normal IMAGE tensor that composites like anything else.

No mask, no control image, no denoise strength. The instruction is the interface.

The inputs

input_urls - required. Batch order is index order; get it right, because the prompt is meaningless if image 1 and image 2 are swapped.

prompt - required, 3–5000 characters. Be surgical: name the images, name the parts, and say what stays put. "The jar in image 1 is filled with capsules exactly the same as image 2, with the exact logo" is the shape. Vague prompts here produce a confident invention at Pro prices.

aspect_ratio - dropdown, default 1:1, with auto to inherit the first input's ratio. For edits, auto is nearly always right; anything else reframes the output, which you rarely want.

resolution - dropdown, default 1K. The bigger lever on your bill, and on how well logos and fine text survive the merge.

nsfw_checker - boolean, default false. Per the tooltip, false disables KIE's content filtering and returns whatever the model made; there's no guarantee it catches everything when on either.

Plus timeout_seconds (default 1200) and callback_url (leave empty for normal ComfyUI use).

Outputs

image is the result as a native tensor. url is the hosted file, all_urls_json contains every returned URL, task_id is the job ID - handy if you want to look the run up on KIE's side later - raw_json is the untouched response, and credits_consumed / credits_left are floats shown on the node after each run.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next

Restart ComfyUI, or install it from the Manager by searching "KIE.ai Nodes Next". Four dependencies, all small (requests, Pillow, numpy, PyYAML); no checkpoints, no encoders, no quantized fallbacks. Add your key once under Settings → KIE.ai Nodes Next → Connection - validated before saving, stored outside your workflows, masked in the UI. Headless installs can set KIE_API_KEY instead, and it takes priority.

Where it goes wrong

  • Swapped references. The order you batch in is the order the prompt addresses. Nine out of ten "why did it do that" cases are index mismatch.
  • Edit drift on chained runs. Full-image editors shift things you didn't mention and soften the image across repeated edits - the standing complaint against this whole class of model. Always re-edit from the original, not from the previous output.
  • Upload surprises. Images are converted to PNG before upload, so a 12MP reference becomes a fairly large upload. It's automatic, and normally invisible, but on a slow link it's the difference between a snappy run and a wait.
  • The unresolved-endpoint error on a fresh install means the live catalog sync hasn't finished for this operation - restart or run the refresh node.
CategoryKIE Next/Image/Black Forest Labs/Flux 2

Inputs (7)

NameTypeDefaultDescription
input_urlsIMAGE—
promptSTRINGThe jar in image 1 is filled with capsules exactly same as image 2 with the exact logo Must be between 3 and 5000 characters. (Max length: 5000 characters)
aspect_ratioCOMBO1:1Aspect ratio for the generated image. Select 'auto' to match the first input image ratio (requires input image).
resolutionCOMBO1KOutput image resolution.
nsfw_checkeroptBOOLEANfalseDefaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself. Note: There is no guarantee that everything can be filtered out; if you are not satisfied with the results, you will need to make your own arrangements.
timeout_secondsoptINT120030–7200—
callback_urloptSTRINGOptional KIE callback URL. Leave empty for normal ComfyUI use.

Outputs (7)

NameTypeDescription
imageIMAGE—
urlSTRING—
all_urls_jsonSTRING—
task_idSTRING—
raw_jsonSTRING—
credits_consumedFLOAT—
credits_leftFLOAT—