Nodes/ComfyUI-Kie-API/KIE GPT Image 2 (Image-to-Image)
ComfyUI Node

KIE GPT Image 2 (Image-to-Image)

KIE GPT Image 2 (Image-to-Image)

By gateway·Created 9 months ago·Updated 4 months ago· 39
KIE GPT Image 2 (Image-to-Image)
  • images
  • image
prompt
aspect_ratioauto
resolution1K
logtrue

Where the text-to-image GPT Image 2 node is a prompt box, this one is the edit-and-reimagine machine. Give it an image (or a whole batch of them) plus an instruction, and GPT Image 2 reworks your source into something new while keeping the parts you didn't touch. Same closed model, same Kie.ai backend, but the input side is what makes it worth reaching for.

The standout number is 16: the images input accepts a batch of up to 16 reference images and the pack uploads all of them. That's enough for full character sheets, product multi-angle shots, or style references stacked alongside the thing you actually want changed. Most image-edit nodes on an API take one source image; this one takes a small dataset.

How it works

Standard KIE job flow. All connected images upload, a createTask payload goes out with the GPT Image 2 image-to-image model id, and the node polls recordInfo every 10 seconds until the job resolves (300-second timeout by default, auto-retry on transient errors). The result downloads back as a ComfyUI IMAGE.

The inputs that matter

  • images - required. Feed the edit target, and add references up to the 16-image batch cap. Batch order is preserved on upload, so if you're referencing "image 3" in the prompt, know which slot it's in.
  • prompt - the edit instruction. With multiple references, say what each contributes: "keep the pose and lighting from the first image, change the outfit to match image 2."
  • aspect_ratio / resolution - same rules as the T2I sibling, and they still bite: auto aspect ratio requires 1K resolution, and 4K at 1:1 isn't supported by KIE. Explicit ratio + 1K is the safe combo while drafting.

Output: image, ready for a saver, an upscaler, or an I2V node if you want the edit to move.

Installing

The whole KIE pack installs once. ComfyUI Manager: search "ComfyUI Kie API". Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/gateway/ComfyUI-Kie-API
# restart ComfyUI

No model files, no heavy dependencies - just the API key at ComfyUI/custom_nodes/ComfyUI-Kie-API/config/kie_key.txt (copy from kie_key.example.txt). Same key serves every node in the pack.

Where people get burned

The usual suspects: missing or empty key file, and jobs that submit but stall - the console shows each state change, and kie.ai/logs has the server-side record if you need the real failure reason. The subtler trap is input composition: batch order matters when you prompt against multiple references, and there's no in-node preview of which slot is which. Label your batches by building them deliberately. And remember the cost angle - every image you upload and every high-resolution result is metered, so check Get Remaining Credits before a marathon edit session.

Categorykie/api

Inputs (5)

NameTypeDefaultDescription
promptSTRING
imagesIMAGE
aspect_ratiooptCOMBOauto6 options: auto, 1:1, 9:16, 16:9, 4:3, 3:4
resolutionoptCOMBO1K3 options: 1K, 2K, 4K
logoptBOOLEANtrue

Outputs (1)

NameTypeDescription
imageIMAGE