Visit ComfyUI Online for ready-to-use ComfyUI environment
Simultaneously resize images and masks with various methods, including Gaussian blur for smooth transitions.
The ImageAndMaskResizeNode is designed to simultaneously resize both images and their corresponding masks, making it an essential tool for tasks that require precise alignment between these two elements, such as inpainting or image editing. This node offers a variety of resizing methods and cropping options, allowing you to tailor the resizing process to your specific needs. Additionally, it includes a feature to apply Gaussian blur to the mask, which can help in smoothing transitions and reducing harsh edges. By providing a comprehensive set of options, this node ensures that you can achieve high-quality results while maintaining the integrity of both the image and the mask.
This parameter represents the input image that you want to resize. It is crucial as it forms the basis of the resizing operation, ensuring that the final output meets your specified dimensions and quality requirements.
The mask parameter is the corresponding mask for the input image, which will be resized alongside the image. This ensures that the mask remains aligned with the image, preserving the intended areas of focus or exclusion.
This integer parameter specifies the desired width of the resized image and mask. It ranges from a minimum of 64 to a maximum of 8192, with a default value of 512. Adjusting this parameter allows you to control the horizontal dimension of the output.
Similar to the width parameter, this integer defines the desired height of the resized image and mask. It also ranges from 64 to 8192, with a default of 512. This parameter lets you set the vertical dimension of the output.
This parameter determines the method used for resizing the image and mask. Options include "nearest-exact", "bilinear", "area", "bicubic", and "lanczos", with "lanczos" as the default. Each method offers different trade-offs between speed and quality, allowing you to choose the most suitable one for your task.
The crop parameter specifies how the image and mask should be cropped after resizing. Options include "disabled", "center", "top_left", "top_right", "bottom_left", and "bottom_right", with "disabled" as the default. This allows you to focus on specific areas of the image if needed.
This integer parameter sets the radius for applying Gaussian blur to the mask, ranging from 0 to 64, with a default of 10. A higher value results in a smoother mask, which can help in blending the mask with the image more naturally.
The output image is the resized version of the input image, adjusted according to the specified width, height, and resize method. This output is crucial for ensuring that the image fits the desired dimensions while maintaining quality.
The output mask is the resized version of the input mask, aligned with the resized image. This ensures that the mask accurately corresponds to the image, preserving the intended areas of focus or exclusion.
resize_method
options to find the one that best suits your image type and desired output.mask_blur_radius
to smooth out the edges of the mask, especially when working with complex or detailed images, to ensure a more natural blend.resize_method
parameter to ensure it matches one of the supported options: "nearest-exact", "bilinear", "area", "bicubic", or "lanczos".© 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. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.