Visit ComfyUI Online for ready-to-use ComfyUI environment
Resize images within specified dimensions, maintaining aspect ratio and visual appeal with various interpolation methods.
The ImageTransformResizeClip
node is designed to resize images while ensuring they fit within specified maximum and minimum dimensions. This node is particularly useful for AI artists who need to standardize image sizes without distorting the aspect ratio. By setting boundaries for width and height, the node intelligently scales the image up or down, maintaining its original proportions. This ensures that the resized image remains visually appealing and suitable for further processing or display. The node supports various interpolation methods, allowing you to choose the most appropriate one for your specific needs, whether you require high-quality resizing or faster performance.
This parameter expects a list of images to be resized. The images should be in a format that the node can process, typically tensors representing the image data.
This integer parameter sets the maximum allowable width for the resized image. The default value is 1024. If the image's width exceeds this value, it will be scaled down to fit within this limit while maintaining the aspect ratio.
This integer parameter sets the maximum allowable height for the resized image. The default value is 1024. If the image's height exceeds this value, it will be scaled down to fit within this limit while maintaining the aspect ratio.
This integer parameter sets the minimum allowable width for the resized image. The default value is 0. If the image's width is below this value, it will be scaled up to meet this minimum requirement while maintaining the aspect ratio.
This integer parameter sets the minimum allowable height for the resized image. The default value is 0. If the image's height is below this value, it will be scaled up to meet this minimum requirement while maintaining the aspect ratio.
This parameter allows you to choose the interpolation method used for resizing. The available options are lanczos
, bicubic
, hamming
, bilinear
, box
, and nearest
. Each method offers different trade-offs between quality and performance, allowing you to select the one that best fits your needs.
The output is a list of resized images that fit within the specified maximum and minimum dimensions. The images are resized while maintaining their original aspect ratio, ensuring they remain visually consistent and suitable for further use.
lanczos
or bicubic
methods for interpolation, especially when dealing with high-resolution images.nearest
or bilinear
methods can be more efficient, though they may result in lower quality.min_width
and min_height
parameters are set to reasonable values to avoid unnecessary upscaling, which can degrade image quality.ValueError: min_width cannot be greater than or equal to max_width
min_width
parameter is less than the max_width
parameter.ValueError: min_height cannot be greater than or equal to max_height
min_height
parameter is less than the max_height
parameter.TypeError: Unsupported image format
© Copyright 2024 RunComfy. All Rights Reserved.