VOID Build Grey Mask
The SAM3 node that decides what falls, what stays, and what disappears
- sam3_model_config
- images
- black_mask_video
- grey_mask_video
- grey_mask_mask
- grey_debug
This is the node that does the real segmentation work in the VOID pipeline, and it's the reason the pack ships its own SAM3 loader. The black mask from stage one says what you're removing. The VLM analysis says what else is affected - the guitar that falls, the shadow that vanishes, the ball that was being kicked. This node takes that list of nouns and physically finds each one in your video, then paints it as a grey mask that the quadmask stage will fold in.
It's the difference between VOID and a dumb per-frame inpaint: without this stage, removing a person leaves their shadow burned into the ground and a floating guitar that the model has to hallucinate away. With it, those regions are explicitly masked and regenerated with the rest of the scene.
How it works
The core loop is SAM3 text-prompted segmentation - you hand SAM3 a noun ("guitar", "shadow") and it returns masks, zero-shot, no training. For each object in affected_objects_json it picks a path based on what the VLM reported:
- Plain objects (category
physical, not moving): prompt SAM3 with the noun on the first frame, sort masks by score, keep the topmax_detections(default 3), then filter to only masks near the primary object usingproximity_dilation(default 50px of dilation around the black mask - keeps the guitar the person is holding while ignoring the identical guitar in the background). The surviving mask is gridified - snapped to whole grid cells, per the workflow's "over-mask is better than under-mask" philosophy - and applied to every frame. - Moving objects (
will_move: truewith atrajectory_path): no per-frame SAM3 needed. The node interpolates the object's grid-coordinate trajectory across frames, draws anobject_size_grids-sized box at each position, and the box follows the object down as it falls. - Visual artifacts (shadows, reflections, with
grid_localizations): the VLM's per-frame grid cells get expanded and carried forward/backward across frames so the shadow is masked for its whole lifetime.
Output grey-mask convention: affected regions = 127/255 (grey), everything else = 1.0 (white). Black from the primary mask is not here - that's still stage one's job.
The inputs that matter
sam3_model_config- straight fromVOID Load SAM3 Model.imagesandblack_mask_video- the video and the stage-one mask, same frame counts.affected_objects_json- theaffected_objects_jsonoutput ofVOID Parse VLM Analysis. This is why grid_rows/grid_cols must come fromVOID Prepare VLM Analysis- trajectory and localization coordinates are interpreted against that exact grid.confidence_threshold(default 0.2) - SAM3 detection confidence floor. Lower = more permissive.proximity_dilation(default 50) - how far from the primary object a detection must be to count. The main false-positive dial.max_detections(default 3) - masks kept per noun.
Outputs: grey_mask_video (IMAGE) and grey_mask_mask (MASK) feed VOID Combine Quadmask; grey_debug (IMAGE) is a red/green overlay showing what it actually masked - look at it before trusting the run.
Install & gotchas
Same as the rest of the pack (Manager → search "ComfyUI-NetflixVoid", or clone into custom_nodes). The heavy lift: first run downloads SAM3 and then pays the lazy model-build cost inside this node - expect a real pause. Frame-count mismatches between images and black_mask_video throw loudly. And if affected_objects_json isn't valid JSON, it refuses rather than guessing - re-run the parse node, don't hand-edit.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| sam3_model_config | SAM3_MODEL_CONFIG | — | |
| images | IMAGE | — | |
| black_mask_video | IMAGE | — | |
| affected_objects_json | STRING | — | |
| grid_rows | INT | 81–128 | — |
| grid_cols | INT | 81–128 | — |
| confidence_threshold | FLOAT | 0.200–1 | — |
| proximity_dilation | INT | 501–512 | — |
| max_detections | INT | 31–50 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| grey_mask_video | IMAGE | — |
| grey_mask_mask | MASK | — |
| grey_debug | IMAGE | — |