Skip to main content
The Resolution Selector node calculates pixel width and height 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.

Inputs

ParameterDescriptionData TypeRequiredRange
aspect_ratioThe aspect ratio for the output dimensions (default: "1:1 (Square)").COMBOYes"1:1 (Square)"
"2:3 (Portrait Photo)"
"3:2 (Photo)"
"3:4 (Portrait Standard)"
"4:3 (Standard)"
"9:16 (Portrait Widescreen)"
"16:9 (Widescreen)"
"21:9 (Ultrawide)"
megapixelsTarget total megapixels. 1.0 MP ≈ 1024x1024 for square (default: 1.0).FLOATYes0.1 - 16.0
multipleNearest multiple of the result to set the selected resolution to (default: 8).INTNo8 - 128 (step: 4)

Outputs

Output NameDescriptionData Type
widthCalculated width in pixels multiplied by the selected multiple.INT
heightCalculated height in pixels multiplied by the selected multiple.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): 2060bbeb6583f09014045a19462cf22a231975831b1b3b6d9374753030857e1b