Nodes/CRT-Nodes/Mask Censor (CRT)
ComfyUI Node

Mask Censor (CRT)

Auto-blur or pixelate faces before your AI video goes public

By PGCRT·Created 2 years ago·Updated a day ago· 132
Mask Censor (CRT)
  • image
  • mask_override
  • filtered_image
face_segm_model
segm_threshold0.50
censor_typeblur
strength12
mask_expand10
mask_blur12.0
processing_deviceauto
chunk_size8

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) or pixelate (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 - blur is the tasteful default; pixelate if 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_threshold default 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.

CategoryCRT/Mask

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
face_segm_modelCOMBO1 options: segm/
segm_thresholdFLOAT0.500–1
censor_typeCOMBOblur2 options: blur, pixelate
strengthFLOAT120–128
mask_expandINT10-64–64
mask_blurFLOAT12.00–64
processing_deviceCOMBOauto3 options: auto, cuda, cpu
chunk_sizeINT81–256
mask_overrideoptMASK

Outputs (1)

NameTypeDescription
filtered_imageIMAGE