ComfyUI > Nodes > kaytool > 𝙆 Image Resizer

ComfyUI Node: 𝙆 Image Resizer

Class Name

Image_Resizer

Category
KayTool/Image
Author
kk8bit (Account age: 1010days)
Extension
kaytool
Latest Updated
2026-04-06
Github Stars
0.34K

How to Install kaytool

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

𝙆 Image Resizer Description

Adjusts image dimensions with high-quality resampling, maintaining aspect ratio and detail.

𝙆 Image Resizer:

The ImageResizer node is designed to adjust the dimensions of an image while maintaining its visual integrity. This node is particularly useful for AI artists who need to resize images for various applications, such as preparing images for different display sizes or ensuring consistency across a series of artworks. The node offers flexibility by allowing you to specify target dimensions and choose whether to maintain the original aspect ratio. By using advanced resampling techniques, such as LANCZOS, the ImageResizer ensures that the resized images retain high quality and detail, making it an essential tool for any workflow that involves image manipulation.

𝙆 Image Resizer Input Parameters:

image

The image parameter represents the input image that you wish to resize. It is expected to be in a format that can be processed by the node, typically a tensor or an array. This parameter is crucial as it serves as the base for all resizing operations performed by the node.

width

The width parameter specifies the target width for the resized image. If set to a value greater than 0, the node will attempt to resize the image to this width. If the keep_ratio parameter is enabled, the height will be adjusted proportionally to maintain the aspect ratio. The default behavior is to retain the original width if this parameter is set to 0.

height

The height parameter defines the target height for the resized image. Similar to the width parameter, if set to a value greater than 0, the node will resize the image to this height. When keep_ratio is enabled, the width will be adjusted to maintain the aspect ratio. The default behavior is to retain the original height if this parameter is set to 0.

keep_ratio

The keep_ratio parameter is a boolean flag that determines whether the aspect ratio of the image should be preserved during resizing. When set to True, the node calculates the appropriate dimensions to maintain the original aspect ratio based on the specified width or height. This ensures that the image does not appear stretched or compressed.

mask

The mask parameter is an optional input that allows you to provide a mask image alongside the main image. This mask can be used to apply selective resizing or to maintain certain areas of the image unchanged. If no mask is provided, a default mask of zeros is used, which means no selective resizing is applied.

𝙆 Image Resizer Output Parameters:

resized_image_tensor

The resized_image_tensor is the output parameter that contains the resized image in tensor format. This output is crucial for further processing or analysis, as it provides the resized image data that can be used in subsequent nodes or applications.

resized_mask_tensor

The resized_mask_tensor is the output parameter that contains the resized mask in tensor format. This output is important if a mask was provided as an input, as it ensures that the mask is resized to match the dimensions of the resized image, allowing for consistent application in further processing.

𝙆 Image Resizer Usage Tips:

  • To maintain the quality of your images, always enable the keep_ratio parameter unless you have a specific reason to alter the aspect ratio.
  • Use the mask parameter to protect certain areas of your image from being resized, which can be particularly useful in artistic applications where specific details need to be preserved.

𝙆 Image Resizer Common Errors and Solutions:

Image size mismatch

  • Explanation: This error occurs when the dimensions of the input image and mask do not match, leading to inconsistencies during processing.
  • Solution: Ensure that both the image and mask have the same dimensions before inputting them into the node.

Invalid width or height

  • Explanation: This error arises when the specified width or height is set to a negative value, which is not permissible.
  • Solution: Check the input values for width and height and ensure they are positive integers or zero if you wish to retain the original dimension.

𝙆 Image Resizer Related Nodes

Go back to the extension to check out more related nodes.
kaytool
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 Models, enabling artists to harness the latest AI tools to create incredible art.

𝙆 Image Resizer