π¨ Google Imagen
Call Google's Imagen model from ComfyUI with your Gemini key
- IMAGE
This node generates an image with Google's Imagen - the text-to-image model, not a local checkpoint - and drops the result into your ComfyUI graph. There's no model on your disk and no GPU work happening on your machine; it's an API call. You type a prompt, it hits Google's servers, an IMAGE comes back. Handy when you want Imagen's look inside a workflow that's otherwise stitching together local models, masks, and upscalers.
One naming thing to get straight up front: it wants a Gemini API key, not some separate "Imagen key." That's not a mistake - Google serves Imagen through the same Gemini / AI Studio API, so one key from aistudio.google.com/app/apikey covers it.
How it works
You give it a prompt and a few settings, it packages them into an Imagen API request, and returns the generated image. The pack also runs its two standard text conveniences on the prompt first: Google Translate (write in your language, it sends English) and dynamic prompt support. So the text you type isn't necessarily the text Imagen sees - it can be translated and expanded first.
The inputs and outputs that matter
Gemini_API(STRING) - your key. You can paste it here, or leave it blank and set it once in the pack'sAPI_key.jsonso you're not pasting it into every node.prompt(multiline STRING) - what you want.aspect_ratio- one of1:1,3:4,4:3,9:16,16:9. This is how you control shape; there's no width/height here.person_gen(BOOLEAN, default true) - Imagen's people-generation permission. This maps to a real safety control on Google's side; turn it off and requests involving people get blocked.seed(INT) andtranslate(language picker, default off withNone) round it out.
The single output is IMAGE, ready to wire anywhere a normal image goes.
How to install it
Ships with the SDVN pack. ComfyUI Manager, search SDVN_Comfy_node; or:
cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt
from the ComfyUI root, then restart. Being an API node, the extra setup step is the key: rename API_key.json.example to API_key.json in the pack folder and fill in your Gemini key (the README lists exactly where to get it). No weights download.
Common issues & troubleshooting
Key errors. The most common failure. Make sure the key is a valid AI Studio / Gemini key, that it's pasted correctly (no stray spaces), and that image generation is enabled on your Google account. If you set it in API_key.json, confirm you actually renamed the .example file.
People come back blank or blocked. That's person_gen. With it set false, Imagen refuses to render people. Flip it on. Even with it on, Google's content filters can still reject a prompt - that's on their side, not the node's.
Quota and billing. This is a paid API. If generations stop working after a while, check your quota and billing status in the Google console. It's not a local model, so "it worked earlier and now it doesn't" is often a rate limit or a spent quota.
It ignored my language. If you wrote a non-English prompt and the output missed the mark, set the translate picker to your language so it converts to English before sending - leaving it on None passes your text through untranslated.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| Gemini_API | STRING | Get API: https://aistudio.google.com/apikey | |
| aspect_ratio | COMBO | 1:1 | Tα»· lα» khung |
| person_gen | BOOLEAN | true | Cho phΓ©p tαΊ‘o αΊ£nh ngΖ°α»i |
| seed | INT | 00β18446744073709550000 | The random seed |
| prompt | STRING | MΓ΄ tαΊ£ αΊ£nh | |
| translate | COMBO | NgΓ΄n ngα»― dα»ch |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |