Skip to content

LearnTutorials

Remove objects from videos with Netflix VOID

Erase a person or object from a video with Netflix's open-source VOID, plus the shadows and knock-on effects it leaves, on your own GPU.

By Recaply EditorsAdvanced52 min6 stepsUpdated

A hand rests on a short film strip while a pencil scrubs out a ball in the middle frame

What you need

SAM 3 needs Python 3.12 or newer and CUDA 12.6 or newer. The Hugging Face demo of VOID is paused, so you run it yourself.

  1. Step 1: Install VOID and its models

    15 min

    VOID runs on Netflix's code plus several sets of weights: the CogVideoX base model, its own two passes and SAM 2.

    1. On your GPU machine, open a terminal in a fresh Python 3.12 environment.
    2. Run the commands below. They clone VOID, install SAM 2 and SAM 3, and download the weights.
    3. Give it time. The CogVideoX base model is the slow download.
    Run this
    git clone https://github.com/Netflix/void-model.git && cd void-model
    pip install -r requirements.txt
    git clone https://github.com/facebookresearch/sam2.git && (cd sam2 && pip install -e .)
    git clone https://github.com/facebookresearch/sam3.git && (cd sam3 && pip install -e .)
    hf download alibaba-pai/CogVideoX-Fun-V1.5-5b-InP --local-dir ./CogVideoX-Fun-V1.5-5b-InP
    hf download netflix/void-model void_pass1.safetensors void_pass2.safetensors --local-dir .
    wget https://dl.fbaipublicfiles.com/segment_anything_2/072824/sam2_hiera_large.pt

    You should see CogVideoX-Fun-V1.5-5b-InP, void_pass1.safetensors, void_pass2.safetensors and sam2_hiera_large.pt inside the void-model folder.

    Installing SAM 3 fails?

    Check that python --version shows 3.12 or newer and nvidia-smi shows CUDA 12.6 or newer. Then try again in a fresh environment.

  2. Step 2: Add your keys

    4 min

    SAM 3 downloads its weights from Hugging Face, and the mask step asks Gemini what else the object affects.

    1. On the SAM 3 model page, request access and wait for approval.
    2. Create a Hugging Face access token. Run hf auth login and paste it.
    3. Create a Gemini API key in Google AI Studio and export it, as below.
    4. Run the sed line. It swaps the repo's retired Gemini model for Gemini 3.1 Pro.
    Run this
    hf auth login
    hf auth whoami
    export GEMINI_API_KEY=[YOUR GEMINI API KEY]
    sed -i 's/gemini-3-pro-preview/gemini-3.1-pro-preview/' VLM-MASK-REASONER/stage2_vlm_analysis.py

    You should see your Hugging Face username, printed by hf auth whoami.

    SAM 3 fails to download with a 401 or 403 error?

    Your access request isn't approved yet, or you aren't logged in. Check the SAM 3 model page, then run hf auth login again.

    Google shut down gemini-3-pro-preview on March 9, 2026, but the VOID repo still names it. Keep both keys out of scripts and shared files.

  3. Step 3: Click the object to remove

    5 min

    A few clicks tell SAM 2 which object to follow through the whole clip.

    1. Put your clip in a clips folder. Save the config below as my_config.json in the void-model folder.
    2. Run python VLM-MASK-REASONER/point_selector_gui.py, click Load Config and pick my_config.json.
    3. Click a few points on the object. If part of it first shows up later, such as a hand, go to that frame and click it too.
    4. Click Save All Points.
    Your config
    {
      "videos": [
        {
          "video_path": "clips/[YOUR CLIP].mp4",
          "output_dir": "data/my-clip",
          "instruction": "remove the [OBJECT]"
        }
      ]
    }

    You should see a message that the points were saved to my_config_points.json.

    No window opens on a cloud GPU?

    The point picker is a desktop window, so it needs a screen. Use a remote desktop, or run it on your own computer with the same folders and copy the points file over.

  4. Step 4: Build the interaction mask

    8 min

    The mask marks the object and everything it touches, such as a cup it would have knocked over.

    1. Run the pipeline below. It tracks the object, asks Gemini what the object affects, and writes the mask.
    2. Play data/my-clip/quadmask_0.mp4. Black is the object, grey is what it affects, and white stays as it is.
    3. If a shadow or a falling item is missing, run python VLM-MASK-REASONER/edit_quadmask.py and paint it in.
    Run this
    bash VLM-MASK-REASONER/run_pipeline.sh my_config_points.json --sam2-checkpoint sam2_hiera_large.pt

    You should see Pipeline complete!, with input_video.mp4 and quadmask_0.mp4 in data/my-clip.

    Stage 2 fails with a 404 or a model error?

    The script still asks for the retired Gemini 3 Pro Preview. Run the sed line from step 2, then run the pipeline again.

  5. Step 5: Run the first pass

    10 min

    Pass 1 fills in the masked areas and replays what the object caused, so a held guitar falls when the person is gone.

    1. Save a prompt.json that describes the scene after the removal, not the removal itself.
    2. Run pass 1 with the command below.
    3. Open the file ending in _tuple.mp4 in out/pass1 to compare before and after side by side.
    Run this
    echo '{"bg": "[THE SCENE WITHOUT THE OBJECT]"}' > data/my-clip/prompt.json
    python inference/cogvideox_fun/predict_v2v.py \
      --config config/quadmask_cogvideox.py \
      --config.data.data_rootdir="data" \
      --config.experiment.run_seqs="my-clip" \
      --config.experiment.save_path="out/pass1" \
      --config.video_model.model_name="CogVideoX-Fun-V1.5-5b-InP" \
      --config.video_model.transformer_path="void_pass1.safetensors"

    You should see out/pass1/my-clip.mp4, with the object and its effects gone.

    CUDA runs out of memory?

    Add --config.system.gpu_memory_mode=sequential_cpu_offload to the command. It keeps more of the model on the CPU, so it runs slower.

    Netflix's own samples show the idea: with a glass removed, the prompt is "A lime falls on the table."

  6. Step 6: Steady the result with pass 2

    10 min

    Small video models can bend thin or fast things, and pass 2 uses the motion from pass 1 to hold shapes steady.

    1. Watch hands, rackets and other thin or fast parts in the pass 1 clip.
    2. If they bend or melt, run pass 2 with the command below.
    Run this
    python inference/cogvideox_fun/inference_with_pass1_warped_noise.py \
      --video_name my-clip \
      --data_rootdir data \
      --pass1_dir out/pass1 \
      --output_dir out/pass2 \
      --model_checkpoint void_pass2.safetensors \
      --model_name CogVideoX-Fun-V1.5-5b-InP

    You should see a steadier version of your clip in out/pass2.

    Pass 2 can't find the first video?

    Point --pass1_dir at the folder that holds my-clip.mp4. Keep --video_name the same as the folder name in data.

You get

A clean version of your clip, with the object gone and the scene acting as if it was never there

Did this guide work for you?

Sources