Visit ComfyUI Online for ready-to-use ComfyUI environment
Calculate optimal image resolution based on target dimensions and predefined aspect ratios for maintaining quality and proportions.
The SDXL Recommended Resolution Calc (JPS) node is designed to help you determine the most suitable resolution for your images based on a target width and height. This node calculates the closest matching resolution from a set of predefined aspect ratios, ensuring that your images maintain their intended quality and proportions. By comparing the target aspect ratio with a list of accepted horizontal, vertical, and square ratios, the node identifies the best match and returns the recommended resolution. This functionality is particularly useful for AI artists who need to optimize their images for various display formats without manually adjusting dimensions.
The target width parameter specifies the desired width of the image. It is an integer value that represents the width in pixels. The node uses this value to calculate the aspect ratio and find the closest matching resolution. The minimum value is 256, the maximum value is 8192, and the default value is 1024.
The target height parameter specifies the desired height of the image. It is an integer value that represents the height in pixels. Similar to the target width, this value is used to calculate the aspect ratio and determine the best matching resolution. The minimum value is 256, the maximum value is 8192, and the default value is 1024.
The SDXL_width parameter represents the recommended width for the image based on the closest matching aspect ratio. This output value is an integer that indicates the width in pixels, ensuring that the image maintains its quality and proportions.
The SDXL_height parameter represents the recommended height for the image based on the closest matching aspect ratio. This output value is an integer that indicates the height in pixels, ensuring that the image maintains its quality and proportions.
© Copyright 2024 RunComfy. All Rights Reserved.