Nodes/AAA Metadata System/Aspect Ratio for 2step Latent Sample
ComfyUI Node

Aspect Ratio for 2step Latent Sample

Calculate width and height for 2-step latent sampling based on aspect ratio and base resolution. All outputs are divisible by 16.

By EricRollei·Created 9 months ago·Updated 8 months ago· 12
Aspect Ratio for 2step Latent Sample
  • image
  • width
  • height
  • ratio_string
  • ratio_float
base_resolution512
aspect_ratio1:1 Square
Categoryimage/preprocessing

Inputs (3)

NameTypeDefaultDescription
base_resolutionCOMBO512Base resolution for the shorter side (256-1024 in 64-step increments)
aspect_ratioCOMBO1:1 SquareSelect aspect ratio. Ignored if image is connected.
imageoptIMAGEOptional input image. If provided, its aspect ratio will be used instead of the dropdown selection.

Outputs (4)

NameTypeDescription
widthINT
heightINT
ratio_stringSTRING
ratio_floatFLOAT