Banana2-提示词模板
Structured prompt templates for Gemini image models, mirror-friendly
- image
- image_2
- image_3
- image_4
- banana_prompt
- raw_response
Gemini's image models (the "Nano Banana" line, covered in the closed-source-models KB doc) respond dramatically better to a specific style of structured prompt: composition, style, lighting, camera language, laid out as labeled sections. Writing that by hand every time is a chore, and generic English prompts underperform. This node - Banana2-提示词模板 - is a template engine for exactly that. Pick a template like 生成-逼真场景 (photoreal scene) or 编辑-风格迁移 (style transfer), type your idea, and it calls Gemini to produce a Banana-ready prompt plus the raw response.
It's the structured-prompt sibling inside ComfyUI_LLM_Banana, built on the same endpoint logic as the Gemini-Multimodal node and the NanoBanana-GeneralAPI node. Because it's Gemini-native (generateContent), it works through Google's official API or through the mirror/proxy providers the pack is known for.
How it works
The template_type dropdown carries 30+ templates covering the Google-style image categories: generation (photoreal scenes, stylized illustration/stickers, text-in-image, product photography, minimal/negative-space, comic panels), editing (add/remove elements, local repaint, style transfer, multi-image composition, detail preservation, character consistency, TVC storyboard grids), Sora-style video storyboard templates, Webtoon 9-panel grids, and a custom option. It reads your user_prompt (and up to four optional image wires for edit templates), calls the model, and returns the assembled prompt as banana_prompt plus the untouched raw_response if you want to see what the model actually said.
The inputs that matter
template_type- the core control. 32 options, roughly half generation half editing. Start with 生成-逼真场景 if you're unsure.model- defaults togemini-3-pro-preview [all]; options include the-thinkingvariant (tagged for which providers carry it) and the older 2.x models.api_provider- 11 choices: google, comet, the T8/Comfly mirrors, aabao, custom. The mirror options exist so you can run the same endpoint logic through a proxy/reseller.api_key,base_url,version,auth_mode- the unified endpoint/auth controls.version=Autopicksv1betaon Google domains andv1on mirrors;auth_mode=autousesx-goog-api-keyfor Google andBearerotherwise. Custom providers must supply both key and base_url or the node refuses to run.thinking_level(high/low) andmedia_resolution(Auto/low/med/high) - quality knobs;media_resolution=Autois what bumps the version tov1betaon Google.temperature,max_output_tokens- sampling.
Optional inputs: image through image_4 (for edit templates), custom_template to write your own, system_instruction for a system prompt override.
Install
ComfyUI Manager, search ComfyUI_LLM_Banana, or:
cd ComfyUI/custom_nodes
git clone https://github.com/xuchenxu168/ComfyUI_LLM_Banana
cd ComfyUI_LLM_Banana
pip install -r requirements.txt
The pack needs google-genai>=1.51.0 (from requirements.txt) for the newer image endpoints. Restart, and if you've updated and don't see the new base_url/version/auth_mode fields, hit "Reload Custom Nodes" or restart ComfyUI - the README says that explicitly.
Gotchas
If you pick a mirror provider, make sure the provider actually carries the model you selected - the dropdown labels which providers each thinking model is available on, and a model the provider doesn't have will 404 or return "model not found." And the output is a prompt, not an image: wire banana_prompt into a Gemini Banana image-generation or edit node next. Missing keys on a custom provider error out immediately by design, so fill both api_key and base_url together.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| user_prompt | STRING | — | |
| template_type | COMBO | 生成-逼真场景 | 32 options: 生成-逼真场景, 生成-风格化插画和贴纸, 生成-图片中的文字, 生成-产品模型和商业摄影, 生成-极简风格和负空间, 生成-连续艺术(漫画分格), +26 |
| model | COMBO | gemini-3-pro-preview [all] | 6 options: gemini-3-pro-preview [all], gemini-3-pro-preview-thinking [comet/T8的贞贞AI工坊/T8-Comfly/T8-HK/T8-US/comfly/Comfly-HK/Comfly-US/aabao], gemini-2.5-pro-preview-05-06 [google], gemini-2.5-flash-preview-04-17 [google], gemini-2.0-flash [google], gemini-1.5-flash [google] |
| api_provider | COMBO | 11 options: google, comet, T8的贞贞AI工坊, T8-Comfly, T8-HK, T8-US, +5 | |
| api_key | STRING | — | |
| base_url | STRING | — | |
| version | COMBO | Auto | 4 options: Auto, v1, v1alpha, v1beta |
| auth_mode | COMBO | auto | 3 options: auto, google_xgoog, bearer |
| max_output_tokens | INT | 2048256–8192 | — |
| temperature | FLOAT | 0.700–1 | — |
| thinking_level | COMBO | high | 2 options: high, low |
| media_resolution | COMBO | Auto | 4 options: Auto, media_resolution_low, media_resolution_medium, media_resolution_high |
| imageopt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| custom_templateopt | STRING | — | |
| system_instructionopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| banana_prompt | STRING | — |
| raw_response | STRING | — |