Visit ComfyUI Online for ready-to-use ComfyUI environment
Resize images while maintaining aspect ratio for AI artists, offering flexibility in scaling dimensions.
The ImageScaleDownToSize
node is designed to resize images to a specified dimension while maintaining the aspect ratio. This node is particularly useful for AI artists who need to standardize image sizes for consistency in their projects. By scaling down images to a target size, it ensures that the images fit within the desired dimensions without distortion. The node offers flexibility by allowing you to choose whether the scaling is based on the maximum or minimum dimension of the image, providing control over how the image is resized. This functionality is essential for preparing images for further processing or for creating uniform image sets.
This parameter accepts the images that you want to scale down. The images should be in a format that the node can process, typically tensors representing the image data.
This integer parameter specifies the target size for the image scaling. The default value is 512, with a minimum value of 1 and a maximum value defined by MAX_RESOLUTION
. This size determines the dimension to which the image will be scaled down, either based on the maximum or minimum dimension of the original image, depending on the mode selected.
This boolean parameter allows you to choose the scaling mode. When set to True
(labelled as "max"), the image is scaled down based on its maximum dimension. When set to False
(labelled as "min"), the image is scaled down based on its minimum dimension. The default value is True
.
The output is the scaled-down image. This image retains the aspect ratio of the original but fits within the specified size constraints. The output format is consistent with the input format, typically a tensor representing the image data.
size
parameter is set appropriately for your project's needs. For example, if you are preparing images for a web gallery, a size of 512 might be suitable.mode
parameter to control how the image is scaled. If you want to ensure that the longest side of the image fits within the specified size, set mode
to True
. If you want the shortest side to fit, set mode
to False
.size
parameter is set to a value outside the allowed range.size
parameter to be within the range of 1 to MAX_RESOLUTION
.mode
parameter is not set to a valid boolean value.mode
parameter is set to either True
or False
.© Copyright 2024 RunComfy. All Rights Reserved.