Nano Banana Edit
Generate the Character Once, Then Edit Forever
- image_urls
- image
- url
- all_urls_json
- task_id
- raw_json
- credits_consumed
- credits_left
The problem it solves
Character consistency was the community's most-asked-for thing for years, and it never really got solved - it got rerouted. Instead of encoding a face and injecting it at generation time with IP-Adapter or PuLID, the current answer is: generate the character once, in one good image, and then edit that image for every subsequent shot. Instruction-following image models hold an identity through edits far better than any adapter held it through fresh sampling.
Nano Banana Edit is exactly that node. You hand it a picture and a sentence, and it gives you the picture changed. It's the closed, no-weights Google image stack - you can't download it, only call it - and in this pack it's a single node in KIE Next/Image/Google/Nano Banana.
Where it fits in a real workflow: lock your character or product photo once, then run that same image through different prompts for wardrobe, location, and angle; or drop it downstream of a local render to fix hands, swap a background, or upscale-and-restyle. It's also the pragmatic first stop before you commit to training a LoRA, because it answers "is this character even worth making consistent?" in about a minute.
How it works
The pack generates its node classes at startup from KIE's published API documentation, and this one wraps the market model google/nano-banana-edit. The class name carries a hash that comes from the model id and its docs URL - not from the release version - so it stays stable between pack updates.
On run, your reference image doesn't get a URL pasted in by hand. The pack uploads it to KIE's file host, substitutes the resulting URL into the request, and POSTs the job to KIE's createTask endpoint. It then polls recordInfo until the task reports success, downloads the edited image, and returns it as a tensor. Media plumbing is the part the pack is proudest of hiding, and for once that's fair - you just wire an image in.
Inputs
prompt is required and multiline, 5000 characters max. The default text is the character-figure-with-Blender-box prompt from KIE's own documentation, and it's a good demonstration of how much this model can do in one instruction: turn a photo into a figurine, on a base, with a printed box behind it. Be specific about what to preserve, not just what to change. "Keep her exact face, hairstyle and proportions, change only the jacket" beats "make it a jacket" every time.
image_urls is required, typed as IMAGE, and plural - which is the interesting part. Wire a single image and you get a straightforward edit. Wire a ComfyUI image batch and the pack uploads each frame and sends the whole set as references, which is how you do "dress her in this outfit, styled like this photo" with two inputs. Because it's a batch socket, the order you assemble images in becomes part of your prompt logic.
aspect_ratio gives eleven options including auto. For editing, resist auto - the model can decide the output should be a different shape than your input, and then your downstream crop or mask no longer lines up. Pick the ratio that matches your source.
image_size is present but deprecated; its tooltip says aspect_ratio replaced it. Use aspect_ratio.
timeout_seconds defaults to 1200 seconds with a 30–7200 range. Editing calls are usually quick, but leave headroom if you're feeding large references.
callback_url is for server push. Empty is correct here.
Two things are missing on purpose, and it's worth noticing. There's no output_format and no nsfw_checker on the edit endpoint - the free-generation Nano Banana node has both, this one doesn't. So you get whatever format KIE returns, and there's no moderation toggle to fiddle with even if you wanted one.
Outputs
image goes downstream. url is the KIE-hosted result; all_urls_json carries every URL the task returned, which is the one to read if a job surprises you with more than one image; task_id is your support-ticket receipt; raw_json is the full provider response; credits_consumed and credits_left are your spend. The credit pair also renders on the node as a receipt after each run, which is the quickest way to spot a loop that's costing more than it looks.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
pip install -r requirements.txt
Restart ComfyUI, then paste your key once at Settings → KIE.ai Nodes Next → Connection. It's tested against KIE before saving, and only a masked fingerprint is ever shown afterwards. On a headless server, KIE_API_KEY in the environment takes precedence. Requirements are requests, Pillow, numpy, PyYAML - no CUDA, no checkpoints. Registry/Manager publication is described in the README as "prepared" rather than live, so if the pack doesn't appear in Manager's search, git clone is the path.
Gotchas
Your reference images leave your machine. That's the mechanism, not a bug - you're uploading a photo of a person to a third party that forwards it to Google's model.
Identity consistency is model-dependent, not guaranteed. A reference image plus a prompt is not an identity lock, and the model will still drift on hard changes of angle, age or lighting.
The node's ID can change. Node classes are keyed off the model id plus KIE's docs URL. If KIE reorganises their documentation, a workflow that used this node can come back with a missing-node error even though the model still exists - rebuild the node and rewire.
First launch, empty menu. Most nodes appear after the pack's first catalog sync. If nano-banana-edit isn't listed, restart, or run the Refresh Model Catalog node.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | turn this photo into a character figure. Behind it, place a box with the character’s image printed on it, and a computer showing the Blender modeling process on its screen. In front of the box, add a round plastic base with the character figure standing on it. set the scene indoors if possible | The prompt for image editing (Max length: 5000 characters) |
| image_urls | IMAGE | — | |
| output_formatopt | COMBO | png | Output format for the images |
| aspect_ratioopt | COMBO | 1:1 | Radio description |
| image_sizeopt | COMBO | 1:1 | The aspect ratio of the generated image (this parameter has been replaced by aspect_ratio; please use the latest aspect_ratio parameter). |
| timeout_secondsopt | INT | 120030–7200 | — |
| callback_urlopt | STRING | Optional KIE callback URL. Leave empty for normal ComfyUI use. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| url | STRING | — |
| all_urls_json | STRING | — |
| task_id | STRING | — |
| raw_json | STRING | — |
| credits_consumed | FLOAT | — |
| credits_left | FLOAT | — |