Nodes/imgutils/Imgutils Censor
ComfyUI Node

Imgutils Censor

Pixelate, Blur, or Paint Over

By xiaden·Created 2 months ago·Updated 2 months ago· 0
Imgutils Censor
  • image
  • image
modePixelate
nipple_ftrue
penistrue
pussytrue
confidence0.30

Some pipelines end with a version of the image you can't just post anywhere. Imgutils Censor is the automated cleanup pass for that: it detects the explicit regions in an anime image and applies pixelation, blur, or a solid color fill to each one. You drop in a full render, you get back a shareable thumbnail - no hand-editing.

Why it exists

Legitimate, boring reasons: a preview image for a public gallery, a thumbnail for a channel with rules, a dataset-cleaning pass where you want to keep the composition but lose the explicit content, or a "safe version" of a batch to send somewhere. This is automation for a job people used to do in an editor - and it runs unattended across a folder.

How it works

It wraps censor_nsfw from imgutils, which runs an anatomy detector (the NudeNet lineage) over the image and then applies the selected method to each hit. The inputs, all visible in the schema:

  • mode (dropdown: Pixelate / Blur / Color) - the censoring method. Pixelate is the classic mosaic; Blur softens; Color fills solid blocks, the most aggressive "don't see it at all" option.
  • nipple_f, penis, pussy (BOOLEANs, all default true) - which anatomy classes to censor. Uncheck what you don't want covered.
  • confidence (FLOAT, default 0.3, 0–1, step 0.05) - detection threshold. Lower = more caught, more false positives.

Output is a single image.

Honest take

Know exactly what this is: detection-based and anatomy-class-specific. It censors the three classes it knows and nothing else - a lewd-but-fully-clothed image passes untouched, and a hand near the wrong spot can get pixelated as a false positive. It is not "make this SFW," it's "cover the specific bits this detector was trained on." The default confidence of 0.3 is permissive - more catches, more overcensoring; if it's pixelating innocent regions, raise it toward 0.5. Color mode is the bluntest and the only one that truly hides content; Pixelate reads as "intentionally censored," which is usually the look people want for a preview.

First use downloads the anatomy detector (cached in ~/.cache/huggingface/hub/).

Install

cd ComfyUI/custom_nodes
git clone https://github.com/xiaden/comfyui-imgutils.git
cd comfyui-imgutils
pip install -r requirements.txt

Or via ComfyUI Manager (search "imgutils"). Needs ComfyUI >= 0.25.0 and Python >= 3.10; dependency is dghs-imgutils[gpu].

Troubleshooting

If regions you expect to be censored aren't, the detector missed them - raise nothing, just accept the detector's limits, or try a lower confidence. If innocent stuff keeps getting pixelated, raise confidence and re-run. And if you're censoring a huge batch and some images come back unchanged, that's the detector finding nothing - not a node failure. One workflow note: this runs on the final image, so put it after upscaling, not before - censoring at small resolution then enlarging gives you blurry mosaic artifacts that look worse.

Categoryimgutils/transform

Inputs (6)

NameTypeDefaultDescription
imageIMAGEInput image to censor NSFW content.
modeCOMBOPixelateCensoring method.
nipple_fBOOLEANtrueCensor female nipples.
penisBOOLEANtrueCensor penises.
pussyBOOLEANtrueCensor vaginas.
confidenceFLOAT0.300–1Detection confidence threshold.

Outputs (1)

NameTypeDescription
imageIMAGE