Google AI - Image Generator (Imagen 4)
Cloud images without the SDKs
- image
GoogleAI_ImageNode turns a text prompt into a finished image using Google's hosted Imagen 4 models - no local checkpoint, no VRAM, no controlnet setup, just a prompt and an API key. It outputs a proper ComfyUI IMAGE tensor, so everything downstream (upscalers, VAE decoding for inspection, image save nodes) just works. For someone who wants a cloud generator as one step in a ComfyUI pipeline rather than a separate app, this is the least-friction route this pack offers.
What it's for
Two situations. First, you want Google-quality text-to-image in your graph without installing a huge model - Imagen 4 is genuinely good at following long prompts and rendering text in images, which is where local models often stumble. Second, you want a fallback or comparison generator: prompt the local model and Imagen side by side, and pick the result you like before committing a batch. It's a paid API call per image, so think of it as the premium step in a workflow, not the default one.
How it works
Pure REST to Google's :generateImages endpoint - no SDKs. Your prompt, aspect ratio, seed, and (if provided) negative prompt go up; the first returned image comes back decoded into a [1, H, W, C] tensor. The seed and randomize_seed inputs behave exactly like you'd expect from local generation: fix the seed for reproducible images, or let it roll. Key resolution follows the pack standard (node field → GEMINI_API_KEY env var → .env). And true to this pack's design, API errors don't crash the workflow - they come back as a placeholder error image you'll see on the canvas.
Inputs and outputs that matter
- prompt (STRING, multiline, default "A beautiful cinematic portrait") - the actual ask. Imagen rewards detailed, structured prompts.
- model (COMBO, default
imagen-4.0-generate-001) - pick between the standard, ultra, and fast variants in the combo. - aspect_ratio (COMBO, default
1:1) - the usual set: 1:1, 16:9, 9:16, 4:3, 3:4. - seed (INT) and randomize_seed (BOOLEAN) - reproducibility dials.
- api_key, negative_prompt (STRING) - key override and an optional negative prompt (Imagen's support is thinner than diffusion's, so keep it simple or leave it empty).
- image (IMAGE) - the generated image, ready to feed into a save node, upscaler, or img2img pass.
Installing it
One of the 15 Google AI nodes in COMFYUI_PROMPTMODELS (PromptModels Studio in Manager):
cd ComfyUI/custom_nodes
git clone https://github.com/cdanielp/COMFYUI_PROMPTMODELS
Put GEMINI_API_KEY=AI... in the pack's .env and restart. Needs ComfyUI 0.26.0+. No model downloads.
Common issues
Money and keys, in that order. Each image is a billed API call, and "preview" model IDs eventually get retired, so if a previously working combo starts returning errors, check whether the model ID changed. Safety filters are real on Google's side: heavily restricted subject matter gets blocked and you'll see an error image, not a generation - that's the API being conservative, not the node being broken. And keep the key in .env; in the node field it ships along in workflow JSON and PNG metadata.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A beautiful cinematic portrait | — |
| model | COMBO | imagen-4.0-generate-001 | 5 options: imagen-4.0-generate-001, imagen-4.0-ultra-generate-001, imagen-4.0-fast-generate-001, imagen-3.0-generate-002, imagen-3.0-fast-generate-001 |
| aspect_ratio | COMBO | 1:1 | 5 options: 1:1, 16:9, 9:16, 4:3, 3:4 |
| seed | INT | 00–18446744073709550000 | — |
| randomize_seed | BOOLEAN | true | — |
| api_keyopt | STRING | — | |
| negative_promptopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |