Mask Censor (CRT)
Auto-blur or pixelate faces before your AI video goes public
- image
- mask_override
- filtered_image
Sooner or later you'll render a video with real-looking faces and realize you can't actually publish it - no consent, no permission, or just no stomach for synthetic people in public. Mask Censor (CRT) is the node that handles it automatically: it detects faces frame by frame and blurs or pixelates them before the footage leaves your machine. Point it at a folder of frames or a video batch, and every face comes out anonymized.
It's the one node in CRT-Nodes that's about removing information rather than adding a look, and it's built for exactly the production-cleanup job the suite is named after.
How it works
Under the hood it runs a YOLO segmentation model - an ultralytics instance-seg model - over your frames, producing a per-frame mask of the detected region. That mask then drives the censor:
- censor_type -
blur(a heavy Gaussian) orpixelate(the mosaic/NSFW-censor look). - strength - how hard the effect applies (blur radius / pixel block size).
- mask_expand - grows or shrinks the detected region so the blur bleeds comfortably past the face edges instead of hugging them.
- mask_blur - softens the mask's edges so you don't get a hard rectangle floating on the video.
There's also chunk_size (how many frames process at a time), processing_device (auto / cuda / cpu), and a segm_threshold for detection confidence. Batch inputs are handled frame by frame with a progress bar, so a long video run is visible, not a mystery.
The alternative path: connect the optional mask_override and it skips detection entirely, censoring exactly the region you drew. That's the escape hatch when the detector misses something or finds too much.
The inputs that matter most
- image - your frames (a single image or a batch/video).
- face_segm_model - a segmentation model you must supply, see below. This is the one that trips people up.
- censor_type -
bluris the tasteful default;pixelateif you want the unmistakable "censored" look. - mask_expand - set it positive (10 is a fine start) or the blur sits right on the face contour and looks cheap.
- mask_override - the "I'll draw it myself" bypass.
Output is filtered_image, the censored IMAGE, ready for a preview or save node.
The gotcha: it needs a model you don't have yet
The node does not ship a model. It expects a YOLO segmentation model to be sitting in ComfyUI's models/ultralytics_segm folder (the pack's requirements.txt installs ultralytics, but not the weights). No model present means the face_segm_model dropdown shows only a segm/ placeholder and the node can't run. Drop a segmentation .pt model there - a face-specific YOLO seg model or a general one like yolov8m-seg.pt - restart, and the list populates.
Real-world notes
- Video cost: detection runs per frame. On a long clip at full resolution this is a real pass; drop the resolution or frame count first if it crawls.
- Over-detection is safer than under:
segm_thresholddefault 0.5 is a fine balance; if faces get missed on stylized/artistic renders, lower it. - Blur vs pixelate is a brand decision, not a quality one - pixelate reads as deliberate censorship, blur reads as privacy. Same mask either way.
Install is pack-level: ComfyUI Manager → search CRT-Nodes → install and restart, or clone into custom_nodes. Heavy dependency list (opencv, ultralytics, librosa and more); the pack skips optional nodes that fail to import rather than crashing the UI.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| face_segm_model | COMBO | 1 options: segm/ | |
| segm_threshold | FLOAT | 0.500–1 | — |
| censor_type | COMBO | blur | 2 options: blur, pixelate |
| strength | FLOAT | 120–128 | — |
| mask_expand | INT | 10-64–64 | — |
| mask_blur | FLOAT | 12.00–64 | — |
| processing_device | COMBO | auto | 3 options: auto, cuda, cpu |
| chunk_size | INT | 81–256 | — |
| mask_overrideopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| filtered_image | IMAGE | — |