Nodes/Ideogram 4 Prompter/Ideogram 4 Resolution Selector
ComfyUI Node

Ideogram 4 Resolution Selector

The Ideogram 4 resolution calculator that does the math for you

By Saganaki22·Created 3 months ago·Updated 3 months ago· 13
Ideogram 4 Resolution Selector
    • width
    • height
    • aspect_ratio_text
    aspect_ratio1x1
    megapixels1.0

    Ideogram 4 has a party trick most diffusion models don't: one set of weights handles everything from an ultra-wide banner to a phone wallpaper, with flexible aspect ratios up to 6:1 and no extra LoRA or model. That's great, except your sampler still wants concrete numbers - width and height in pixels, not a ratio string. The Ideogram4ResolutionSelector is the three-line node that converts "16x9" and a megapixel target into real dimensions, rounded to a multiple of 8. It's boring math, and that's exactly why it's useful: you stop hand-calculating resolutions and start iterating.

    How it works

    You give it two things: an aspect ratio and a target megapixel count. It works out the total pixel budget (megapixels × 1024 × 1024), scales it by the ratio, and rounds each side to a multiple of 8. At the default of 1.0 MP and a square ratio you get 1024×1024, which is the handy mental model the tooltip gives you. Drop megapixels to 0.5 and it shrinks accordingly; push it toward the 16 MP ceiling and it grows. No model files, no network, no API key - it's pure arithmetic, so it runs instantly and can't really break.

    The inputs

    Only two, and a beginner sets neither most of the time:

    • aspect_ratio - a combo of the 17 exact Ideogram 4 ratios (1x4 through 4x1, default 1x1). Note there's no AUTO here. If you want Ideogram to pick the ratio, that's the job of the sibling Ideogram 4 Magic Prompt node: set that to AUTO, and it resolves the ratio for you - then connect its aspect_ratio output to this input. Left unconnected, the selector just sits at 1x1.
    • megapixels - a float from 0.1 to 16 (step 0.1), default 1.0. This is the "how big do you actually want it" control, and 1.0 MP is the sane starting point for Ideogram 4's ~1.5 MP sweet spot.

    The outputs

    • width and height - the calculated pixel dimensions as INTs, each a multiple of 8. These feed straight into your Ideogram sampler's width/height inputs.
    • aspect_ratio_text - the ratio as a plain STRING, for text-preview or display nodes that want to show what's selected.

    One small honesty note: Ideogram's model card lists multiples of 16 as the native pixel grid, and this node rounds to multiples of 8. In practice that's a non-issue for most samplers, but if you're being strict about the native grid, nudge the megapixels value or round manually.

    Install

    Same pack as the Magic Prompt node - you get both in one go. ComfyUI Manager: search Ideogram 4 Prompter and install, then restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Saganaki22/ideogram4_prompter-ComfyUI.git
    

    Restart ComfyUI and you're done. The pack has zero Python dependencies (stdlib math only - the requirements.txt is deliberately empty), no models to download, nothing to configure. It's from the same author as the Zonos2 and Higgs v3 TTS packs, and it shows in how small and focused the code is.

    Troubleshooting

    Honestly, there's almost nothing to go wrong with a node that's a calculator. The one real gotcha is feeding it something that isn't one of the 17 ratios - the combo enforces that on the UI, and if a connected node passes through a malformed string the node normalizes what it can and falls back to 1x1 rather than crashing. The other is expecting AUTO here, which doesn't exist; remember the resolution comes from the Magic Prompt node when you want Ideogram to choose.

    It won't change your life on its own. But paired with the Magic Prompt node's aspect_ratio output, it closes the loop on "Ideogram picked a ratio and I need pixels" with zero thought - which is exactly what a utility node should do.

    CategoryIdeogram

    Inputs (2)

    NameTypeDefaultDescription
    aspect_ratioCOMBO1x1Exact Ideogram 4 aspect ratio. Can be connected from Ideogram 4 Magic Prompt.
    megapixelsFLOAT1.00.1–16Target total megapixels. 1.0 MP is about 1024x1024 for square.

    Outputs (3)

    NameTypeDescription
    widthINTCalculated width in pixels, rounded to a multiple of 8.
    heightINTCalculated height in pixels, rounded to a multiple of 8.
    aspect_ratio_textSTRINGThe selected Ideogram 4 aspect ratio as text for preview nodes.