心宝❤BananaV2
Web search, workflow concurrency, and a failed-URL escape hatch
- image_1
- image_2
- image_3
- image_4
- image_5
- binding_context
- images
- text
- failed_urls
If you've already got the base 心宝❤Banana node working, V2 is the same engine with three things bolted on that matter for real workflows: an internet-search toggle, a workflow-concurrency mode, and a failed_urls output that lets you rescue the images Gemini claims it made but never handed you.
It's the same Gemini image API under the hood - same five models, same batch, aspect ratio, seed, and up-to-five reference images. In fact every input and output on V1 is here. The differences are all in the direction of "production batch work," which is the point of this pack: Xinbao built it for e-commerce detail pages where you're generating dozens of images per session and can't afford a single failure to nuke the whole run.
What's new
启用工作流并发 (workflow concurrency), default off. This is the big one. Normally every Banana node fires its API call one at a time in graph order. Flip this on and multiple BananaV2 and video nodes in the same workflow fire concurrently. The trade-off the author made: in concurrency mode, a single node's failure doesn't kill the graph - that node's output just blocks and the error text appears in its text port. You get resilience at the cost of determinism. It's off by default to keep resource usage conservative; you turn it on when the session is long.
联网搜索 (web search), default off. The model can search the web to assist generation. The tooltip is refreshingly honest: image models may just ignore this tool, so treat it as a "sometimes helps, never hurts" switch rather than a feature.
>5M限制长边 (over-5MB long-edge policy). Uploaded reference images bigger than 5MB get rejected by the API, so this controls what happens before upload. 禁用 (off) just re-encodes to JPEG q90 - keeps resolution, shrinks the file. The 2048 / 3072 options force-resize the long edge down to that pixel count instead. If your product photos are huge, this is the knob that stops upload failures.
And the reason this node has three outputs where V1 has two: failed_urls. When a batch image comes back as a URL that then fails to download locally, the URL goes here instead of being silently lost. That output feeds the pack's companion node, 心宝❤失败链接汇总 (BananaFailedUrlAggregator), which collects failed URLs across many V2 nodes and retries them.
The rest, briefly
images and text behave exactly like V1 - text carries the error message when things go wrong. The binding_context input is there for the local-crop chain. And everything about 线路 (route), 绕过代理, 禁用SSL验证, top_p, and image_size carries over unchanged, as does the default of gemini-3-pro-image-preview and the batch-1-4-for-stability advice.
Installing and gotchas
Same pack, same install. Manager search "comfyui-banana-li", or clone the Linux repo:
cd ComfyUI/custom_nodes
git clone https://github.com/98624017/comfyui-banana-li-linux
Restart, then set your key once in config.ini ([gemini] section) or leave banana_api_key blank on the node to inherit it.
Where people get burned: they flip concurrency on, expect a 2x speedup, and are confused when a node mid-graph quietly blocks. That's the designed behavior - concurrency is a fire-and-forget mode, and you check the text outputs for what actually failed. And remember the upstream quirk the README hammers on: high batch (especially 8) can return "success" while billing you nothing back. V2's failed_urls output is the pack's answer to that - wire it to the aggregator rather than just re-running the whole batch.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | Peace and love | 生成图像的文本提示词,可多行描述内容、风格等 |
| banana_api_key | STRING | 调用服务的 API Key;留空则优先使用 config.ini 中的配置 | |
| model_type | COMBO | gemini-3-pro-image-preview | 选择要使用的模型 |
| batch_size | INT | 11–8 | 一次请求中要生成的图片数量,范围 1~8 |
| aspect_ratio | COMBO | Auto | 生成图像的宽高比例,Auto 为由服务端自动决定;1:4/4:1/1:8/8:1 仅 gemini-3.1-flash-image-preview 支持 |
| seedopt | INT | -1-1–102400 | 随机种子,-1 为自动随机;固定种子可复现同一输出 |
| top_popt | FLOAT | 0.950–1 | 采样参数 Top-P,数值越低越保守,越高多样性越强 |
| image_sizeopt | COMBO | 2K | 仅 gemini-3-pro-image 系列生效的分辨率选项 |
| image_1opt | IMAGE | 参考图像 1,可为空;用于图生图或多图融合 | |
| image_2opt | IMAGE | 参考图像 2,可为空;用于图生图或多图融合 | |
| image_3opt | IMAGE | 参考图像 3,可为空;用于图生图或多图融合 | |
| image_4opt | IMAGE | 参考图像 4,可为空;用于图生图或多图融合 | |
| image_5opt | IMAGE | 参考图像 5,可为空;用于图生图或多图融合 | |
| 绕过代理opt | BOOLEAN | false | 梯子速度不佳、不可靠时开启 |
| 禁用SSL验证opt | BOOLEAN | false | 禁用提高成功率,但流量被第三人劫持状况下可能泄露密钥 |
| 线路opt | COMBO | 心宝❤新渠道 | 固定线路选择,生成与余额共享 |
| binding_contextopt | BANANA_BINDING | (可选)来自“心宝❤绑定生成/透传”的绑定上下文,仅在搭配绑定增强节点时需要 | |
| 联网搜索opt | BOOLEAN | false | 开启后模型可联网搜索辅助生成(注意:生图模型可能会忽略此工具) |
| 启用工作流并发opt | BOOLEAN | false | 启用后,多个 BananaV2/视频节点可在同一工作流中并发发起 API 调用;默认关闭以保持更保守的资源占用。开启并发时单节点失败不会终止整图。 |
| 大于5M限制长边opt | COMBO | 禁用 | 上传图片超过5MB时的处理策略:禁用则仅转格式(JPEG q90),开启则强制缩放长边至指定像素 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| text | STRING | — |
| failed_urls | STRING | — |