NudenetDetector
The node that pixelates anything NSFW in your batch — and it ships the model with it
- image
- IMAGE
NudenetDetector is a blunt instrument, and that's exactly why it's useful. Feed it any image and it runs NudeNet - the open-source nudity detector - and if it finds exposed anatomy, it pixelates the whole frame. No API, no key, no model download to babysit: the ~12 MB best.onnx weights ship inside the repo itself. This is one of the rare ComfyUI nodes where "install" really is clone-and-go.
Why reach for it? Think sanitizer, not gatekeeper. Scrubbing thumbnails before they hit a public dashboard, auto-blurring frames in a batch you're about to share, or building a "preview-safe" branch that won't get anyone in trouble if it lands on a livestream. Because it outputs a plain IMAGE, it slots in anywhere a Save Image node would go - generator into this, and what comes out is either your original image untouched or a pixelated version of it.
How it works
The node letterboxes your image down to 320×320, runs it through the NudeNet YOLO-style ONNX detector on CPU (onnxruntime with CPUExecutionProvider - there's no GPU path), and maps the results against NudeNet's 18 labels. Then it keeps only five of them - exposed buttocks, female breast and genitalia, anus, male genitalia - each with its own confidence threshold (0.7 for buttocks, 0.45 for the rest).
Here's the detail that surprises people: it doesn't blur the detected region. It checks whether anything on that list clears its threshold, and if so, pixelates the entire image at block size 16. All-or-nothing, per frame. The commented-out code in the repo shows the author tried box-level masking first, then shipped the cruder version. When it fires it also prints NSFW DETECTED: [...] with the class and box to your ComfyUI console, which is handy for seeing why a frame got mosaicked.
Inputs and outputs
The whole schema is one field:
- image (IMAGE, required) - whatever you want screened.
- IMAGE out - the original if clean, the pixelated version if not.
That's it. No confidence slider, no "which classes" dropdown, no blur-radius knob. It loops over every frame in a batch too, so a video batch gets each frame checked and blurred independently. The output is the same 0–1 float32 tensor ComfyUI expects, so it feeds straight into Save Image or a video encode node.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/katalist-ai/comfyUI-nsfw-detection
Restart ComfyUI and let Manager handle the requirements (onnxruntime, opencv-python-headless, numpy). Or skip the terminal entirely: ComfyUI Manager → Custom Nodes Manager → search "comfyUI-nsfw-detection" → Install. Since the model ships in the folder, there's nothing extra to fetch.
Where people get burned
- Whole-image pixelation. If you expected a localized mosaic over just the detected region, this isn't it. One exposed buttock at the edge of a 1024-wide render and the entire frame gets the treatment.
- The pinned numpy.
requirements.txtpinsnumpy==1.26.4, and hard-pinned numpy is the classic source of custom-node dependency hell. If other nodes in your graph want a newer numpy, expect a fight. - No routing. It always returns an image, so you can't use it to block a generation or branch on a yes/no. For gating you'd want a node that exposes a score or boolean instead.
- The model's history. NudeNet had a 2025 controversy - Canada's C3P confirmed roughly 320 CSAM files among the 700k-image dataset the detector family descends from. The weights you're running are downstream of that training data. Fine for a thumbnail scrubber; just know what you're running.
Also temper your expectations about the pack itself: it's a tiny, barely-maintained repo - one commit, an empty README, effectively no community footprint. It works as shipped, but don't hold your breath for updates or feature requests to land.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |