Nodes/ComfyUI Wan VACE Prep/πŸͺ VACE Inpaint (Experimental)
ComfyUI Node

πŸͺ VACE Inpaint (Experimental)

Remove or replace anything in a video with one mask

By stuttlepressΒ·Created 8 months agoΒ·Updated 25 days agoΒ· 100
πŸͺ VACE Inpaint (Experimental)
  • video
  • mask
  • control_video
  • control_mask
  • width
  • height
  • length

Video inpainting is the "delete this object from the shot" trick - the thing VACE does that made people lose their minds in 2025, per the community threads. This node is the two-input setup step that turns your mask into what the Wan VACE model actually needs. It's marked experimental, but the mechanism is dead simple and it works.

The core idea: you give it a video and a mask where white marks the pixels you want regenerated. The node copies your video, paints every masked pixel gray (0.5) - the neutral placeholder Wan's control video expects - and passes both the grayed video and the mask along as VACE control inputs. White regions get regenerated; black regions stay untouched. That's the whole trick, and it's why the node is tiny.

The inputs and outputs that matter

  • video - your source frames as an IMAGE batch. Both dimensions must be divisible by 16, or the node refuses (Wan's VAE needs the grid).
  • mask - the inpaint mask. White (1) = regenerate, black (0) = preserve. This is where the flexibility lives: a single-frame mask is broadcast across every frame, or you can pass a per-frame sequence for masks that move with the action - say, tracking a character across the shot.

Outputs are the standard VACE prep set: control_video and control_mask wire into WanVaceToVideo's control_video / control_masks inputs, plus width, height, and length for downstream latent sizing. If you want a specific reference frame to guide the regeneration, the README's tip is to connect it to WanVaceToVideo's reference_image input separately - the control video is only the masked pass.

Install

Same as the rest of the pack - ComfyUI Manager, search "Wan VACE Prep", install, restart. Or:

cd /path/to/comfyui/custom_nodes
git clone https://github.com/stuttlepress/ComfyUI-Wan-VACE-Prep

No pip dependencies, no model downloads for the node. You need the Wan VACE checkpoint downstream to generate.

Common issues

  • "Video dimensions must both be divisible by 16" - resize first. The error literally spells this out, because it's the wall everyone hits.
  • Mask frame count mismatch - if your mask isn't a single frame and doesn't match the video's frame count, you get an explicit error naming both numbers. Per-frame masks must cover the whole clip.
  • It's experimental - the class is WanVACEInpaint (displayed as πŸͺ VACE Inpaint (Experimental)), and the author flags that inputs/outputs could shift without notice. Don't build a permanent production workflow on a node labeled experimental.
  • Results drift from the mask - VACE regenerates whatever's inside the mask, but what it fills in is guided by the prompt and the surrounding context. For object removal, keep the mask tight and describe what should be there (or nothing) in the prompt.
CategoryWan VACE Prep/VACE

Inputs (2)

NameTypeDefaultDescription
videoIMAGEβ€”
maskMASKβ€”

Outputs (5)

NameTypeDescription
control_videoIMAGEβ€”
control_maskMASKβ€”
widthINTβ€”
heightINTβ€”
lengthINTβ€”