Dual Nano Banana + GPT Image
A head-to-head between the two closed image giants
- mask
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- nano_images
- gpt_images
- comparison
- metadata
You've decided the closed-model route is worth it - neither GPT Image nor Nano Banana has open weights, so if you want them you call them. But which one? That's the question this node exists to answer. It takes your prompt and fires it at Google's Nano Banana 2 (Gemini 3.1 Flash Image) and OpenAI's GPT Image 2 at the same time, then hands you both results plus a side-by-side preview so you can actually see which one does your shot better. It's an A/B test you run from the canvas instead of tab-hopping between two web UIs, and for product work or style exploration that direct comparison is genuinely useful - one run, two answers, and the metadata tells you which model won on speed.
How it works
This is the experimental second node in the Comfyui_gpt_2.0 pack, and it's built from the pack's own parts: the GPT side literally reuses the GPTImage2AIO node you've already read about, while the Nano side imports its counterpart from a different pack - ComfyUI_Nano_Banana - at runtime. Both calls are dispatched into a thread pool and run in parallel, then the node pastes the first result of each side together into a comparison image, Nano on the left, GPT on the right.
The best part is the failure handling. Each side runs independently, so if one model refuses your prompt or your key is wrong, the other still returns normally. A failed side hands you a 64×64 black placeholder, and the metadata output records exactly which side failed, why, and how long each call took. That's the difference between "my whole graph died" and "Nano choked, here's GPT's take plus the error."
Inputs, split in two
There's a shared set - prompt, image_count (1–4), aspect_ratio, image_size, and the same image_1–image_8 reference sockets and mask as the single-node version - and then a nano_* and gpt_* set for each side's own knobs. The Nano side takes nano_temperature (0–2, more creative toward 2), nano_use_search and nano_use_image_search toggles for grounding the generation, and nano_model_name - which has exactly one choice, gemini-3.1-flash-image, so don't go hunting for a bigger dropdown. The GPT side mirrors the other node: gpt_model_name, gpt_quality, gpt_background, gpt_output_format, gpt_moderation. Your OpenAI key goes in openai_api_key (or the pack's .env); the Nano side needs whatever credential ComfyUI_Nano_Banana expects for Gemini.
Outputs
Four: nano_images, gpt_images, comparison (the side-by-side, capped at 1024px tall), and metadata - a JSON dump with each side's ok/error/elapsed_seconds and the GPT side's revised prompt. Wire the comparison straight to a Save Image node and you've got a permanent record of the shootout.
Installing it
Same pack, one extra dependency:
cd ComfyUI/custom_nodes
git clone https://github.com/Poo-DH/Comfyui_gpt_2.0
git clone https://github.com/ru4ls/ComfyUI_Nano_Banana
cd Comfyui_gpt_2.0
pip install -r requirements.txt
The README is explicit that ComfyUI_Nano_Banana must sit in custom_nodes next to this pack - the node imports it live by path, so it has to be there before you run, not somewhere the ComfyUI Manager happened to put it. Restart ComfyUI, and note that this one needs two API keys in play: OpenAI's for the GPT half, and Google's/Gemini's (from the Nano Banana pack's own setup) for the Nano half.
Where people get burned
If you get a hard error mentioning ComfyUI_Nano_Banana is not installed next to this node, that's the missing dependency, not a bug - install the Nano Banana pack and restart. If one side spits out a small black image, that side failed but the other kept going; check metadata for which one and why, because the node swallows exceptions rather than surfacing them as graph errors. And before you set up a whole batch: every run is two billable API calls, so a 100-image comparison is 200 paid generations. Use it to pick a winner, not as your daily driver.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A polished product photo of futuristic eyewear. | — |
| image_count | INT | 11–4 | — |
| aspect_ratio | COMBO | 1:1 | 11 options: Auto, 1:1, 2:3, 3:2, 3:4, 4:3, +5 |
| image_size | COMBO | 2K | 3 options: 1K, 2K, 4K |
| nano_model_name | COMBO | gemini-3.1-flash-image | 1 options: gemini-3.1-flash-image |
| nano_temperature | FLOAT | 1.00–2 | — |
| nano_use_search | BOOLEAN | false | — |
| nano_use_image_search | BOOLEAN | false | — |
| gpt_model_name | COMBO | gpt-image-2 | 2 options: gpt-image-2, gpt-image-2-2026-04-21 |
| gpt_quality | COMBO | auto | 4 options: auto, low, medium, high |
| gpt_background | COMBO | auto | 3 options: auto, opaque, transparent |
| gpt_output_format | COMBO | png | 3 options: png, jpeg, webp |
| gpt_moderation | COMBO | auto | 2 options: auto, low |
| openai_api_keyopt | STRING | — | |
| maskopt | MASK | — | |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — | |
| image_6opt | IMAGE | — | |
| image_7opt | IMAGE | — | |
| image_8opt | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| nano_images | IMAGE | — |
| gpt_images | IMAGE | — |
| comparison | IMAGE | — |
| metadata | STRING | — |