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
- Make sure you are using a recent version of ComfyUI which has built in SAM 3 nodes.
- Install VideoHelperSuite custom node (dropping workflow should prompt you to install it).
- Download the model file linked below and copy it to the location shown.
- Download the workflow and drag it into ComfyUI.
- Paste the absolute path to your video into the
Load Video (Uploads)node. - Set the
SAM3 Promptnode to what you want to blur, for examplefaceorlicense plate. - Click the Run button, your blurred video will be saved to the
outputfolder. - 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 Imagenode 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 Imagenode and enable the redEmpty Imagenode, then connect it to theImage Composite Maskednode. - Blur only some of the matches: enter a comma separated list of indices in the
object_indicesfield of theTrack To Masknode, for example0,3,5. - Speed: increasing
detect_intervalon theSAM3 Video Tracknode can speed up processing. - Out of memory errors: lower the
frames_per_batchvalue on theBatch Managernode (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.