Visit ComfyUI Online for ready-to-use ComfyUI environment
Standardize input mask size to specified resolution for AI artists, supporting multiple ports and scaling methods.
The DD-MaskUniformSize node is designed to standardize the size of input masks to a specified resolution, making it an essential tool for AI artists who need consistent mask dimensions across various projects. This node supports multiple input ports and offers a variety of scaling methods and size adaptation strategies, ensuring flexibility and precision in mask resizing. By providing options for threshold processing, it allows for fine-tuning of mask details, which can be crucial for achieving the desired artistic effects. The node's ability to handle multiple masks simultaneously and output them in a uniform size streamlines the workflow, making it easier to manage and manipulate mask data in creative projects.
This parameter determines the interpolation method used for resizing the masks. Options include "邻近-精确" (nearest-exact), "双线性插值" (bilinear interpolation), "区域" (area), "双三次插值" (bicubic interpolation), and "lanczos". The choice of method affects the quality and smoothness of the resized mask, with each method offering a different balance between speed and quality. The default is "邻近-精确".
This integer parameter sets the target width for the resized masks. It ranges from a minimum of 8 to a maximum of 8192, with a default value of 512. Adjusting this parameter allows you to control the horizontal resolution of the output masks.
Similar to the width parameter, this integer sets the target height for the resized masks. It also ranges from 8 to 8192, with a default of 512. This parameter controls the vertical resolution of the output masks.
This parameter specifies the strategy for adapting the mask size to the target dimensions. Options include "自适应" (adaptive), "拉伸" (stretch), "裁剪" (crop), and "填充" (fill). Each option offers a different approach to handling aspect ratio changes, with "自适应" being the default.
A boolean parameter that enables or disables threshold processing. When enabled, it applies a threshold to the resized masks, which can help in refining mask edges and enhancing contrast. The default setting is False.
This float parameter sets the threshold value used when threshold processing is enabled. It ranges from 0.0 to 1.0, with a default of 0.5. Adjusting this value allows for control over the sensitivity of the threshold effect.
An optional input port for a mask. This allows you to input a mask that will be resized according to the specified parameters.
Another optional input port for a mask, similar to 遮罩A, providing flexibility in handling multiple masks.
An additional optional input port for a mask, offering further capacity for mask input.
The final optional input port for a mask, maximizing the node's ability to process multiple masks simultaneously.
This output provides the resized version of the input mask connected to the 遮罩A port. It reflects the specified width, height, and other parameters, ensuring a uniform size.
Similar to 遮罩A, this output delivers the resized mask from the 遮罩B input, maintaining consistency in size and quality.
This output corresponds to the resized mask from the 遮罩C input, processed according to the node's settings.
The final output provides the resized mask from the 遮罩D input, completing the set of uniformly sized masks.
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.