EasyUse/Imagegenerated

Image Scale Down To Size(imageScaleDownToSize)

Image Scale Down To Size node from ComfyUI-Easy-Use.

image Scale Down To Size

images
IMAGE
size
INT
mode
Easy Use

Image Scale Down To Size downsizes an image or a batch of images to a target pixel size while preserving the original aspect ratio. As the node name suggests, it is meant for scaling down, so images that are already smaller than the requested size are not enlarged.

Inputs

  • images (IMAGE): The input image or batch of images. Each image in the batch is processed independently, and the batch structure of the output matches the input.
  • size (INT): The target pixel size in pixels. This value is applied to one dimension of the image, and the other dimension is calculated automatically to preserve the aspect ratio.
  • mode (BOOLEAN): Determines which image dimension size refers to. When enabled (default true), size is treated as the target width, and the height is scaled proportionally. When disabled (false), size is treated as the target height, and the width is scaled proportionally.

Outputs

  • IMAGE: The scaled-down image or batch of images. Each output image has the same data type and batch size as the input, with dimensions adjusted according to size and mode.

Usage Notes

  • This node only scales down; if the selected dimension is already smaller than or equal to size, the image is returned unchanged.
  • Because only one target dimension is specified, the node cannot stretch an image to exact width and height values. If you need a precise output size regardless of aspect ratio, use a general resize node with separate width and height controls instead.
  • Useful for reducing large inputs to a consistent width or height before passing them to models or image-processing workflows.

Comments

Sign in with GitHub to join the discussion.

Loading comments…