ComfyUI Node

心宝❤Banana

The 心宝❤Banana node explained

By 98624017·Created 9 months ago·Updated 5 months ago· 2
心宝❤Banana
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • binding_context
  • images
  • text
promptPeace and love
banana_api_key
model_typegemini-3-pro-image-preview
batch_size1
aspect_ratioAuto
seed-1
top_p0.95
image_size2K
绕过代理false
禁用SSL验证false
线路心宝❤新渠道

This node is Google's Nano Banana - the Gemini image models - sitting inside ComfyUI as if it were a local sampler. You type a prompt, it phones a paid API, and the returned image drops back into your graph like any other IMAGE tensor. No GPU load, no checkpoint download, and also no free lunch: every run is metered.

It's the flagship of the comfyui-banana-li-linux pack from 李心宝 (Xinbao), a Chinese e-commerce designer who built a whole kit around Gemini generation for product work. The "Banana" in the name is the community's nickname for Gemini-native image generation, which Google itself later adopted as a brand. What makes this pack different from Google's own flow is that it routes through Xinbao's reseller channel, so there's no Google Cloud project to set up - you buy a key, paste it in, and go. The KB's external-api-nodes doc covers exactly why this reseller ecosystem exists: cost, region access, and billing friction that the official Gemini API route is bad at.

What it actually does

Text-to-image is the base case. You get prompt, a multiline box that takes a real description of content, style, and composition. Then the things that matter:

  • banana_api_key - leave it blank and the node falls back to the [gemini] section of the pack's config.ini. That fallback is the intended workflow: set the key once, never bake it into a shared workflow.
  • model_type - five choices, defaulting to gemini-3-pro-image-preview (Nano Banana Pro). gemini-2.5-flash-image is the cheaper original Nano Banana; gemini-3.1-flash-image-preview is the speed tier.
  • aspect_ratio - Auto plus a dozen presets. Note the tooltip: the extreme 1:4 / 4:1 / 8:1 ratios only work on gemini-3.1-flash-image-preview; other models silently fall back to Auto.
  • batch_size - 1 to 8 images per request. Keep it small. The author is blunt about why: at high batch the upstream API sometimes reports success, bills you, and returns no image.
  • seed - -1 randomizes, a fixed value reproduces the same output. top_p (default 0.95) is the sampling knob: lower is more conservative.

For image-to-image, wire up to five reference images into image_1 through image_5. That's the multi-image fusion Gemini is good at - feed it a product shot plus a style reference and it'll merge them. image_size (1K/2K/4K, default 2K) only takes effect on the gemini-3-pro-image* models.

The outputs are images (an IMAGE tensor, batch or single) and text. The text output is worth wiring to a preview node: when the request fails, the node hands back a visual error image and puts the reason in the text port instead of just dying.

The fiddly bits

There are three toggles a beginner will be tempted to flip and mostly shouldn't. 线路 (route) picks the channel - Hong Kong dedicated, direct US, CF dedicated, or the default 心宝新渠道 - and they share the same balance, so you can switch if one is slow. 绕过代理 (bypass proxy) forces a direct connection when your proxy is flaky. 禁用SSL验证 disables certificate checks to improve success rate, and the tooltip says it plainly: only on a trusted network, or your key can leak to whoever's intercepting your traffic.

There's also an optional binding_context input - skip it for plain generation; it only matters for the pack's local-crop chain (see the binding and crop nodes).

Installing

This pack ships per-platform repos - Linux (this one), Windows, and macOS. Manager search "comfyui-banana-li", or:

cd ComfyUI/custom_nodes
git clone https://github.com/98624017/comfyui-banana-li-linux

Then restart ComfyUI. The pack ships precompiled binaries, but you still need its Python deps: requests, opencv-contrib-python, scikit-image, segment-anything, blend_modes, timm, Pillow, psd-tools. No model files to download - the model lives on Google's servers.

The traps

  • It costs money every single run. The KB's honest framing: a local generation is free after electricity, a cloud call is metered forever. Validate with batch 1 before committing to 8.
  • Your images and prompts leave the machine. That's the mechanism, not a bug - and it's why the key security and SSL warnings are worth respecting.
  • Batch 1–4 for stability. The "billed but no image returned" failure is a real upstream behavior, and this node retries with exponential backoff but can't always recover.
Category❤️‍🔥心宝专用

Inputs (17)

NameTypeDefaultDescription
promptSTRINGPeace and love生成图像的文本提示词,可多行描述内容、风格等
banana_api_keySTRING调用服务的 API Key;留空则优先使用 config.ini 中的配置
model_typeCOMBOgemini-3-pro-image-preview选择要使用的模型
batch_sizeINT11–8一次请求中要生成的图片数量,范围 1~8
aspect_ratioCOMBOAuto生成图像的宽高比例,Auto 为由服务端自动决定;1:4/4:1/1:8/8:1 仅 gemini-3.1-flash-image-preview 支持
seedoptINT-1-1–102400随机种子,-1 为自动随机;固定种子可复现同一输出
top_poptFLOAT0.950–1采样参数 Top-P,数值越低越保守,越高多样性越强
image_sizeoptCOMBO2K仅 gemini-3-pro-image 系列生效的分辨率选项
image_1optIMAGE参考图像 1,可为空;用于图生图或多图融合
image_2optIMAGE参考图像 2,可为空;用于图生图或多图融合
image_3optIMAGE参考图像 3,可为空;用于图生图或多图融合
image_4optIMAGE参考图像 4,可为空;用于图生图或多图融合
image_5optIMAGE参考图像 5,可为空;用于图生图或多图融合
绕过代理optBOOLEANfalse梯子速度不佳、不可靠时开启
禁用SSL验证optBOOLEANfalse禁用提高成功率,但流量被第三人劫持状况下可能泄露密钥
线路optCOMBO心宝❤新渠道固定线路选择,生成与余额共享
binding_contextoptBANANA_BINDING(可选)来自“心宝❤绑定生成/透传”的绑定上下文,仅在搭配绑定增强节点时需要

Outputs (2)

NameTypeDescription
imagesIMAGE
textSTRING