Nodes/Comfyui_gpt_2.0/Dual Nano Banana + GPT Image
ComfyUI Node

Dual Nano Banana + GPT Image

A head-to-head between the two closed image giants

By Poo-DH·Created 4 months ago·Updated 3 months ago· 1
Dual Nano Banana + GPT Image
  • mask
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • image_7
  • image_8
  • nano_images
  • gpt_images
  • comparison
  • metadata
promptA polished product photo of futuristic eyewear.
image_count1
aspect_ratio1:1
image_size2K
nano_model_namegemini-3.1-flash-image
nano_temperature1.0
nano_use_searchfalse
nano_use_image_searchfalse
gpt_model_namegpt-image-2
gpt_qualityauto
gpt_backgroundauto
gpt_output_formatpng
gpt_moderationauto
openai_api_key

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_1image_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.

CategoryPOODH/Compare

Inputs (23)

NameTypeDefaultDescription
promptSTRINGA polished product photo of futuristic eyewear.
image_countINT11–4
aspect_ratioCOMBO1:111 options: Auto, 1:1, 2:3, 3:2, 3:4, 4:3, +5
image_sizeCOMBO2K3 options: 1K, 2K, 4K
nano_model_nameCOMBOgemini-3.1-flash-image1 options: gemini-3.1-flash-image
nano_temperatureFLOAT1.00–2
nano_use_searchBOOLEANfalse
nano_use_image_searchBOOLEANfalse
gpt_model_nameCOMBOgpt-image-22 options: gpt-image-2, gpt-image-2-2026-04-21
gpt_qualityCOMBOauto4 options: auto, low, medium, high
gpt_backgroundCOMBOauto3 options: auto, opaque, transparent
gpt_output_formatCOMBOpng3 options: png, jpeg, webp
gpt_moderationCOMBOauto2 options: auto, low
openai_api_keyoptSTRING
maskoptMASK
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
image_5optIMAGE
image_6optIMAGE
image_7optIMAGE
image_8optIMAGE

Outputs (4)

NameTypeDescription
nano_imagesIMAGE
gpt_imagesIMAGE
comparisonIMAGE
metadataSTRING