Nodes/ComfyUI_LayerStyle_Advance/LayerUtility: Gemini V2(Advance)
ComfyUI Node Runs on cloud

LayerUtility: Gemini V2(Advance)

Gemini V2 — the updated Gemini wrapper, newer models and a seed

By chflame163·Created 2 years ago·Updated 4 months ago· 696
LayerUtility: Gemini V2(Advance)
  • image_1
  • image_2
  • text
model
max_output_tokens4096
temperature0.5
words_limit200
response_language
seed0
system_promptYou are creating a prompt for Stable Diffusion to generate an image.
user_promptGenerate a prompt about a girl.

This is the pack's original Gemini node rebuilt on Google's newer google-genai package, which is what unlocks a more current model list. Same underlying idea as the whole API-node family in this pack: no local model, no VRAM cost, just a network call so your graph can get an LLM text step - expanding a rough idea into a full prompt, describing an image, rewriting for a target style - without pulling in gigabytes of local weights.

The inputs and outputs that matter

  • model - three choices: gemini-2.0-flash-lite, gemini-2.0-flash, and gemini-2.5-pro-exp-03-25. If you specifically need the newest models Google's offered, this is the node to reach for over the original Gemini, which is stuck on the 1.5 line and gemini-2.0-flash-exp.
  • image_1 / image_2 (optional) - wire in a reference image for vision use; since the node doesn't automatically know what role an image plays, describe its purpose directly in user_prompt (the same convention as the original Gemini node).
  • system_prompt - defaults to framing itself as writing a Stable Diffusion prompt, which tells you what this node was built around, even though nothing stops you from overriding it for other text tasks.
  • user_prompt - your actual instruction.
  • max_output_tokens (default 4096), temperature (default 0.5), words_limit (default 200) - length and creativity controls.
  • response_language - en or zh-CN, to force the reply language.
  • seed - new in V2. Sent along with the request to Google's API; useful if you want more reproducible output across otherwise-identical calls, though a text API's determinism is never guaranteed the way a diffusion sampler's is.

Output is text.

How to install it

Recommended: ComfyUI Manager, search "ComfyUI Layer Style Advance". Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_LayerStyle_Advance.git

Then install_requirements.bat / install_requirements_aki.bat, or pip install -r requirements.txt plus repair_dependency.bat. Restart. No model download here - it's API glue, though pulling in the newer google-genai package is part of what the requirements install handles.

API key: apply at Google AI Studio, then find api_key.ini.example in the plugin's root directory, rename it to api_key.ini, and fill in your key after google_api_key=. This same key covers every Gemini node in the pack - Gemini, GeminiV2, GeminiImageEdit, and PromptEmbellish all read from it.

Common issues & troubleshooting

Authentication errors. Double-check api_key.ini actually has the .ini extension (not still .ini.example), and that there's no stray whitespace around the key itself.

Connection failures, ProxyError, or requests that just hang. The README specifically flags mainland China as a region where Google's endpoints aren't directly reachable - that's a network-routing problem, not a node bug. If you're in an affected region, you'll need a working proxy or VPN for this node to function at all.

Response feels heavily filtered, refuses, or comes back generic. Google's Gemini stack applies its own content-safety filtering server-side, and it's tightened over time - that's outside this node's control. If you're hitting refusals on borderline prompts, that's the API declining the request, not an error to debug locally.

Not sure whether to use this or the plain Gemini node. Use V2 unless something specific in your workflow was already built around the older 1.5-line models - there's no reason to prefer the older node for a new build.

Category😺dzNodes/LayerUtility

Inputs (10)

NameTypeDefaultDescription
modelCOMBO3 options: gemini-2.0-flash-lite, gemini-2.0-flash, gemini-2.5-pro-exp-03-25
max_output_tokensINT40961–8192
temperatureFLOAT0.50–2
words_limitINT2008–2048
response_languageCOMBO2 options: en, zh-CN
seedINT00–2147483647
system_promptSTRINGYou are creating a prompt for Stable Diffusion to generate an image.
user_promptSTRINGGenerate a prompt about a girl.
image_1optIMAGE
image_2optIMAGE

Outputs (1)

NameTypeDescription
textSTRING