Visit ComfyUI Online for ready-to-use ComfyUI environment
Generate image resolutions based on aspect ratios and orientations for AI artists, ensuring consistency and optimization for various media formats.
The Resolutions by Ratio (WLSH) node is designed to help you generate image resolutions based on specific aspect ratios and orientations. This node is particularly useful for AI artists who need to create images with precise dimensions that adhere to common aspect ratios, such as 16:9 for widescreen or 1:1 for square images. By inputting an aspect ratio, a direction (landscape or portrait), and a short side length, the node calculates the corresponding width and height, ensuring the resulting resolution is aligned with your desired specifications. This functionality is essential for maintaining consistency across different media formats and optimizing images for various display devices.
The aspect
parameter allows you to select the desired aspect ratio for your image. It offers a range of predefined ratios such as "1:1", "16:9", "4:3", and more. This parameter determines the proportional relationship between the width and height of the image. Choosing the correct aspect ratio is crucial for ensuring that your image fits well within the intended display format.
The direction
parameter specifies the orientation of the image, either "landscape" or "portrait". In landscape mode, the width is greater than the height, making it suitable for wide displays. In portrait mode, the height is greater than the width, which is ideal for vertical displays. This parameter helps you tailor the image orientation to match the specific requirements of your project.
The shortside
parameter defines the length of the shorter side of the image in pixels. It accepts integer values with a default of 512, a minimum of 64, and a maximum defined by MAX_RESOLUTION
. This parameter is essential for scaling the image while maintaining the chosen aspect ratio. Adjusting the short side length allows you to control the overall size of the image.
The width
parameter represents the calculated width of the image based on the provided aspect ratio, direction, and short side length. This value is automatically adjusted to ensure it is a multiple of 64, which is often required for compatibility with various image processing tools and frameworks.
The height
parameter represents the calculated height of the image based on the provided aspect ratio, direction, and short side length. Similar to the width, this value is determined to maintain the specified aspect ratio and orientation.
shortside
parameter to scale your image to the desired size while maintaining the chosen aspect ratio.shortside
value is outside the allowed range.shortside
value is between 64 and the maximum resolution defined by MAX_RESOLUTION
.© Copyright 2024 RunComfy. All Rights Reserved.