Censor NSFW Part
Censor just the bad bits
- image
- image
- detection
FilterNsfw blurs the whole image. CensorNsfwPart blurs only the parts that matter. It runs NudeNet to find the exposed bits, then applies one of the pack's filter modes to just those bounding boxes - the art around the censored region stays intact. It's the closest thing in this pack to a real localized censor, and the node you'd reach for when mosaic-ing an entire image feels like destroying the work.
How it works
Detection is NudeNet-based, so the inputs mirror FindNsfwPart: model_resolution (320 or 640 - 640 catches finer detail but is a bigger, slower model). Instead of separate labels, you get one mode (the same eight options as FilterNsfw: blur, mosaic, black, white, checker, mean, noise, nsfw-chan) and a censor_resolution (default 8) that controls the effect's coarseness - for mosaic it's the pixel block size.
The five per-label thresholds are here too - buttocks, female breast, female genitalia, anus, male genitalia exposed. Note they default to 0.5, higher than FindNsfwPart's 0.2, which makes the censoring more conservative by default (fewer regions get touched). Lower them if it's leaving obvious stuff alone.
Outputs
image(IMAGE) - the result with only the detected regions processeddetection(STRING) - the readout of what got censored (labels, scores, boxes), which doubles as an audit trail
Install
Same pack, same drill - ComfyUI Manager (search "nsfw-shorier") or:
cd ComfyUI/custom_nodes
git clone https://github.com/phyblas/nsfw-shorier_comfyui
First run downloads the NudeNet ONNX from Hugging Face. The usual caveat applies to this family: the NudeNet code imports OpenCV but it's missing from the pack's requirements.txt, so pip install opencv-python on a lean setup if the pack won't load.
The anime wall, again
NudeNet is trained on realistic photography, and on anime it both misses obvious content and flags innocent body parts. This isn't a tuning problem - it's a training-data problem, and it's been a consistent complaint in r/comfyui threads on censorship pipelines. For realistic content this node is solid. For drawn art, expect false negatives and false positives, and be ready to fall back to manual masks or an anime-trained YOLO detector.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| model_resolution | COMBO | 2 options: 320, 640 | |
| mode | COMBO | 8 options: blur, mosaic, black, white, checker, mean, +2 | |
| censor_resolution | INT | 82–256 | — |
| buttocks exposed threshold | FLOAT | 0.500–1 | — |
| female breast exposed threshold | FLOAT | 0.500–1 | — |
| female genitalia exposed threshold | FLOAT | 0.500–1 | — |
| anus exposed threshold | FLOAT | 0.500–1 | — |
| male genitalia exposed threshold | FLOAT | 0.500–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| detection | STRING | — |