Visit ComfyUI Online for ready-to-use ComfyUI environment
Intelligently resize images for AI model requirements while maintaining aspect ratio and quality.
The ImageSizeAdjusterV2
node is designed to intelligently adjust the dimensions of an image to meet specific requirements while maintaining its aspect ratio and quality. This node is particularly useful for AI artists who need to prepare images for different model types such as SD, SDXL, and Cascade, which have distinct pixel count requirements. By leveraging this node, you can ensure that your images are resized to fit within the constraints of these models, optimizing them for further processing or analysis. The node offers flexibility through various parameters, allowing you to control the scaling factor, rounding methods, and whether to preserve the original dimensions or force a square aspect ratio. This makes it a powerful tool for managing image sizes efficiently and effectively, ensuring that your images are always ready for the next step in your creative workflow.
This parameter represents the input image that you want to adjust. The image should be in a format that the node can process, typically a multi-dimensional array representing pixel data. The dimensions of the image will be analyzed to determine the necessary adjustments.
The model_type
parameter specifies the target model for which the image is being prepared. Options include 'SD', 'SDXL', and 'Cascade', each corresponding to different total pixel requirements. This parameter is crucial as it determines the target pixel count for the resizing operation.
This parameter defines the factor by which the image dimensions should be divisible. It ensures that the adjusted dimensions are compatible with the downscaling requirements of the target model, helping to maintain image quality and integrity.
The rounding_method
parameter dictates how the new dimensions should be rounded. This can affect the final size of the image and is important for ensuring that the dimensions meet specific criteria or constraints.
This boolean parameter indicates whether the original dimensions of the image should be preserved as much as possible. If set to true, the node will attempt to keep the original width and height, adjusting only as necessary to meet other constraints.
When set to true, this parameter forces the adjusted image to have equal width and height, resulting in a square image. This can be useful for models or applications that require square inputs.
The scaling_factor
allows you to scale the target pixel count by a specific factor, providing additional control over the resizing process. The default value is 1.0, meaning no additional scaling is applied.
This parameter sets the maximum allowable width for the adjusted image. It ensures that the image does not exceed a certain width, which can be important for compatibility with certain models or applications.
Similar to max_width
, this parameter sets the maximum allowable height for the adjusted image. It helps to keep the image within specific height constraints.
The adjusted_width
is the final width of the image after all adjustments have been applied. It reflects the new dimension that meets the specified requirements and constraints.
The adjusted_height
is the final height of the image after adjustments. Like the width, it is calculated to ensure compatibility with the target model and other parameters.
This output represents the scale factor that was applied to the original image to achieve the adjusted dimensions. It provides insight into how much the image was resized.
The original_width
is the width of the input image before any adjustments were made. It is useful for comparison and understanding the extent of the resizing.
The original_height
is the height of the input image before adjustments. It serves a similar purpose as the original width, providing context for the resizing process.
preserve_original
parameter is set to true.scaling_factor
to fine-tune the size of the output image, especially if you need to meet specific pixel count requirements.force_square
parameter to true to automatically adjust the dimensions accordingly.model_type
parameter was set to a value that is not recognized by the node.model_type
is set to one of the supported options: 'SD', 'SDXL', or 'Cascade'.max_width
or max_height
.max_width
and max_height
parameters and adjust them to accommodate the desired image size.downscale_factor
does not divide evenly into the adjusted dimensions.downscale_factor
to ensure it is compatible with the desired image dimensions.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.