ComfyUI > Nodes > antrobots ComfyUI Nodepack > Scale Image to Size

ComfyUI Node: Scale Image to Size

Class Name

scale

Category
antrobots-ComfyUI-nodepack/image-handling
Author
antrobot (Account age: 3193days)
Extension
antrobots ComfyUI Nodepack
Latest Updated
2025-04-02
Github Stars
0.02K

How to Install antrobots ComfyUI Nodepack

Install this extension via the ComfyUI Manager by searching for antrobots ComfyUI Nodepack
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter antrobots ComfyUI Nodepack 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Scale Image to Size Description

Resize images with quality preservation, offering flexible sizing modes and interpolation methods for efficient scaling.

Scale Image to Size:

The scale function is designed to resize images to a desired size while maintaining the quality and integrity of the original image. It offers flexibility in terms of resizing modes, allowing you to choose between balanced, larger, or smaller sizing modes. This node is particularly beneficial for artists and designers who need to adjust image dimensions without compromising on quality. By utilizing different interpolation methods, such as bilinear scaling, the node ensures that the resized image retains its visual appeal. The primary goal of this node is to provide a seamless and efficient way to scale images according to specific requirements, making it an essential tool for image processing tasks.

Scale Image to Size Input Parameters:

image_in

This parameter represents the input image that you want to scale. It is crucial as it serves as the base for the scaling operation. The image should be in a format compatible with the node's processing capabilities.

desired_size

This parameter specifies the target size for the scaling operation. It determines the final dimensions of the output image. The value should be an integer representing the desired size in pixels.

sizing_mode

The sizing mode parameter allows you to choose how the image should be resized. Options include "balanced," "larger," and "smaller." The "balanced" mode maintains the aspect ratio, while "larger" and "smaller" modes adjust the image size based on the minimum or maximum dimension, respectively. The default mode is "balanced."

Scale Image to Size_mode

This parameter defines the interpolation method used during scaling. Options include various interpolation techniques, with "bilinear" being the default. The choice of interpolation affects the smoothness and quality of the resized image.

Scale Image to Size Output Parameters:

image_out

The output parameter is the scaled image, which is the result of the resizing operation. This image retains the visual characteristics of the input image but is adjusted to the specified size. The output is crucial for further processing or use in design projects.

Scale Image to Size Usage Tips:

  • To maintain the aspect ratio of your image, use the "balanced" sizing mode, which automatically adjusts the dimensions while preserving the original proportions.
  • Experiment with different interpolation methods to achieve the desired level of smoothness and detail in the scaled image. For instance, "bilinear" is suitable for general purposes, while other methods may offer sharper results.

Scale Image to Size Common Errors and Solutions:

Unknown sizing mode: <sizing_mode>

  • Explanation: This error occurs when an invalid sizing mode is provided. The node expects one of the predefined modes: "balanced," "larger," or "smaller."
  • Solution: Ensure that the sizing mode parameter is set to one of the valid options. Double-check the spelling and case sensitivity of the mode name.

Invalid image format

  • Explanation: This error indicates that the input image is not in a compatible format for processing.
  • Solution: Verify that the input image is in a supported format and meets the node's requirements. Convert the image to a compatible format if necessary.

Scale Image to Size Related Nodes

Go back to the extension to check out more related nodes.
antrobots ComfyUI Nodepack
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.