ComfyUI > Nodes > TrentNodes > Vace Mask AutoComping

ComfyUI Node: Vace Mask AutoComping

Class Name

VaceMaskAutoComping

Category
Trent/Keyframes
Author
TrentHunter82 (Account age: 0days)
Extension
TrentNodes
Latest Updated
2026-03-20
Github Stars
0.03K

How to Install TrentNodes

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

Vace Mask AutoComping Description

Automates overlaying gray on masked areas for efficient inpainting in digital art workflows.

Vace Mask AutoComping:

The VaceMaskAutoComping node is designed to streamline the process of compositing solid gray over masked areas in input images, specifically for use in Wan VACE inpainting workflows. This node automates the task of overlaying a uniform gray color on specified regions of an image, which is particularly useful for preparing inpainting regions without manual intervention. By doing so, it simplifies the workflow for artists who need to mask certain areas of an image for further processing or enhancement. The node also provides a clean binary mask that corresponds to the composited areas, ensuring that the masked regions are clearly defined and ready for subsequent inpainting tasks. This functionality is crucial for artists looking to efficiently manage and manipulate image regions, enhancing productivity and precision in digital art creation.

Vace Mask AutoComping Input Parameters:

images

This parameter represents the input images as a tensor, which are the base images on which the gray compositing will be applied. The images are processed in batches, allowing for efficient handling of multiple frames or images simultaneously. The input images should be in a format compatible with PyTorch tensors, typically with dimensions representing batch size, height, width, and color channels.

masks

The masks parameter is a tensor that defines the areas of the input images to be composited with gray. Each mask corresponds to an image and contains binary values indicating which pixels should be affected by the compositing process. A value of 1 in the mask indicates that the corresponding pixel in the image will be overlaid with gray, while a value of 0 means the pixel will remain unchanged.

expand_pixels

This optional parameter specifies the number of pixels by which the mask should be expanded. Expanding the mask can help cover additional areas around the original mask boundaries, which is useful for ensuring complete coverage of the intended regions. The default value is 0, meaning no expansion, but it can be increased to achieve a more extensive mask coverage.

gray_value

The gray_value parameter determines the intensity of the gray color used for compositing over the masked areas. It is a floating-point value typically ranging from 0.0 (black) to 1.0 (white), with the default set to 0.5, representing a mid-gray. Adjusting this value allows for customization of the compositing effect, depending on the desired visual outcome.

Vace Mask AutoComping Output Parameters:

images

The output images parameter provides the composited images, where the specified masked areas have been overlaid with the chosen gray color. These images retain the original content in unmasked regions, while the masked areas are uniformly colored, making them ready for further processing or inpainting.

masks

This output parameter returns the clean binary masks that were used in the compositing process. These masks are essential for identifying the regions that have been altered in the output images, serving as a reference for any subsequent image manipulation tasks. The masks are binary, with white (1) indicating areas where gray was applied and black (0) elsewhere.

Vace Mask AutoComping Usage Tips:

  • To ensure complete coverage of the intended areas, consider using the expand_pixels parameter to slightly enlarge the mask, especially if the original mask boundaries are not precise.
  • Adjust the gray_value to match the desired visual effect in the composited images. A lower value will result in darker gray, while a higher value will produce a lighter gray overlay.
  • Use the output binary masks to verify the accuracy of the compositing process and to guide further inpainting or editing tasks.

Vace Mask AutoComping Common Errors and Solutions:

"RuntimeError: Expected 4-dimensional input for 4-dimensional weight"

  • Explanation: This error occurs when the input images or masks do not have the expected dimensions, which should be in the format (B, H, W, C) for images and (B, H, W) for masks.
  • Solution: Ensure that the input tensors are correctly shaped and include the necessary batch and channel dimensions. Reshape or adjust the input data as needed to match the expected format.

"ValueError: Mask and image dimensions do not match"

  • Explanation: This error indicates a mismatch between the dimensions of the input images and masks, which must align for proper compositing.
  • Solution: Verify that the masks and images have the same height and width dimensions. Adjust the size of the masks or images to ensure they match before processing.

Vace Mask AutoComping Related Nodes

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

Vace Mask AutoComping