Resolution
The resolution node that actually snaps to your model's multiples
- width
- height
Every image model wants its latents at specific multiples, and nothing kills a generation faster than a width that isn't divisible by 8. SBL_Resolution is the one-stop node for this: 115 presets grouped by aspect ratio, a couple of model-specific preset groups (Qwen 2512 and ZiT), fully custom dimensions, and a multiple_of snapping control so whatever you type comes out aligned to the step your model actually wants. Output is two INTs - width and height - which you feed straight into an Empty Latent or any resolution input.
Here's the mental model. It has two modes:
- Custom mode - you type width/height and pick
multiple_of. Each dimension is snapped independently to the nearest multiple (default 8). Type 1030×1030 withmultiple_ofset to 8 and you get 1032×1032 - the honest tradeoff of independent snapping: dimensions stay valid but the ratio can wobble a pixel or two. - Preset mode - pick a named preset (say
1280x720 (720p)) and the node keeps the ratio locked while snapping. It parses the preset's dimensions, then tests floor/ceil candidates against your width/height and picks the pair that minimizes ratio error - so 16:9 stays 16:9 as closely as the multiple allows, instead of drifting to 1024×576.4. It's the difference between "a number that's divisible" and "a number that's divisible and still the shape I asked for."
The two model groups, Qwen2512 and ZiT, are special: they override everything and return the exact native preset dimensions with no snapping at all, because those numbers are already 8-aligned and already what the model was trained on. It's a nice touch - pick the group, pick the preset, and the model gets exactly its intended canvas.
The inputs that matter
- aspect_group (13 options) - filters the preset list to a category:
Custom,Qwen2512,ZiT,1:1,4:3,16:9,21:9,Phones,Cinema (DCI), and more. - preset (115 options) - the actual dimensions, from
64x64up to7680x4320 (8K UHD)and DCI cinema frames. - width / height (INT, 16–8192) - your custom target; also the targets that ratio-locked presets snap toward.
- multiple_of -
1,2,4,8,16,28,32,64,128. Default 8. The28is there because some video models and workflows want 28-frame alignment, not 8.
Install and troubleshooting
ComfyUI Manager → search SBL, or:
cd ComfyUI/custom_nodes
git clone https://github.com/SoftByteLabs/SBL
Restart after. No pip deps, no model downloads.
A couple of things that trip people up. First, if you pick a preset and then edit width/height, the preset still wins the ratio - the node isn't ignoring you, it's preserving the shape you chose. Second, if the dropdown looks like it's showing presets from the wrong group, that's the frontend filtering the master list by aspect_group; switch the group and the list updates. And the classic: when a model's documentation says "multiple of 16" or "multiple of 64" (some DiTs are pickier than 8), that's exactly what multiple_of is for - one dropdown, no manual width - (width % 16) math.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_group | COMBO | Custom | 13 options: Custom, Qwen2512, ZiT, 1:1 (Square), 4:3 (Classic), 3:2 (Photo), +7 |
| preset | COMBO | Custom | 115 options: Custom, 1328x1328 (1:1), 1664x928 (16:9), 928x1664 (9:16), 1472x1104 (4:3), 1104x1472 (3:4), +109 |
| width | INT | 102416–8192 | — |
| height | INT | 102416–8192 | — |
| multiple_of | COMBO | 8 | 9 options: 1, 2, 4, 8, 16, 28, +3 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |