Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.comfy.org/llms.txt

Use this file to discover all available pages before exploring further.

This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub
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

ParameterData TypeRequiredRangeDescription
aspect_ratioCOMBOYes"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)"
The aspect ratio for the output dimensions (default: "1:1 (Square)").
megapixelsFLOATYes0.1 - 16.0Target total megapixels. 1.0 MP ≈ 1024×1024 for a square aspect ratio (default: 1.0).

Outputs

Output NameData TypeDescription
widthINTThe calculated width in pixels, which is a multiple of 8.
heightINTThe calculated height in pixels, which is a multiple of 8.

Source fingerprint (SHA-256): 7b27f0ffaaa1740a6371e53f10fa6a0ead3237ecec656b9148a2ecd11de7aaa5