ComfyUI  >  Nodes  >  comfyui-art-venture >  Scale Down

ComfyUI Node: Scale Down

Class Name

ImageScaleDown

Category
Art Venture/Utils
Author
sipherxyz (Account age: 1158 days)
Extension
comfyui-art-venture
Latest Updated
7/31/2024
Github Stars
0.1K

How to Install comfyui-art-venture

Install this extension via the ComfyUI Manager by searching for  comfyui-art-venture
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui-art-venture in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Scale Down Description

Efficiently reduces image size while preserving quality and aspect ratio for various purposes using advanced scaling algorithms.

Scale Down:

The ImageScaleDown node is designed to reduce the size of images while maintaining their quality and aspect ratio. This node is particularly useful for AI artists who need to downscale images for various purposes, such as creating thumbnails, optimizing images for web use, or preparing images for further processing. By leveraging advanced scaling algorithms, the node ensures that the downscaled images retain as much detail and clarity as possible. The primary goal of this node is to provide a straightforward and efficient way to reduce image dimensions without compromising on visual quality.

Scale Down Input Parameters:

images

This parameter accepts the images you want to downscale. The input should be in the form of an image tensor. The images will be processed to reduce their dimensions based on the specified scaling factor or target size.

scale_by

This parameter determines the factor by which the images will be scaled down. It is a floating-point value with a default of 0.5, a minimum of 0.01, and a maximum of 1.0. Adjusting this value will proportionally reduce the width and height of the images. For example, a scale_by value of 0.5 will reduce the dimensions of the images by half.

size

This parameter specifies the target size for the downscaled images. It is an integer value with a default of 512, a minimum of 1, and a maximum defined by MAX_RESOLUTION. This parameter is used when you want to scale the images to a specific dimension rather than by a factor.

mode

This boolean parameter determines whether the scaling should be based on the maximum or minimum dimension of the images. When set to True (labelled as "max"), the scaling will be based on the larger dimension of the image. When set to False (labelled as "min"), the scaling will be based on the smaller dimension. This helps in maintaining the aspect ratio while fitting the image within the specified size.

Scale Down Output Parameters:

IMAGE

The output is the downscaled image tensor. This tensor contains the images resized according to the specified scaling factor or target size, ensuring that the images retain their aspect ratio and visual quality.

Scale Down Usage Tips:

  • To maintain the aspect ratio while downscaling, use the scale_by parameter with a value between 0.01 and 1.0.
  • When you need the images to fit within a specific dimension, use the size parameter and set the mode to either "max" or "min" based on your requirement.
  • For best results, ensure that the input images are of high quality, as downscaling can sometimes amplify imperfections in lower-quality images.

Scale Down Common Errors and Solutions:

"Invalid scale_by value"

  • Explanation: The scale_by parameter value is outside the allowed range (0.01 to 1.0).
  • Solution: Ensure that the scale_by value is within the specified range. Adjust the value to be between 0.01 and 1.0.

"Invalid size value"

  • Explanation: The size parameter value is outside the allowed range (1 to MAX_RESOLUTION).
  • Solution: Ensure that the size value is within the specified range. Adjust the value to be between 1 and the maximum resolution allowed.

"Image tensor shape mismatch"

  • Explanation: The input image tensor does not have the expected shape.
  • Solution: Verify that the input images are in the correct tensor format and have the expected dimensions. Ensure that the images are properly preprocessed before passing them to the node.

Scale Down Related Nodes

Go back to the extension to check out more related nodes.
comfyui-art-venture
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.