Imagen Generate (Vertex AI)
Paying Google per image so your GPU doesn't have to
- images
Imagen 4.0 is Google's answer to the local text-to-image stack, and honestly, it's good enough that you'll stop noticing you're paying per render. It's strong on photorealism, renders text into images better than most closed competitors, and it's priced per image with zero VRAM cost to you. If you've got a Vertex AI project set up, this node drops the whole Imagen lineup into your ComfyUI graph - Ultra, standard, and fast tiers, plus the older Imagen 3.0 if you want the familiar one.
What it does
Type a prompt, pick a model, get one to four images back. It's the straightforward text-to-image node of the pack, and the sibling to the Imagen Edit node for mask-driven changes. Where it earns its keep over a local checkpoint: no model files on disk, no sampler fiddling, and quality that doesn't depend on which community checkpoint you happened to download. The trade is the usual closed-model deal - censored, billed per call, and your prompts go to Google.
How it works
The node builds a GenerateImagesConfig with your aspect ratio, guidance scale, seed, and (for the full-size Imagen 4.0 models) image size, then calls Vertex AI's generate_images. The returned images come back as bytes, get decoded to PIL, and land as a stacked IMAGE tensor ready for the rest of your graph. Nothing runs locally except the decode.
The inputs that matter
The same credential trio as every node in this pack: project_id, location, and service_account - and again, service_account wants the JSON contents pasted in, not a file path, despite what the README implies.
After auth, you'll mostly touch:
model-imagen-4.0-ultra-generate-001,imagen-4.0-generate-001(default),imagen-4.0-fast-generate-001, orimagen-3.0-generate-002.number_of_images- 1 to 4 per call. More images = more money; start at 1.aspect_ratio- 1:1, 9:16, 16:9, 4:3, 3:4.image_size- 1K or 2K. Worth knowing: the source only applies this to the full Imagen 4.0 models, not the fast tier.guidance_scaleandseed- the usual dials. Default 7.5 guidance is a fine starting point.
negative_prompt is optional and does the predictable thing.
Outputs
images - a single IMAGE output (stacked tensor, so multiple generations come as one batch). Wire it straight into a preview or save node.
Installing
cd ComfyUI/custom_nodes/
git clone https://github.com/Aryan185/ComfyUI-VertexAPI.git
cd ComfyUI-VertexAPI
pip install -r requirements.txt
Restart ComfyUI, or find ComfyUI-VertexAPI in ComfyUI Manager. The real dependency load is google-genai plus pillow, numpy, torch - nothing exotic.
Where people get burned
The usual closed-model caveats apply, and they're worth stating plainly. Imagen is aggressively safety-filtered - this is the same house policy that keeps Nano Banana "powerful, unimaginative, and massively biased," as the community puts it. Don't expect it to do things your local checkpoint would shrug at. And mind the billing: at a few cents a render it's cheap to try, but a batch loop of 100 images is real money. If you're hitting the filter wall or the bill, that's the sign this node is the wrong tool - not a bug you can configure around.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A majestic lion in the savanna | — |
| project_id | STRING | — | |
| location | COMBO | us-central1 | 40 options: global, us-central1, us-east1, us-east4, us-east5, us-south1, +34 |
| service_account | STRING | — | |
| model | COMBO | imagen-4.0-generate-001 | 4 options: imagen-4.0-ultra-generate-001, imagen-4.0-generate-001, imagen-4.0-fast-generate-001, imagen-3.0-generate-002 |
| number_of_images | INT | 11–4 | — |
| aspect_ratio | COMBO | 1:1 | 5 options: 1:1, 9:16, 16:9, 4:3, 3:4 |
| image_size | COMBO | 1K | 2 options: 1K, 2K |
| seed | INT | 691–2147483646 | — |
| guidance_scale | FLOAT | 7.51–20 | — |
| negative_promptopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |