FSL Gemini Image Generator
The fastest Gemini image node in this pack (and the one with zero moving parts)
- IMAGE
If you just want to stick a Gemini text-to-image node in a workflow and have it work, this is the one. FSLGeminiImageGenerator is the "Artist (Pro)" node in Fred LeFevre's FSL pack: a thin wrapper around Google's generate_content API that turns a prompt, a model name, and an aspect ratio into an IMAGE tensor. No inpainting, no masks, no init images - nothing to get wrong. Four inputs, one output, done.
That's the whole pitch. This is the node you reach for when you want Nano Banana-class cloud generation (the KB's closed-source-models.md calls the Gemini 3 Pro Image lineage "technically impressive but heavily censored" - more on that below) without building a graph around it.
How it works
Under the hood it's almost embarrassingly simple: the node appends your aspect ratio to the prompt as an instruction, calls client.models.generate_content() with the model you picked, pulls the inline image bytes out of the response, and converts them to a ComfyUI IMAGE tensor. That "request the aspect ratio via prompt injection" trick is worth knowing - the model doesn't have a real aspect-ratio parameter, so the node just asks nicely in the prompt text.
Two behaviors matter:
- Smart gatekeeping. If the prompt is empty, the node skips the API call entirely and returns a blank 64×64 black image. That's deliberate: it lets the
FSLGeminiChat"Creative Director" node route to this generator without spending money when you're only chatting. - No key → blank, not error. Missing API key also returns the blank image rather than crashing the graph. Handy in a workflow, confusing if you're debugging - the real reason is in your terminal, where it prints
FSL Gemini Image: No prompt (Chat Mode). Skipping.
The inputs that matter
prompt- the actual instruction. Empty skips the call.model_name- defaults togemini-3-pro-image-preview, withgemini-2.0-flash,gemini-2.0-flash-exp, andgemini-1.5-proin the list. The-expentries are previews; they rot, and this pack's changelog is literally a record of Google deprecating models out from under it.aspect_ratio- seven choices from 16:9 down to 2:3, injected into the prompt.api_key- leave blank to fall back on theGEMINI_API_KEYorGOOGLE_API_KEYenvironment variable.
Output is a single IMAGE socket. Wire it into a preview node or straight into a saver.
Install
Through ComfyUI Manager, search "ComfyUI FSL Nodes". Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/fredlef/Comfyui_FSL_Nodes
cd Comfyui_FSL_Nodes
pip install -r requirements.txt # google-genai, requests, pillow, numpy
Restart ComfyUI. On Windows portable, use .\python_embeded\python.exe -m pip install --upgrade google-genai requests. There are no model downloads - everything runs in Google's cloud, so the only real requirement is the google-genai SDK and a key.
Gotchas
The blank-image-when-no-key behavior is the #1 confusion trap - a silently black output usually means no API key reached the node. If google-genai isn't installed the node prints FSL Nodes Error: 'google-genai' library not found. at startup. And remember the censorship: Google's image models are aggressive about safety filtering, so if your prompt gets zero responses or a tiny black square and you know the key works, that's likely the filter, not the node. Set GEMINI_API_KEY in your startup script so you never paste a key into a workflow you might share.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| prompt | STRING | — | |
| model_name | COMBO | gemini-3-pro-image-preview | 4 options: gemini-3-pro-image-preview, gemini-2.0-flash, gemini-2.0-flash-exp, gemini-1.5-pro |
| aspect_ratio | COMBO | 16:9 | 7 options: 16:9, 1:1, 9:16, 4:3, 3:4, 3:2, +1 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |