ComfyUI  >  Nodes  >  WAS Node Suite >  Image Resize

ComfyUI Node: Image Resize

Class Name

Image Resize

Category
WAS Suite/Image/Transform
Author
WASasquatch (Account age: 4688 days)
Extension
WAS Node Suite
Latest Updated
8/25/2024
Github Stars
1.1K

How to Install WAS Node Suite

Install this extension via the ComfyUI Manager by searching for  WAS Node Suite
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter WAS Node Suite 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

Image Resize Description

Adjust image dimensions for specific requirements, maintaining quality through resampling methods.

Image Resize:

The Image Resize node is designed to adjust the dimensions of an image to meet specific requirements, whether for scaling up or down, or for fitting within a particular aspect ratio. This node is particularly useful for AI artists who need to prepare images for further processing, ensuring that the images are of the correct size and aspect ratio for their projects. By using various resampling methods, the node maintains the quality of the image while resizing, making it an essential tool for image manipulation and enhancement.

Image Resize Input Parameters:

image

This parameter accepts the image that you want to resize. The image should be in a format that the node can process, typically a PIL Image object.

mode

This parameter determines the resizing mode. It can be set to either scale or rescale. The scale mode adjusts the image dimensions based on the specified width and height, while the rescale mode scales the image by a given factor. The default value is scale.

supersample

This parameter specifies whether to apply supersampling during the resizing process. Supersampling can help improve the quality of the resized image by reducing aliasing artifacts. It accepts a boolean value, with true enabling supersampling and false disabling it. The default value is true.

factor

This parameter is used in rescale mode to determine the scaling factor. It multiplies the current dimensions of the image by this factor. The default value is 2.

width

This parameter specifies the target width of the image when using the scale mode. The width should be a multiple of 8 to ensure proper resizing. If the provided width is not a multiple of 8, it will be adjusted accordingly. The default value is 1024.

height

This parameter specifies the target height of the image when using the scale mode. Similar to the width, the height should be a multiple of 8. If the provided height is not a multiple of 8, it will be adjusted accordingly. The default value is 1024.

resample

This parameter defines the resampling filter to use during the resizing process. Available options include nearest, bilinear, bicubic, and lanczos. Each filter offers different levels of quality and performance, with bicubic being the default option for a good balance between quality and speed.

Image Resize Output Parameters:

resized_image

This parameter returns the resized image. The output image will have the dimensions specified by the input parameters and will be processed using the chosen resampling filter. The resized image is typically a PIL Image object.

Image Resize Usage Tips:

  • To maintain the best quality when enlarging images, use the lanczos resampling filter and enable supersampling.
  • When resizing images for web use, consider using the bilinear or bicubic filters for a good balance between quality and performance.
  • Ensure that the width and height parameters are multiples of 8 to avoid unexpected resizing issues.

Image Resize Common Errors and Solutions:

Image size not a multiple of 8

  • Explanation: The provided width or height is not a multiple of 8, which can cause issues with certain resizing operations.
  • Solution: Adjust the width and height to be multiples of 8. The node will automatically correct this, but it's good practice to provide correct values.

Unsupported resampling filter

  • Explanation: The specified resampling filter is not recognized by the node.
  • Solution: Ensure that the resample parameter is set to one of the supported values: nearest, bilinear, bicubic, or lanczos.

Supersampling not applied

  • Explanation: The supersample parameter is set to false, so supersampling is not applied.
  • Solution: Set the supersample parameter to true if you want to enable supersampling for higher quality resizing.

Image Resize Related Nodes

Go back to the extension to check out more related nodes.
WAS Node Suite
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.