ComfyUI > Nodes > ComfyUI_XISER_Nodes > Resize Image Or Mask

ComfyUI Node: Resize Image Or Mask

Class Name

XIS_ResizeImageOrMask

Category
XISER_Nodes/Image_And_Mask
Author
grinlau18 (Account age: 944days)
Extension
ComfyUI_XISER_Nodes
Latest Updated
2026-03-20
Github Stars
0.03K

How to Install ComfyUI_XISER_Nodes

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

Resize Image Or Mask Description

Facilitates resizing images or masks in AI art projects, ensuring quality and dimension consistency.

Resize Image Or Mask:

The XIS_ResizeImageOrMask node is designed to facilitate the resizing of images or masks within your AI art projects. This node is particularly useful when you need to adjust the dimensions of an image or mask to fit a specific size requirement or to match the dimensions of another reference image. By providing a streamlined method for resizing, it ensures that your images or masks maintain their quality and integrity during the transformation process. This node is essential for artists who need to ensure consistency in their artwork's dimensions, allowing for seamless integration into larger compositions or specific design frameworks. Its primary goal is to offer a reliable and efficient way to resize visual elements without compromising on detail or clarity.

Resize Image Or Mask Input Parameters:

image

The image parameter represents the input image that you wish to resize. This parameter is crucial as it determines the source material that will undergo the resizing process. The quality and resolution of the input image can impact the final output, so it is advisable to use high-quality images to ensure the best results.

mask

The mask parameter is used when you want to resize a mask instead of a regular image. Masks are often used in image processing to isolate certain parts of an image, and resizing them accurately is important to maintain their effectiveness. This parameter allows you to specify the mask that needs resizing, ensuring it aligns correctly with the corresponding image.

target_width

The target_width parameter specifies the desired width for the resized image or mask. This parameter is essential for defining the horizontal dimension of the output, allowing you to tailor the width to fit specific requirements or constraints. It is important to choose a width that complements the aspect ratio of the original image or mask to avoid distortion.

target_height

The target_height parameter defines the desired height for the resized image or mask. Similar to the target_width, this parameter is crucial for setting the vertical dimension of the output. Ensuring that the height is proportionate to the width helps maintain the original aspect ratio and prevents unwanted stretching or squashing of the image or mask.

reference_image

The reference_image parameter is optional and can be used when you want the resized image or mask to match the dimensions of another image. By providing a reference image, the node can automatically adjust the size of the input image or mask to align with the reference, ensuring consistency across different visual elements in your project.

Resize Image Or Mask Output Parameters:

resized_image

The resized_image parameter is the output that contains the resized version of the input image. This output is crucial for further processing or integration into your project, as it provides the adjusted image that meets your specified dimensions. The quality of the resized image is maintained to ensure it is suitable for high-quality artistic applications.

resized_mask

The resized_mask parameter provides the resized version of the input mask. This output is important for applications where masks are used to define specific areas of an image, such as in compositing or selective editing. The resized mask ensures that it aligns perfectly with the resized image, maintaining its functionality and effectiveness.

Resize Image Or Mask Usage Tips:

  • Ensure that the aspect ratio of the target dimensions matches the original image or mask to prevent distortion.
  • Use high-resolution images as input to maintain quality after resizing.
  • When using a reference image, ensure it is correctly aligned with the intended output dimensions for consistent results.

Resize Image Or Mask Common Errors and Solutions:

"Invalid dimensions specified"

  • Explanation: This error occurs when the target width or height is set to a non-positive value.
  • Solution: Ensure that both target_width and target_height are positive integers that reflect the desired output size.

"Reference image dimensions mismatch"

  • Explanation: This error arises when the reference image's dimensions do not align with the intended output size.
  • Solution: Verify that the reference image has the correct dimensions or adjust the target dimensions to match the reference image.

Resize Image Or Mask Related Nodes

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