Visit ComfyUI Online for ready-to-use ComfyUI environment
Simplify image aspect ratios with AI artist-friendly Ratio Calculator node, ensuring visual consistency effortlessly.
The Ratio Calculator node is designed to simplify the process of determining the aspect ratio of an image by analyzing its dimensions. This node is particularly useful for AI artists who need to maintain specific aspect ratios for their creative projects. By calculating the greatest common divisor (GCD) of the image's width and height, the node simplifies these dimensions to their smallest possible ratio. It then compares this simplified ratio against a predefined set of common aspect ratios to find the closest match. This functionality is essential for ensuring that images conform to desired proportions, which is crucial for maintaining visual consistency across different media formats. The Ratio Calculator is a valuable tool for artists who want to ensure their images are correctly proportioned without needing to manually calculate or guess the aspect ratio.
The image
parameter is the sole input for the Ratio Calculator node. It represents the image whose aspect ratio you wish to calculate. The function of this parameter is to provide the node with the necessary data to analyze the image's dimensions. The impact of this parameter on the node's execution is significant, as the accuracy of the aspect ratio calculation depends on the dimensions of the provided image. There are no specific minimum, maximum, or default values for this parameter, as it simply requires an image input. The image should be in a format that the node can process, typically a standard image file format like JPEG or PNG.
The ratio
output parameter provides the closest matching aspect ratio for the input image. This output is crucial as it informs you of the aspect ratio that best fits the dimensions of the image you provided. The importance of this output lies in its ability to help you maintain consistent visual proportions across your work, ensuring that images are displayed correctly in various contexts. The output value is a string representing the aspect ratio, such as "16:9" or "4:3", which you can use to adjust or verify the proportions of your images.
<minimum_ratio_str>
(<minimum_ratio>
), but was <aspect_ratio>
(<calculated_ratio>
).<maximum_ratio_str>
(<maximum_ratio>
), but was <aspect_ratio>
(<calculated_ratio>
).RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.