WanVideo MiniMax Remover Embeds
Fast object and watermark removal from video
- latents
- mask_latents
- image_embeds
This is the setup node for MiniMax-Remover, a video object-removal model - the "erase that thing from my clip" tool. Mask the object (or the watermark, or the person) you want gone, and MiniMax-Remover regenerates those pixels to match the surrounding scene across every frame. The headline reason people reach for it over the alternatives is speed: community reports have an 81-frame removal finishing in around 20 seconds, and a full auto-mask-plus-remove pass in about a minute. That's fast for video inpainting.
The node's job is to package your latents and mask into the image_embeds the Wan sampler consumes. It doesn't take images directly - it takes latents, which is a small but important detail.
How it works
Video inpainting means: keep the unmasked region, plausibly fill the masked region, and keep it temporally coherent so the fill doesn't shimmer or pop between frames. MiniMax-Remover does that as a Wan-based generation. You feed it the encoded video latents, the encoded mask_latents marking what to remove, and the target dimensions, and it produces conditioning telling Wan "regenerate here, preserve there." Out comes WANVIDIMAGE_EMBEDS for the sampler.
The inputs and outputs that matter
latents(LATENT) - your source video, already VAE-encoded to latent space. Not raw images - encode first.mask_latents(LATENT) - the removal mask, in latent space. This defines what disappears.width(default 832) /height(default 480) - output dimensions. The defaults are a standard Wan 480p landscape frame; match these to your source.num_frames(default 81, steps of 4) - clip length. Note the step of 4: Wan's VAE compresses time roughly 4x, so valid frame counts land on a4n+1grid (81, 85, …). Feed a compatible count or you'll get an off-by-a-couple-frames surprise.
Output: image_embeds (WANVIDIMAGE_EMBEDS) → WanVideoSampler.
How to install it
ComfyUI Manager → search ComfyUI-WanVideoWrapper, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt
then restart. You'll need the MiniMax-Remover weights on disk plus the Wan VAE (to produce those latents in the first place) and a Wan model. Because this operates in latent space, your graph needs VAE-encode nodes feeding both the video and the mask before they reach this node.
Common issues & troubleshooting
"It wants latents and I'm handing it images." Right - that's the design. Both latents and mask_latents must be VAE-encoded first. Put a VAE encode between your source video / mask and this node.
Frame count acts weird / clip comes back short. The num_frames step of 4 is the tell. Wan's temporal compression means counts should follow 4n+1. Off-grid values get rounded and you lose or gain a frame or two - pick 81, 85, 89, etc.
The removed object leaves a ghost. Usually a mask that's too tight or doesn't fully track the object across frames. Expand the mask slightly and make sure it follows the object through motion - a static mask on a moving object leaves edges behind. Auto-masking (segment the object, then feed that) is what the fast-workflow reports use for exactly this reason.
Dimensions mismatch errors. width/height here need to agree with the resolution your latents were encoded at. Keep them in sync with the source.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 83264–8096 | Width of the image to encode |
| height | INT | 48064–8096 | Height of the image to encode |
| num_frames | INT | 811–10000 | Number of frames to encode |
| latents | LATENT | Encoded latents to use as control signals | |
| mask_latents | LATENT | Encoded latents to use as mask |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image_embeds | WANVIDIMAGE_EMBEDS | — |