ComfyUI Node

Image Params

Pick your size and ratio before Gemini draws a single pixel

By ZUENS2020·Created 8 months ago·Updated 8 months ago· 0
Image Params
  • base_config
  • config
aspect_ratio
image_size
temperature1.00

"Image Params" is where image generation gets its shape. It takes the base_config from Base Config, adds aspect ratio, image size, and temperature, and produces the LLM_IMAGE_CONFIG that the Image node requires. No API calls happen here - it's a pure configuration step in the pipeline Base Config → Image Params → Image → picture.

The inputs that matter

  • aspect_ratio - one of five presets: 1:1, 16:9, 4:3, 9:16, 3:4. This is where you decide whether the result is square, landscape, or portrait. The README's guide pairs them with uses - 1:1 for avatars, 16:9 for widescreen, 9:16 for mobile - but honestly, pick what your downstream needs; the node will happily do any of the five.
  • image_size - 1K, 2K, or 4K, which roughly correspond to ~1M, ~4M, and ~16M pixels. This is the "how much compute do you want to buy" dial. 1K is fine for testing and composition, 2K is the workhorse, 4K is slow and costs more per call - and on the OpenRouter side of this pack, 4K even gets its own 10-minute timeout.
  • temperature - 0 to 1, default 1.0. The README's own recommendation: 0.0 for deterministic stability, 0.5 as the balanced default, 1.0 for creative randomness. Note that image temperature caps at 1 where chat goes to 2.

The one output is config of type LLM_IMAGE_CONFIG, which goes into the Image node's config input. And here's a behind-the-scenes detail worth knowing: this node sets a use_gemini_image flag that the Image node checks before it will generate. That flag is the entire reason wiring a chat config into the Image node fails with Gemini config required - the pack is enforcing "image params for the image node" for you.

Installing it

# ComfyUI Manager: search "Gemini LiteLLM", Install, restart

# or:
cd ComfyUI/custom_nodes
git clone https://github.com/ZUENS2020/ComfyUI-Gemini-LiteLLM

Zero-dependency pack as usual: no requirements.txt, no pip install, no model files.

Gotchas

Besides the config-type trap mentioned above, the real-world one is the LiteLLM version floor. The image_config mechanism this node relies on needs LiteLLM ~1.80.7 or newer on your server; older versions silently won't have it. If Image Params looks right and the Image node still fails, check your proxy version before touching the prompt. And remember 4K isn't free - test at 1K, then spend on the big one.

CategoryGemini-LiteLLM/Config

Inputs (4)

NameTypeDefaultDescription
base_configLLM_BASE_CONFIG
aspect_ratioCOMBO5 options: 1:1, 16:9, 4:3, 9:16, 3:4
image_sizeCOMBO3 options: 1K, 2K, 4K
temperatureFLOAT1.000–1

Outputs (1)

NameTypeDescription
configLLM_IMAGE_CONFIG