Visit ComfyUI Online for ready-to-use ComfyUI environment
Calculate and output image aspect ratio in simplified format, compute dimensions based on megapixel count, generate latent representations for Flux/SDXL and SD3.5 models.
The Starnodes_Aspect_Ratio_Advanced
node is designed to enhance your image processing workflow by calculating and outputting the aspect ratio of an image in a simplified integer format, such as '3x4'. This node not only provides the aspect ratio but also computes the dimensions based on a specified megapixel count, ensuring that your images maintain the desired resolution. Additionally, it offers advanced functionality by generating latent representations for different models like Flux/SDXL and SD3.5, which are crucial for further image processing tasks. This node is particularly beneficial for AI artists who need to maintain specific aspect ratios and resolutions while working with various image models, providing a seamless and efficient way to manage image dimensions and latent space requirements.
This optional parameter allows you to input an image for which the aspect ratio will be calculated. If provided, the node can determine the nearest predefined aspect ratio to the image's actual ratio, enhancing the accuracy of the output dimensions.
This required parameter lets you select from a list of predefined aspect ratios, excluding the 'Free Ratio'. It determines the target aspect ratio for the output dimensions. The available choices are loaded from a configuration file, ensuring flexibility and adaptability to various artistic needs.
This parameter specifies the desired resolution in megapixels for the output image. It influences the total number of pixels in the output dimensions, with options ranging from 0.1 to 4.0 megapixels. The default value is set to 1.0 megapixels, providing a balance between image quality and processing efficiency.
A boolean parameter that, when set to true, enables the node to automatically select the closest predefined aspect ratio to the input image's actual aspect ratio. This feature is particularly useful when working with images of varying dimensions, ensuring consistency in output.
This parameter defines the number of images to process simultaneously, with a default value of 1. It supports a range from 1 to 4096, allowing for batch processing of images, which can significantly speed up workflows when dealing with large datasets.
This output provides the calculated width of the image based on the selected aspect ratio and megapixel count. It is an integer value that represents the horizontal dimension of the output image.
This output gives the calculated height of the image, complementing the width to maintain the specified aspect ratio. It is an integer value representing the vertical dimension of the output image.
This output is a string that combines the width and height into a readable format, such as '1920 x 1080', providing a quick reference to the image's dimensions.
This output provides a latent representation of the image for use with the Flux/SDXL model. It is a tensor with dimensions adjusted to fit the model's requirements, facilitating further processing in the latent space.
Similar to the SDXL / FLUX output, this provides a latent representation tailored for the SD3.5 model. It ensures compatibility with the model's input specifications, enabling seamless integration into your image processing pipeline.
use_nearest_from_image
parameter to automatically adjust the aspect ratio based on the input image, ensuring that your output dimensions are as close as possible to the original image's proportions.megapixel
settings to find the optimal balance between image quality and processing speed, especially when working with high-resolution images.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.