ComfyUI > Nodes > ComfyUI > VOIDQuadmaskPreprocess

ComfyUI Node: VOIDQuadmaskPreprocess

Class Name

VOIDQuadmaskPreprocess

Category
mask/video
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

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

VOIDQuadmaskPreprocess Description

Preprocesses quadmask videos for VOID inpainting by quantizing, inverting, and normalizing mask values into distinct semantic levels.

VOIDQuadmaskPreprocess:

The VOIDQuadmaskPreprocess node is designed to preprocess quadmask videos specifically for VOID inpainting tasks. This node plays a crucial role in preparing mask data by quantizing mask values into four distinct semantic levels, which are then inverted and normalized. The primary objective is to categorize different regions of the mask, such as the primary object to be removed, overlapping areas, affected regions, and the background that should be retained. By converting these values into a normalized range between 0 and 1, the node ensures that the mask is ready for further processing in inpainting models. This preprocessing step is essential for achieving accurate and effective inpainting results, as it clearly defines the areas to be modified or preserved.

VOIDQuadmaskPreprocess Input Parameters:

mask

The mask parameter is the input mask that you want to preprocess. It serves as the foundational data that the node will transform into a quadmask. This parameter is crucial as it determines the initial state of the mask before any processing occurs.

dilate_width

The dilate_width parameter controls the dilation radius for the primary mask region. It accepts integer values ranging from 0 to 50, with a default value of 0. This parameter allows you to expand the primary mask region, which can be useful for ensuring that the mask adequately covers the intended area. A value of 0 means no dilation will be applied, while higher values increase the dilation effect, potentially affecting the precision of the mask's boundaries.

VOIDQuadmaskPreprocess Output Parameters:

quadmask

The quadmask output is the processed mask that results from the node's operations. It contains values normalized between 0 and 1, representing four discrete levels: 1.0 for areas to be removed, approximately 0.75 and 0.50 for transitional regions, and 0.0 for areas to be kept. This output is essential for subsequent inpainting processes, as it provides a clear and structured representation of the mask's intended modifications.

VOIDQuadmaskPreprocess Usage Tips:

  • Adjust the dilate_width parameter to fine-tune the coverage of the primary mask region. This can help in achieving more precise inpainting results by ensuring that the mask adequately covers the areas you intend to modify.
  • Use the VOIDQuadmaskPreprocess node as a preparatory step before feeding the mask into inpainting models. This ensures that the mask is in the correct format and scale for optimal performance.

VOIDQuadmaskPreprocess Common Errors and Solutions:

Error: "Invalid mask input"

  • Explanation: This error occurs when the input mask is not in a compatible format or is missing.
  • Solution: Ensure that the mask input is correctly formatted and provided. Check that the mask is a valid image or video file that the node can process.

Error: "Dilation width out of range"

  • Explanation: This error indicates that the dilate_width parameter is set outside the acceptable range of 0 to 50.
  • Solution: Adjust the dilate_width parameter to be within the specified range. Use values between 0 and 50 to avoid this error.

VOIDQuadmaskPreprocess Related Nodes

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

VOIDQuadmaskPreprocess