Visit ComfyUI Online for ready-to-use ComfyUI environment
Intelligently resize images while maintaining aspect ratio and quality for AI model preparation.
The ImageSizeAdjusterV3
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, by resizing them to fit within predefined pixel limits. The node offers flexibility by allowing you to specify parameters like downscale factors, rounding methods, and maximum dimensions, ensuring that the resized image meets your exact needs. Additionally, it provides options to preserve the original dimensions or force the image into a square shape, making it a versatile tool for various image processing tasks. By using this node, you can efficiently manage image sizes, optimize them for different AI models, and ensure that they are ready for further processing or analysis.
The image
parameter represents the input image that you want to resize. It is crucial as it serves as the base for all resizing operations performed by the node. The image should be in a format that the node can process, typically a multi-dimensional array representing pixel data.
The model_type
parameter specifies the type of model for which the image is being prepared. It influences the target pixel count for resizing. Options include 'SD', 'SDXL', and 'Cascade', each corresponding to different pixel dimensions. Choosing the correct model type ensures that the image is resized appropriately for the intended model.
The downscale_factor
parameter determines the factor by which the image dimensions should be divisible. This ensures that the resized image dimensions are compatible with certain processing requirements. It is a crucial parameter for maintaining the integrity of the image during resizing.
The rounding_method
parameter dictates how the node should handle rounding when adjusting image dimensions. This can affect the final size of the image and is important for achieving precise control over the resizing process.
The preserve_original
parameter is a boolean that, when set to true, attempts to maintain the original dimensions of the image as closely as possible. This is useful when you want to resize the image but still keep its original aspect ratio intact.
The force_square
parameter, when enabled, forces the image to be resized into a square shape. This is particularly useful for applications that require square images, ensuring that the output meets specific format requirements.
The scaling_factor
parameter allows you to scale the target pixel count by a specific factor. This provides additional control over the resizing process, enabling you to increase or decrease the size of the image based on your needs. The default value is 1.0, meaning no additional scaling is applied.
The max_width
parameter sets the maximum allowable width for the resized image. It ensures that the image does not exceed a certain width, which is important for maintaining compatibility with specific applications or models. The default maximum width is 2048 pixels.
The max_height
parameter sets the maximum allowable height for the resized image. Similar to max_width
, it ensures that the image does not exceed a certain height, maintaining compatibility with specific applications or models. The default maximum height is 2048 pixels.
The adjusted_width
parameter represents the final width of the resized image. It is calculated based on the input parameters and ensures that the image meets the specified requirements while maintaining its aspect ratio.
The adjusted_height
parameter represents the final height of the resized image. Like adjusted_width
, it is determined by the input parameters and ensures that the image is resized correctly.
The applied_scale
parameter indicates the scale factor that was applied to the original image to achieve the resized dimensions. This value is useful for understanding how much the image was scaled during the resizing process.
The original_width
parameter provides the width of the input image before any resizing was applied. It is useful for reference and comparison with the adjusted dimensions.
The original_height
parameter provides the height of the input image before any resizing was applied. It serves as a reference point for understanding the changes made to the image dimensions.
preserve_original
parameter is set to true.force_square
parameter when you need to prepare images for applications that require square dimensions, such as certain social media platforms.scaling_factor
to fine-tune the size of your image, especially when preparing images for models with specific pixel requirements.max_width
and max_height
values to prevent your images from exceeding the dimensions supported by your target application or model.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 to accommodate larger dimensions or reduce the scaling factor to fit within the limits.downscale_factor
is not a divisor of the calculated dimensions, leading to rounding issues.downscale_factor
that is compatible with the desired dimensions or adjust the rounding method to better handle the discrepancy.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.