Imagen3 Text To Image
Google's Imagen 3 in your graph — a text-to-image API node with a real negative prompt
- Generated Image
Google's Imagen has always been the "serious" branch of its image stack - the one that's more about polished, composed image generation than the fast-and-loose Nano Banana line. This node puts Imagen 3 (imagen-3.0-generate-002) into a ComfyUI graph as a plain text-to-image node, and it's worth knowing about for one specific reason: it has a real negative_prompt input, which most of Google's Gemini-native image models don't offer. If you've ever fought a Nano Banana workflow to keep something out of a picture, this is the Google node that actually lets you.
The catch is the same one that applies to every node in this pack: it's an API call. No weights download, no local VRAM - you send a prompt to Google, you pay per image, and everything returns as a standard IMAGE tensor. It's also Google's filter, not yours: expect the aggressive content safety and invisible SynthID watermarking that the community has griped about for years.
How it works
The node builds a request and sends it to the Imagen 3 API through the pack's client - either the Gemini API key route or Vertex AI, depending on your setup (more on that below). Your prompt goes in, an IMAGE tensor comes out, ready to wire into a preview, save node, upscaler, or anything else. Simple enough that there's no real mechanism to learn; the interesting part is the settings.
Inputs and outputs that matter
- prompt - multiline, the main description. This is your whole job.
- negative_prompt - the standout. A genuine "exclude this" field, which most of the Gemini image nodes in this pack simply don't have.
- number_of_images - 1 to 4 per request. Batch it if you're iterating on a concept; just remember you're billed per image.
- aspect_ratio - five options:
1:1,16:9,4:3,3:4,9:16. - person_generation -
ALLOW_ADULT/DONT_ALLOW, Google's policy switch for whether the model will depict people at all. - enhance_prompt (default on) - Google rewrites your prompt for quality. Useful, but it disables
seed, so if you're hunting for a reproducible generation, turn it off. - seed - set 0 and the API picks randomness; nonzero works only with
enhance_promptoff. - add_watermark - toggles the invisible SynthID digital watermark (all Gemini images carry it anyway; this just controls the explicit marker).
- safety_filter_level -
BLOCK_LOW_AND_ABOVEup toBLOCK_NONE. If your generations keep getting refused, this is the dial. - gcp_project_id / gcp_region - only needed for the Vertex AI path.
The single output is Generated Image (IMAGE).
Installing it
The node ships in catnipglitch/comfyui-genmedia-gemini-api, a community fork of Google's official comfyui-google-genmedia-custom-nodes. Via ComfyUI Manager, search comfyui-google-genmedia-custom-nodes and Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/catnipglitch/comfyui-genmedia-gemini-api
pip install -r comfyui-genmedia-gemini-api/requirements.txt
Restart, then set up auth. The fork's headline feature is that the Gemini API key route works without any GCP project - set one environment variable and you're done:
export GOOGLE_API_KEY=AIza...
# or export GEMINI_API_KEY=AIza...
Alternatively the Vertex AI route uses ADC (gcloud auth application-default login) and needs gcp_project_id + gcp_region filled in. Either way, restart ComfyUI after setting the variable.
Common issues
- "Generation refused / blank result." Google's safety filter is real and aggressive. Try
safety_filter_levelatBLOCK_ONLY_HIGHorBLOCK_NONE, and expect some subjects to be blocked no matter what. - "My seed does nothing." Because
enhance_promptdefaults to on and silently disables it. Turn it off, then seeds work. - "Error: GCP project/region required." You're on the Vertex path without a key set. Either set
GOOGLE_API_KEYorGEMINI_API_KEY, or provide project + region inputs. The pack is explicit that every node needs project/region on the Vertex route. - Cost creep. This is billed per call, and
number_of_images=4is four charges. The placeholder nodes in this pack exist precisely so you don't burn money testing the wiring.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | A vivid landscape painting of a futuristic city | — |
| person_generation | COMBO | ALLOW_ADULT | 2 options: ALLOW_ADULT, DONT_ALLOW |
| aspect_ratio | COMBO | 16:9 | 5 options: 1:1, 16:9, 4:3, 3:4, 9:16 |
| number_of_images | INT | 11–4 | — |
| negative_promptopt | STRING | — | |
| seedopt | INT | 00–4294967295 | 0 seed let's Imagen3 API handle randomness. Seed works with enhance_prompt disabled |
| enhance_promptopt | BOOLEAN | true | — |
| add_watermarkopt | BOOLEAN | false | — |
| output_image_typeopt | COMBO | PNG | 2 options: PNG, JPEG |
| safety_filter_levelopt | COMBO | BLOCK_MEDIUM_AND_ABOVE | 4 options: BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, BLOCK_ONLY_HIGH, BLOCK_NONE |
| gcp_project_idopt | STRING | GCP project id where Vertex AI API will query Imagen | |
| gcp_regionopt | STRING | GCP region for Vertex AI API |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Generated Image | IMAGE | — |