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

LayerUtility: Gemini Image Edit(Advance)

Gemini Image Edit — multimodal image editing via Google's API

By chflame163·Created 2 years ago·Updated 4 months ago· 696
LayerUtility: Gemini Image Edit(Advance)
  • image
  • image_2
  • image_3
  • image
model
temperature0.5
seed0
user_promptchange the background to forest

The image-out sibling of the pack's text-based Gemini nodes: send in an image and a text instruction, get an edited image back - no ControlNet, no mask, no local model. You describe the change in plain language ("change the background to forest" is the node's own default prompt) and Google's model does the edit.

Worth knowing exactly what you're calling: the model list has gemini-2.0-flash-exp-image-generation, the original option the README documents, and gemini-2.5-flash-image-preview, added since. That second one is Google's model better known by its public branding - Nano Banana - the same image-generation-and-editing model behind Google's own ImageFX product. You're hitting the same backend either way this node exposes it or the consumer app does.

The inputs and outputs that matter

  • image - the base image you're editing. image_2 / image_3 (both optional) - additional reference or source images, for edits that combine or reference more than one picture (put an element from one image into another, match a style, that kind of thing).
  • user_prompt - your instruction, in plain English.
  • temperature (default 0.5) and seed - creativity and (attempted) reproducibility, same as the text nodes.

Output is a single image.

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 to download locally - the actual generation happens on Google's servers.

API key: apply at Google AI Studio, rename api_key.ini.example (in the plugin's root) to api_key.ini, and fill in your key after google_api_key=. Shared across every Gemini node in the pack, so if you've already set this up for Gemini or GeminiV2, this node reads the same file.

Common issues & troubleshooting

You get text back, or nothing, instead of an edited image. Google's image-generation and image-editing endpoints apply their own content-safety filtering, and per public reporting it's gotten stricter over time, with tighter restrictions specifically on realistic people and recognizable public figures added in policy updates through early 2026. If an edit request is borderline on that front, expect a refusal rather than a broken node - that's not something you can configure around locally.

Authentication errors. Confirm api_key.ini is actually named .ini and not still .ini.example, and that the key has no extra whitespace.

Connection failures or a hanging request. Google's endpoints aren't reachable directly from some regions (mainland China is the one the README calls out specifically) - that shows up as ProxyError or a plain timeout, and it's a network problem, not something wrong with the node.

Edit doesn't reflect what you described, especially with multiple images wired in. Be explicit in user_prompt about what role each image plays - the node has no way to infer that "image_2 is the background you want" versus "image_2 is a style reference" on its own, the same convention the pack's other multi-image Gemini nodes use.

Category😺dzNodes/LayerUtility

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
modelCOMBO2 options: gemini-2.0-flash-exp-image-generation, gemini-2.5-flash-image-preview
temperatureFLOAT0.50–2
seedINT00–2147483647
user_promptSTRINGchange the background to forest
image_2optIMAGE
image_3optIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE