ComfyUI Node
Best-Res (ratio)
A more advanced node for easier selection of an optimal resolution: image size selected indirectly - by one of the sides + aspect ratio.
Best-Res (ratio)
- width
- height
◄size1024►
◄step48►
◄size_is_bigtrue►
◄landscapetrue►
◄aspect_a16►
◄aspect_b9►
CategoryBest Resolution
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| size | INT | 10241–9223372036854776000 | Approximate size of one of the image sides. Which one - see the 'size_is_big' and 'landscape' toggles. |
| step | INT | 481–9223372036854776000 | Both width and height will be divisible by this value - by rounding them to the closest appropriate resolution. The default 48 is (8 * 3 * 2), so it's a safe choice because: - it's compatible with SD1.5/XL downsampling factor (divisible by 8), - it can be upscaled by x1.5 or x1.333 at the first iteration, which is optimal for latent-upscale, - after x1.5 upscale, if you only do x2 later (it's OK for already high resolutions) - it will be divisible by 3 AND 9, which might become handy at that point, where you'll probably use UltimateSDUpscale. Other values worth trying first: 64, 96, 128. |
| size_is_big | BOOLEAN | true | When ON, size parameter represents the bigger image side. When OFF, it specifies the smaller one. |
| landscape | BOOLEAN | true | Specifies image orientation: When ON, width is bigger (image is horizontal). When OFF, height is bigger (image is vertical). |
| aspect_a | FLOAT | 16 | Two aspects together define an aspect ratio (16:9, 4:3, etc). Order doesn't matter: image orientation is defined by the 'landscape' toggle. The specified aspect ratio is APPROXIMATE: step parameter has priority over the exact image proportions. |
| aspect_b | FLOAT | 9 | Two aspects together define an aspect ratio (16:9, 4:3, etc). Order doesn't matter: image orientation is defined by the 'landscape' toggle. The specified aspect ratio is APPROXIMATE: step parameter has priority over the exact image proportions. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |