ComfyUI-ImageFx🖼️
Google Imagen inside ComfyUI — no key, no GPU, but it's a one-way door
- generated_images
- seed
This node is Google's ImageFX text-to-image tool living inside a ComfyUI graph. You type a prompt, it hands it to Google's Imagen 3.1, and the images come back as a normal IMAGE tensor you can save, upscale, or feed into the rest of your workflow. The name is a bit of a lie, in the good way: there's no API key, no billed plan, and no model to download - it reuses the session token from your Google account's labs.google page.
So why reach for it at all? Because Imagen is genuinely good at things open checkpoints still fumble: clean character work and text-in-image rendering, with none of the LoRA hunting or VRAM budget. People pull it into ComfyUI when they want that look in the middle of a real pipeline instead of tabbing out to a web page. And it's fast - the generation happens on Google's machines, so it's a few seconds and a network round-trip, not a GPU burn.
How it works
This is a reverse-engineered, unofficial API call - read that twice. The author sniffed the browser traffic against labs.google and replayed it. Under the hood the node POSTs to aisandbox-pa.googleapis.com/v1:runImageFx with your prompt, a seed, an aspect ratio, and the model flag IMAGEN_3_1, authenticated with a Bearer token plus cookies lifted from your own browser session. Google replies with base64-encoded images, which the node decodes into a single batched tensor.
Nothing runs locally. Every prompt leaves your machine, hits Google's servers, and comes back with an invisible SynthID watermark baked in. If that matters to you (it should, for client work), this isn't your tool.
The inputs that matter
There are only four, and three are obvious:
- prompt (multiline) - your text prompt, same as the web UI.
- aspect_ratio - one of five presets: 1:1, 9:16, 16:9, 3:4, 4:3. Defaults to 16:9 landscape.
- num_images - 1 to 4 (default 4). Four per run is more than the free web UI gave you at once, which is the node's whole pitch.
- seed - 0 to 999999. Set it and you can re-roll a batch or reproduce one.
Outputs are generated_images (IMAGE, a batch of num_images) and seed - a STRING reporting the seed the server actually used, which is handy if you want to recreate a lucky batch later.
Installing it
It's a one-package install with a manual auth step afterward:
cd ComfyUI/custom_nodes
git clone https://github.com/ainewsto/comfyui-labs-google
# restart ComfyUI, or install via Manager: search "comfyui-labs-google"
Dependencies are just requests, pillow, and chardet - nothing heavy, no model downloads. The fiddly part is auth: the repo ships a config template named googel.json (yes, misspelled), but the code reads google.json. Rename it, then grab the values from a logged-in labs.google tab - DevTools → Application → the access token, session cookies, and your account info. The author has a walkthrough video for this if you get lost. The fields are time-limited, so expect to redo it.
Where people get burned
- Black 512×512 images. This is the big one. If the API call fails - expired token, wrong region, endpoint changed - the node doesn't throw a useful error. It returns a tensor of black images and prints the real error to the ComfyUI console. Black output means "read the console," not "the model hates you."
- A 401 means refresh the token. The author says it flat out: when Google starts answering 401, your credentials in
google.jsonare stale. Re-copy them. - The pack hasn't been touched since June 2025. The last commit was a typo fix. Reverse-engineered endpoints rot, and this one may already be dead by the time you read this. That's the whole game with unofficial wrappers: an API can be revoked, reprice, or change its filter overnight - a file on your disk can't. The author's own warning covers the rest: unofficial API, ban risk on your Google account, and if you're in a region where Google is blocked, you'll need a working route (he recommends a US IP).
When it works it's a genuinely nice free ride. Just don't build your livelihood on it - Google giveth, and Google revoketh.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| seed | INT | 00–999999 | — |
| aspect_ratio | COMBO | 16:9 (Landscape) | 5 options: 1:1 (Square), 9:16 (Portrait), 16:9 (Landscape), 3:4 (Portrait), 4:3 (Landscape) |
| num_images | INT | 41–4 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| generated_images | IMAGE | — |
| seed | STRING | — |