Nodes/ComfyUI-Gemini-Conversation-Canvas/🎬 Gemini Session (Start)
ComfyUI Node

🎬 Gemini Session (Start)

Make an image the model actually remembers

By jeremieLouvaertΒ·Created 5 months agoΒ·Updated 15 days agoΒ· 2
🎬 Gemini Session (Start)
  • input_image
  • session
  • image
  • text
  • turn_count
β—„promptβ–Ί
β—„session_namemy_sessionβ–Ί
β—„modelgemini-3-pro-image-previewβ–Ί
β—„aspect_ratio1:1β–Ί
β—„resolution2Kβ–Ί
β—„api_keyβ–Ί

Most image models are fire-and-forget. You type a prompt, you get an image, and the model has already forgotten you existed by the time the pixels land. Google's Gemini image models (the "Nano Banana" line, if you follow the rebrand drama) are different - image generation is native to the language model, so it can carry a scene, a character, a whole conversation across multiple generations. This node is the door into that conversation. Everything else in the ComfyUI-Gemini-Conversation-Canvas pack hangs off it.

🎬 Gemini Session (Start) creates a new conversation and generates the first image. The session output is the important thing: it's a dict that carries the full chat history, and every later node in the pack reads and writes to it. Chain an Edit Turn node onto that session wire and you've got "make the car blue" β†’ "now add rain" β†’ "make it evening," each edit coherently changing the same scene. That's the entire pitch of this pack, and it's genuinely something local Stable Diffusion/Flux workflows do poorly without a pile of ControlNet and inpainting scaffolding.

The honest part: this is a cloud API

Before you get excited about a new local model - there is no local model. There's no checkpoint to download, no GPU requirement, no LoRA support. This node calls Google's Gemini API through the google-genai SDK. Every turn is a real API call, billed per image, and the image itself is produced at Google's end. If you need fully offline or fully private generation, walk away now; this pack is for people who want Gemini's conversational editing inside their ComfyUI graph.

You also need an API key. Resolution order (checked by the node itself): the api_key field on the node, then a GEMINI_API_KEY environment variable, then a gemini_api_key.txt file in your ComfyUI root directory. A free key is a couple of clicks away at Google AI Studio - put it in the node field when you're testing and move on.

Inputs that matter

  • prompt - the initial image description. Be specific; Gemini responds well to concrete detail.
  • session_name - the folder name under output/gemini_sessions/ where this session lives. Pick something unique per workflow; two Start nodes with the same name will fight over the same folder.
  • model - defaults to gemini-3-pro-image-preview (Nano Banana Pro), with gemini-3.1-flash-image-preview (Nano Banana 2) and gemini-2.5-flash-image (Nano Banana) also available. Note the pack's README still lists older 2.5-flash-preview IDs - the dropdown in the node is the up-to-date list.
  • aspect_ratio - 1:1 default, or 16:9, 9:16, 21:9 and friends. auto lets the model decide.
  • resolution - 1K / 2K / 4K, 2K default.
  • input_image (optional) - connect an IMAGE and the node sends it along with your prompt for image-to-image work ("remove the background and replace it with a beach").
  • api_key (optional) - as above.

Outputs

session (the conversation state - wire it forward), image (the generated image as a normal ComfyUI IMAGE tensor, so you can preview/save/upscale it), text (the model's textual reply, often a short caption), and turn_count (always 1 after the first generation).

Install and gotchas

Install via ComfyUI Manager (search "Gemini Conversation Canvas") or:

cd ComfyUI/custom_nodes/
git clone https://github.com/jeremieLouvaert/ComfyUI-Gemini-Conversation-Canvas
pip install -r ComfyUI-Gemini-Conversation-Canvas/requirements.txt

Restart ComfyUI. Dependencies are light - google-genai, filelock, Pillow - and there are no model downloads at all.

Two things will bite you. First, Gemini is aggressively content-filtered - the community's own summary of ImageFX was "powerful, unimaginative, massive hidden biasing." When a prompt trips a filter you'll get a RuntimeError telling you no image came back; rephrase rather than retry. Second, remember this is per-turn billing - a 10-edit chain is 10 API calls, so don't treat it like local inference.

CategoryGemini Conversation Canvas

Inputs (7)

NameTypeDefaultDescription
promptSTRINGText prompt for the initial image generation
session_nameSTRINGmy_sessionName for saving/loading this session
modelCOMBOgemini-3-pro-image-previewGemini model to use for image generation
aspect_ratioCOMBO1:1Aspect ratio for generated images
resolutionCOMBO2KOutput resolution (1K, 2K, 4K)
input_imageoptIMAGEOptional input image for image-to-image editing
api_keyoptSTRINGGoogle AI API key. Falls back to GEMINI_API_KEY env var or gemini_api_key.txt

Outputs (4)

NameTypeDescription
session*β€”
imageIMAGEβ€”
textSTRINGβ€”
turn_countINTβ€”