Nodes/comfyui-lumi-tools/Lumi Gemini Imagen Config
ComfyUI Node

Lumi Gemini Imagen Config

The Gemini image settings that don't live in a sampler — aspect, resolution, temperature

By illuminatianon·Created 9 months ago·Updated 4 months ago· 0
Lumi Gemini Imagen Config
    • config
    aspect_ratio16:9
    image_size2K
    temperature1.00
    top_p1.00

    When you generate images with a Gemini imagen model from inside ComfyUI, the usual sampler settings don't exist. There's no step count, no CFG, no scheduler - instead the API wants an aspect ratio, a resolution tier, and a couple of sampling knobs. Lumi Gemini Imagen Config is the node that holds those, so the processor that actually makes the call stays clean and stateless. It doesn't contact any API by itself; it just builds a config object and hands it to Lumi LLM Imagen Processor.

    The inputs that matter

    • aspect_ratio - a dropdown of the ten Google-supported ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. Defaults to 16:9, which is a sensible "landscape by default" choice and also the first thing you'll change when a render comes back the wrong shape.
    • image_size - the resolution tier: 1K, 2K, or 4K, default 2K. This one needs a reality check: not every model supports every tier. The tooltip is explicit - the older Gemini flash image models only do 1K. If you pick 4K on a 1K-only model, the processor silently caps it down to what the model can actually produce rather than erroring.
    • temperature - 0–2, default 1. Your creativity dial; lower for "faithful to the prompt," higher for "surprise me."
    • top_p - 0–1, default 1, the other sampling knob. Most people leave it alone.

    The single output, config (IMAGEN_CONFIG), plugs into the processor. It's passed through as the API's image_config field - aspectRatio, imageSize, and so on - so what you see is literally what the model receives.

    How the pieces fit

    Think of the imagen half of this pack as three layers: a provider node (Lumi Google Imagen Provider for the direct, fast route, or Lumi OpenRouter Imagen Provider) supplies the credentials and model, this config node supplies the framing, and Lumi LLM Imagen Processor is where the API call actually happens. The processor also sanity-checks compatibility - if your provider and config don't match model families, it raises a clear error instead of silently generating garbage.

    Installing

    cd ComfyUI/custom_nodes
    git clone https://github.com/illuminatianon/comfyui-lumi-tools
    cd comfyui-lumi-tools
    uv sync
    

    Restart ComfyUI (or search "Lumi Tools" in Manager). No model files, no downloads - you only need an API key, and that lives on the provider node, not here.

    Where people trip

    The usual beginner stumble is pairing a 2K/4K config with a 1K-only model and wondering why the output is 1024. Remember the cap. The other classic: forgetting this node entirely. The processor needs provider and config both wired - a provider alone throws a missing-input error. And if you're comparing outputs across runs, remember temperature and top_p mean the API isn't deterministic the way a local sampler with a fixed seed is; shuffle the seed and treat results as samples, not measurements.

    CategoryLumi/LLM

    Inputs (4)

    NameTypeDefaultDescription
    aspect_ratioCOMBO16:9Aspect ratio for generated images
    image_sizeCOMBO2KImage size tier (1K, 2K, 4K). Note: gemini-2.0-flash only supports 1K
    temperatureFLOAT1.000–2Temperature for generation creativity
    top_pFLOAT1.000–1Top-p sampling parameter

    Outputs (1)

    NameTypeDescription
    configIMAGEN_CONFIG