Resolution Selector Extended (Legacy)
Stop doing the aspect-ratio math in your head
- width
- height
Here's the workflow moment everyone knows: you're setting up an Empty Latent Image for a Flux 2 or Z-Image run, you want a portrait-ish 0.8 megapixel crop, and you're doing sqrt(0.8M * aspect) in your head while hoping the result lands on a multiple of 8. This node is the head-math replacement: pick an aspect ratio, set a megapixel target, and it hands you width and height - rounded to a pixel multiple, so the numbers actually work with the VAE and tiling.
How it works
Pick the aspect ratio from the combo (1:1 (Square) is the default, and the list covers the usual photography and video shapes), set megapixels (0.1–16, default 1.0 ≈ 1024×1024 square), and set multiple (default 8) - the node computes width and height so the total pixel count hits your target, then snaps both dimensions to the multiple. The math is straightforward: it scales the ratio's bounding box to your megapixel total, rounds to the multiple, and has a guard that refuses to return a sub-256 side.
The three inputs that matter:
- aspect_ratio - the shape you want.
- megapixels - the total pixel budget. This is the one you'll fiddle with most; 1.0 is the sweet spot for a lot of LLM-encoded models, which tend to top out around 1–2MP before quality drifts.
- multiple - pixel alignment. 8 is the safe default; bump it to 16 or 64 if you're doing heavy tiling where misalignment costs you seams.
Outputs are two INTs, width and height, which wire straight into Empty Latent Image.
Why "megapixels" instead of fixed presets
Modern diffusion models are trained with a native resolution budget in mind, and the community has largely moved from "one resolution fits all" to "match the target area to the model." A megapixel slider is the ergonomic way to do that - you keep the aspect, scale the area up or down, and never think about pixel counts again. It's the same idea as the resolution pickers that ship in ComfyUI proper, just with the multiple alignment exposed as a control.
Where people get burned
- Don't chase 16MP. The slider goes there, but most local models aren't trained for it; you'll get OOMs or mush. 1–2MP is the practical band for the LLM-encoded generation models of the last year or two.
- The multiple is a hard snap. If your target area doesn't divide cleanly, the node rounds to the nearest aligned value, so the actual megapixels won't be exactly what you typed. That's expected behavior, not a bug.
- Minimum side is 256. Very wide aspect ratios at tiny megapixel targets get clamped up so you never feed a degenerate 200px-tall latent.
- It's for setting dimensions, not for cropping - if you're adjusting an existing image, look at the pack's crop/resize nodes instead.
Installing it
Ships in silveroxides/ComfyUI-UtilsCollection. ComfyUI Manager: search ComfyUI-UtilsCollection, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
cd ComfyUI-UtilsCollection
pip install -r requirements.txt # opencv-python, typing-extensions
Restart and it's registered. No model files needed. It's a small, newer utility pack (AGPL-3.0, mid-2026) from the same author as ComfyUI-ModelUtils and convert_to_quant - the "(Legacy)" alias you found corresponds to canonical UC_ResolutionSelectorExtended, same behavior either way.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 1:1 (Square) | The aspect ratio for the output dimensions. |
| megapixels | FLOAT | 1.00.1–16 | Target total megapixels. 1.0 MP ≈ 1024×1024 for square. |
| multiple | INT | 88–128 | Round the selected resolution to this pixel multiple. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | Calculated width in pixels multiplied by the selected multiple. |
| height | INT | Calculated height in pixels multiplied by the selected multiple. |