Ideogram 4 Resolution Selector
The Ideogram 4 resolution calculator that does the math for you
- width
- height
- aspect_ratio_text
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 (1x4through4x1, default1x1). Note there's noAUTOhere. If you want Ideogram to pick the ratio, that's the job of the siblingIdeogram 4 Magic Promptnode: set that toAUTO, and it resolves the ratio for you - then connect itsaspect_ratiooutput to this input. Left unconnected, the selector just sits at1x1.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
widthandheight- the calculated pixel dimensions asINTs, each a multiple of 8. These feed straight into your Ideogram sampler's width/height inputs.aspect_ratio_text- the ratio as a plainSTRING, 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.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 1x1 | Exact Ideogram 4 aspect ratio. Can be connected from Ideogram 4 Magic Prompt. |
| megapixels | FLOAT | 1.00.1–16 | Target total megapixels. 1.0 MP is about 1024x1024 for square. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| width | INT | Calculated width in pixels, rounded to a multiple of 8. |
| height | INT | Calculated height in pixels, rounded to a multiple of 8. |
| aspect_ratio_text | STRING | The selected Ideogram 4 aspect ratio as text for preview nodes. |