Skip to main content
The Resolution Selector node calculates the pixel width and height for an image based on a chosen aspect ratio and a target total resolution in megapixels. It is useful for generating consistent dimensions for other nodes, such as the Empty Latent Image node. The output dimensions are always rounded to the nearest multiple of 8.

Inputs

ParameterDescriptionData TypeRequiredRange
aspect_ratioThe aspect ratio for the output dimensions (default: "1:1 (Square)").COMBOYes"1:1 (Square)"
"3:2 (Photo)"
"4:3 (Standard)"
"16:9 (Widescreen)"
"21:9 (Ultrawide)"
"2:3 (Portrait Photo)"
"3:4 (Portrait Standard)"
"9:16 (Portrait Widescreen)"
megapixelsTarget total megapixels. 1.0 MP ≈ 1024×1024 for a square aspect ratio (default: 1.0).FLOATYes0.1 - 16.0

Outputs

Output NameDescriptionData Type
widthThe calculated width in pixels, which is a multiple of 8.INT
heightThe calculated height in pixels, which is a multiple of 8.INT
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): 7b27f0ffaaa1740a6371e53f10fa6a0ead3237ecec656b9148a2ecd11de7aaa5