ITL Resolution Selector
A resolution picker that knows your model's rules (and your aspect ratios)
- width
- height
Every diffusion model has resolution rules, and almost none of them are the same. SD 1.5-era models want multiples of 64, most samplers tolerate multiples of 8, and Ideogram 4 insists on multiples of 16 within a 256–2048 pixel range per side. Type 1025×1024 into an Empty Latent and you've already handed the model a subtly broken input. The ITL Resolution Selector exists so you pick an aspect ratio and a target size, and get back width/height that actually satisfy whatever model profile you're running.
It's a plumbing node - two INT outputs, zero image processing - but it's the kind of plumbing that quietly prevents a whole class of "why does my image look off" problems.
How it works
You pick a profile, a resolution mode, and an aspect ratio, and the node computes width/height snapped to the profile's multiple. Three things drive it:
- profile -
defaultdoes no clamping, it just snaps each side tosnap_multiple(default 8, which is what most diffusion samplers need). The Ideogram 4 profile is stricter: multiples of 16, clamped to 256–2048 px per side, and it shows a "clamped to keep aspect" warning when a request exceeds the cap.defaultis the default so the node is safe to drop into any workflow. - resolution_mode -
raw(type width/height directly),auto(pick a ratio, edit one side, the other follows), ormegapixel(target megapixels + ratio, both sides computed). Megapixel is the default and the one most people end up using. - aspect_ratio + orientation - named presets from 1:1 Square out to 3:1 Wide Panorama, including 21:9 Cinemascope. The list is square + landscape only; the ⟷ flip button transposes to portrait (16:9 → 9:16), so there's no duplicated 1:1.
The readout shows the resulting W × H, the megapixel count, and the effective ratio + orientation, and the math is mirrored between the Python node and the front-end JS so the number you see is the number that runs.
What you actually touch
- snap_multiple (default 8) - leave it alone unless your model needs a different step. Model profiles like Ideogram 4 override it with their own multiple anyway.
- megapixels - the target size; note Ideogram 4 still clamps at ~4.19 MP (2048×2048), so cranking this past 4 won't help with that profile.
- width / height - editable in raw and auto mode, computed in megapixel mode.
Outputs are width and height (both INT). The obvious wiring: into an Empty Latent (Image) for most models, or into the ITL Ideogram 4 Prompt Builder's width/height inputs, where edits push into the builder's canvas live and also apply on execution.
Installing it
ComfyUI Manager (search "ComfyUI-IntoTheLatent-Utils") or:
cd ComfyUI/custom_nodes
git clone https://github.com/Into-The-Latent/ComfyUI-IntoTheLatent-Utils
then restart. No extra dependencies beyond what ComfyUI already ships.
Is this node essential? No - if you're only ever generating 1024×1024 you don't need it. But the moment you're doing banners, posters, or phone-wallpaper crops, a ratio-driven picker that knows Ideogram 4's rules beats doing the math in your head. Just remember the pack ships no support (issues are closed on the repo), so if the clamp behavior surprises you, the answer is in the tooltip.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| profile | COMBO | default | Model ruleset. 'default' = no clamp, snaps to 'snap_multiple'. 'Ideogram 4' = multiples of 16, 256-2048 px. |
| resolution_mode | COMBO | megapixel | 'raw' = type width/height; 'auto' = pick a ratio and edit either side; 'megapixel' = pick a target megapixels + ratio; 'input' = keep the exact ratio of the width/height inputs at the megapixel target (selected automatically when both are connected). All snap to the profile. |
| aspect_ratio | COMBO | 1:1 (Square) | Target aspect ratio for 'auto' and 'megapixel'. Square + landscape only; use the flip button (orientation) for portrait. Ignored by 'input', which detects the ratio from the width/height inputs. |
| megapixels | FLOAT | 1.00.1–16 | Target size in megapixels for 'megapixel' and 'input' modes. (Ideogram 4 still clamps to ~4.19 MP at 2048x2048.) |
| width | INT | 102464–16384 | Width. Editable in 'raw' and 'auto'; computed in 'megapixel'. In 'input' it is the SOURCE width the aspect ratio is detected from — connect it. Snapped to the multiple. |
| height | INT | 102464–16384 | Height. Editable in 'raw' and 'auto'; computed in 'megapixel'. In 'input' it is the SOURCE height the aspect ratio is detected from — connect it. Snapped to the multiple. |
| snap_multiple | INT | 81–1024 | Round each side to a multiple of this. Most diffusion models require multiples of 8, so keep it at 8 unless your model needs otherwise. Ignored by model profiles that define their own multiple (Ideogram 4 = 16). |
| orientation | COMBO | landscape | Landscape or portrait. Toggled by the '⟷' flip button in the editor; portrait transposes the selected ratio (16:9 -> 9:16). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |