Lumi Google Imagen Provider
The fast lane to Gemini imagen — direct Google API, no middleman
- provider
If you're going to generate images with Gemini's imagen models, this is the provider node you want first. Lumi Google Imagen Provider talks straight to Google AI Studio's API (generativelanguage.googleapis.com), skipping OpenRouter entirely - and per the pack's own README that's roughly 4x faster than routing through OpenRouter. When you're waiting on an API call that can take a minute or two, a 4x speedup stops being a nice-to-have and becomes the whole point.
It's a provider node, so on its own it does nothing visible: no images, no text. It packages up a model choice and a credential into an IMAGEN_PROVIDER object that you hand to Lumi LLM Imagen Processor.
The inputs that matter
- env_key - which environment variable holds the key. Defaults to
GOOGLE_API_KEY, and you can point it elsewhere if you want. - model - the dropdown of imagen-capable models. Default is
gemini-3-pro-image-preview(up to 4K), withgemini-3.1-flash-image-preview(also 4K) andgemini-2.5-flash-image(1K only, the "Nano Banana" era) as alternatives. These are real, live model IDs on Google's API, and the list is hardcoded rather than fetched - so when Google ships a new image model, it'll land here in a pack update.
The one output, provider, is what you actually use. It wires into the processor alongside a config node.
Why you'd pick this over the OpenRouter route
Speed is the headline, but there's a second reason: this node and the OpenRouter imagen provider exist so you can choose your billing. If you're already paying OpenRouter, the convenience of one key for both LLM and imagen work is real. But for pure image generation, direct-to-Google is both faster and usually where the free tier lives if you're just experimenting. The design intent in the pack's own docs is unambiguous - "Google AI Studio (Direct) - Recommended."
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/illuminatianon/comfyui-lumi-tools
cd comfyui-lumi-tools
uv sync
Restart ComfyUI, or grab "Lumi Tools" via ComfyUI Manager. Nothing to download - the only setup is an API key. Get one from Google AI Studio and make sure the ComfyUI process can see it:
export GOOGLE_API_KEY=AIza...
What to watch for
The two real-world stumbles: the env var error (same story as every key-based node - export it where the ComfyUI process lives, not just your current shell), and rate limits. Direct Google calls hit quota faster than you'd expect on free tiers, and the pack's philosophy here is fail-fast: transient errors get a couple of retries, but a hard quota rejection will kill the job rather than silently skip it. That's arguably a feature - you always know exactly why the batch died. One privacy note worth knowing: the provider node deliberately refuses to cache itself (its IS_CHANGED returns NaN), so the API key never leaks into saved workflow files. The key travels in the node's output object at runtime only.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| env_key | STRING | GOOGLE_API_KEY | Environment variable name containing the Google AI Studio API key |
| model | COMBO | gemini-3-pro-image-preview | Select the imagen model to use |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| provider | IMAGEN_PROVIDER | — |