Nodes/ComfyUI_LLM_Banana/Banana2-提示词模板
ComfyUI Node

Banana2-提示词模板

Structured prompt templates for Gemini image models, mirror-friendly

By xuchenxu168·Created 12 months ago·Updated 9 months ago· 46
Banana2-提示词模板
  • image
  • image_2
  • image_3
  • image_4
  • banana_prompt
  • raw_response
user_prompt
template_type生成-逼真场景
modelgemini-3-pro-preview [all]
api_providergoogle
api_key
base_url
versionAuto
auth_modeauto
max_output_tokens2048
temperature0.70
thinking_levelhigh
media_resolutionAuto
custom_template
system_instruction

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 to gemini-3-pro-preview [all]; options include the -thinking variant (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=Auto picks v1beta on Google domains and v1 on mirrors; auth_mode=auto uses x-goog-api-key for Google and Bearer otherwise. Custom providers must supply both key and base_url or the node refuses to run.
  • thinking_level (high/low) and media_resolution (Auto/low/med/high) - quality knobs; media_resolution=Auto is what bumps the version to v1beta on 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.

Category🍌 Banana

Inputs (18)

NameTypeDefaultDescription
user_promptSTRING
template_typeCOMBO生成-逼真场景32 options: 生成-逼真场景, 生成-风格化插画和贴纸, 生成-图片中的文字, 生成-产品模型和商业摄影, 生成-极简风格和负空间, 生成-连续艺术(漫画分格), +26
modelCOMBOgemini-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_providerCOMBOgoogle11 options: google, comet, T8的贞贞AI工坊, T8-Comfly, T8-HK, T8-US, +5
api_keySTRING
base_urlSTRING
versionCOMBOAuto4 options: Auto, v1, v1alpha, v1beta
auth_modeCOMBOauto3 options: auto, google_xgoog, bearer
max_output_tokensINT2048256–8192
temperatureFLOAT0.700–1
thinking_levelCOMBOhigh2 options: high, low
media_resolutionCOMBOAuto4 options: Auto, media_resolution_low, media_resolution_medium, media_resolution_high
imageoptIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
custom_templateoptSTRING
system_instructionoptSTRING

Outputs (2)

NameTypeDescription
banana_promptSTRING
raw_responseSTRING