Visit ComfyUI Online for ready-to-use ComfyUI environment
Resize images based on shorter side length to maintain aspect ratio, ideal for AI artists needing uniform upscaling.
The Image Scale by Shortside (WLSH) node is designed to resize an image based on the length of its shorter side, ensuring that the aspect ratio is maintained. This node is particularly useful for AI artists who need to upscale images to a specific dimension while preserving the original proportions. By focusing on the shorter side, the node ensures that the image is scaled uniformly, preventing any distortion. This method is beneficial for preparing images for further processing or for achieving a consistent output size across different images. The node supports various upscaling methods, providing flexibility in how the image is resized.
This parameter accepts the input image that you want to upscale. The image should be in a format that the node can process, typically a tensor representation of the image.
This parameter determines the method used for upscaling the image. The available options are nearest-exact
, bilinear
, and area
. Each method has its own characteristics: nearest-exact
is fast and simple but may produce blocky results, bilinear
provides smoother results by averaging pixel values, and area
is suitable for downscaling as it calculates the average pixel value in the area.
This parameter specifies the desired length of the shorter side of the image after upscaling. It accepts integer values with a default of 512, a minimum of 32, and a maximum of 4096, in steps of 32. Adjusting this value will scale the image proportionally based on the shorter side.
This output is the upscaled image, resized according to the specified shortside length and the chosen upscaling method. The image maintains its original aspect ratio.
This output provides the width of the upscaled image. It is calculated based on the scaling factor applied to the original image's dimensions.
This output provides the height of the upscaled image. Similar to the width, it is determined by the scaling factor applied to the original image's dimensions.
bilinear
method for smoother transitions between pixels.area
method if you are downscaling images, as it provides better results by averaging pixel values.shortside
value is appropriate for your desired output size to avoid excessive upscaling or downscaling, which can affect image quality.shortside
parameter is set to a value outside the allowed range.shortside
value is within the range of 32 to 4096 and is a multiple of 32.nearest-exact
, bilinear
, or area
.© Copyright 2024 RunComfy. All Rights Reserved.