Skutils Resolution Calculator
Resolution from an aspect ratio and a megapixel budget
- width
- height
You know the genre. Flux checkpoint loaded, "16:9" in your head, and you're staring at an Empty Latent Image node wondering what actually goes in the width and height boxes. The wrong answer - 1920×1080, because that's what a screen is - is also the fastest route to double heads and wasted VRAM, since these models were trained on a small set of canonical resolutions, not monitor sizes. Skutils Resolution Calculator is the node that turns two numbers you actually know (an aspect ratio and a target megapixel count) into exact latent dimensions.
It's the same idea as ComfyUI's built-in Resolution Selector, with more reach. The first eight presets use the built-in's exact option strings, so a workflow already built on that node swaps over without changing a thing. Beyond that you get 20 presets spanning the whole family ladder: the SDXL canon (896×1152, 1216×832, 1344×768…), Flux's official 3:4 and 4:3, video-model shapes like 3:5 (768×1280, a HunyuanVideo/LTX staple), and the ultra-wide/ultra-tall tiers down to 32:9. If you juggle SD1.5 and SDXL and Flux in one setup, one node covers all of it.
How it works
Every preset is anchored to the canonical ~1 MP resolution the community actually generates at - 1:1 → 1024×1024, 16:9 → 1344×768, that class of number. Pick a megapixel target and the node scales the anchor up or down, rounds both dimensions to a clean multiple, and - this is the bit people misread - never exceeds your megapixel budget. A square preset always comes back an exact square, and the shape stays closer to your chosen ratio than a naive area-max would.
That cap has a subtle consequence worth knowing. 16:9's canonical 1344×768 is actually ~1.03 MP, which is more than 1.0 MP. So at "1.0", the node hands back 1328×752, just under the budget, instead of the familiar 1344×768. It's not a bug - staying at or under the target is the whole point - but if you specifically want the textbook SDXL value, type it in or use the built-in node. Every other canonical size reproduces exactly at 1.0 MP.
The inputs that matter
- aspect_ratio - the 20 presets, square through 32:9. This is the shape of your image.
- megapixels - 0.5 to 5.0 in 0.5 steps, default 1.0. Your resolution budget; results land at or just under it.
- multiple - the rounding grid, 8/16/32/64/128, default 8, marked advanced. 8 divides all the others, so it works for every model family; the tooltip suggests 16/32/64 for Flux and video models. For Flux specifically, where dimensions are conventionally kept divisible by 64, 64 is the safe pick. SD1.5 generations usually run 0.5–0.6 MP with a multiple of 64.
Outputs are just width and height (both INT). Wire them into an Empty Latent Image's matching inputs and you're done - it's a pure calculator, so it doesn't run anything on its own and adds no VRAM.
Installing it
It's one node inside the ComfyUI-skkut-utils pack, which is a grab-bag of small utilities that install together. ComfyUI Manager: search for skkut-utils. Or:
cd ComfyUI/custom_nodes/
git clone https://github.com/skkut/ComfyUI-skkut-utils.git
Restart ComfyUI and it's in the node menu under utils/resolution. No model downloads, no dependencies beyond ComfyUI itself.
Where people trip
The usual failure isn't this node, it's expecting one magic resolution for every model. Different families genuinely want different budgets - SDXL and Flux live around 1 MP, video models are happier in the 3:5/16:9 band, SD1.5 degrades fast past ~0.6 MP. If a run comes out soft or broken, ask whether the dimensions you chose match what the checkpoint was trained on before you blame the sampler. And remember the cap: set 1.0 MP and you get at most a megapixel, which is exactly why the outputs stay in the model's comfort zone.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 1:1 (Square) | The aspect ratio for the output dimensions. |
| megapixels | COMBO | 1.0 | Target total megapixels (1 MP = 1,000,000 px); the result never exceeds this. |
| multiple | COMBO | 8 | Both dimensions are multiples of this, and the total is at most the selected megapixels. 8 divides 16/32/64, so it works for every model family; use 16/32/64 for Flux and video models. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |