VOID Combine Quadmask
Why object removal needs four mask levels, not one
- black_mask_video
- grey_mask_video
- quadmask_video
- quadmask_mask
If you've ever done video object removal, you know the two-mask problem: you mask the person, the model regenerates the person region, but the person's shadow is still there, and the guitar they were holding is left floating in mid-air. One binary mask can't tell the model "replace this region completely" and "fix this region but keep its general shape." VOID's answer is a quadmask - four mask levels - and this node is where they get combined.
It's the last mask node before the PQ5 sampler in the pipeline: black mask (stage 1) + grey mask (stage 3) go in, one 4-level video comes out.
How it works
The math is almost embarrassingly simple once you see it. Both input masks are read as single channels, and each pixel falls into one of four buckets:
| Black mask (primary) | Grey mask (affected) | Quadmask value | Meaning | |---|---|---|---| | object | not affected | 0 (black) | delete entirely, regenerate from scratch | | object | affected | 63 | delete, but regenerate with the affected object in mind | | background | affected | 127 (grey) | keep, but repair (shadow, falling guitar) | | background | not affected | 255 (white) | untouched, bit-identical |
So black-only is a hard "remove everything here," grey-only is a soft "something was here and must be fixed," and the overlap gets a middle value. The PQ5 model's trimask mechanism reads these levels directly - that's why the sampler node takes the quadmask rather than the raw masks.
One detail that will confuse you if you preview it: the first frame has grey-only values reset to white, which matches the original VOID Stage 4 behavior (the first frame is the one you use as the visual reference, so it stays clean).
The inputs that matter
black_mask_video(IMAGE) - stage one's output fromVOID Export Black Mask.grey_mask_video(IMAGE) - stage three's output fromVOID Build Grey Mask.
Both must be the same frame count and resolution - the node validates and throws a "Shape mismatch" error otherwise.
Outputs:
quadmask_video(IMAGE) - the 4-level mask as a 3-channel video. Feed it toVOID PQ5 Encode Quadmask.quadmask_mask(MASK) - the same data as a mask tensor, for previewing or reusing elsewhere.
Install
Standard for the pack: ComfyUI Manager → search "ComfyUI-NetflixVoid", or git clone https://github.com/jaskirat05/ComfyUI-NetflixVoid into custom_nodes, restart. No models, no downloads - pure tensor math, runs instantly.
Common issues
- Grey regions you didn't ask for - check
VOID Build Grey Mask'sgrey_debugoutput first; this node faithfully combines whatever it's given. The quadmask is only as good as the grey mask, so debug there, not here. - Frame count mismatch -
black_mask_videoandgrey_mask_videomust be identical in length. If your grey stage ran on a downsampled version of the video (some SAM setups do), resize upstream. - Preview looks mostly black - remember the convention: black means "delete this," white means "untouched," grey means "repair." A person-shaped black blob over your subject is the correct preview, not a bug.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| black_mask_video | IMAGE | — | |
| grey_mask_video | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| quadmask_video | IMAGE | — |
| quadmask_mask | MASK | — |