Automatically Blur Faces and License Plates with SAM 3 and ComfyUI

In this guide you’ll learn how to automatically blur faces, license plates, or anything else in a video using SAM 3 and ComfyUI. Type what you want to hide, SAM 3 detects and tracks it across every frame, and the workflow composites a blur over the top. No generation model is involved, so it runs quickly and the rest of your footage is left untouched.

New to ComfyUI?

If you don’t have ComfyUI installed yet, don’t worry. Watch this video to get it up and running in just a few minutes, then you can jump straight into this workflow.

Instructions

  1. Make sure you are using a recent version of ComfyUI which has built in SAM 3 nodes.
  2. Install VideoHelperSuite custom node (dropping workflow should prompt you to install it).
  3. Download the model file linked below and copy it to the location shown.
  4. Download the workflow and drag it into ComfyUI.
  5. Paste the absolute path to your video into the Load Video (Uploads) node.
  6. Set the SAM3 Prompt node to what you want to blur, for example face or license plate.
  7. Click the Run button, your blurred video will be saved to the output folder.
  8. If you have any problems then leave a comment on the YouTube video and I can help you out.

Workflow

Sample Input (optional)

If you want to test with the same source video I used on YouTube then download this video.

Models

Download this file:

Place it in this folder:

📂 ComfyUI/
├── 📂 models/
│   ├── 📂 checkpoints/
│   │   └── sam3.1_multiplex_fp16.safetensors

Settings

  • Blur: the Blur Image node is set to a blur radius of 31 and a sigma of 10. Change these to get a softer or stronger blur.
  • Solid color instead of a blur: bypass the Blur Image node and enable the red Empty Image node, then connect it to the Image Composite Masked node.
  • Blur only some of the matches: enter a comma separated list of indices in the object_indices field of the Track To Mask node, for example 0,3,5.
  • Speed: increasing detect_interval on the SAM3 Video Track node can speed up processing.
  • Out of memory errors: lower the frames_per_batch value on the Batch Manager node (36 by default).

How It Works

The video is loaded and split into batches of frames. For each batch, the SAM3 Video Track node detects everything matching your prompt and tracks it from frame to frame. The Track To Mask node turns that tracking data into a mask, the frames are blurred, and the Image Composite Masked node pastes the blurred frames over the original using the mask, so only the tracked objects get blurred. The result is encoded back to an H.264 mp4.