Nodes/ComfyUI_AITECCAFE_Toolkit/🚫 AITEC NSFW Checker
ComfyUI Node

🚫 AITEC NSFW Checker

A local, key-free NSFW gate that can black out flagged frames

By AI-TEC·Created about a year ago·Updated about a month ago· 4
🚫 AITEC NSFW Checker
  • image
  • image
  • result
block_nsfwfalse
use_thresholdtrue
threshold0.80

If you want an NSFW filter that costs nothing, needs no API key, and never uploads a pixel, AITEC NSFW Checker is the pack's local answer - it runs opennsfw2, the same open-source detector FaceFusion and friends use under the hood, right on your machine. The contrast with the pack's AITEC Image Moderation node is the whole pitch: that one pays OpenAI per image and sends your content to their servers; this one is free and fully local.

Mechanically it's simple and a bit brutal: each image (or each frame of a video batch) is written to a temp JPEG and scored with opennsfw2's pretrained model, which returns a single 0–1 NSFW probability. The node tracks the maximum across all frames, reports per-frame stats, and decides whether to block. And here's the honest downside: opennsfw2 is one score, no categories - you get "how likely is this NSFW," not what kind. It's a gate, not an analyst.

The blocking logic is where you need to read the README's note, because two toggles interact:

  • block_nsfw - on, blocks whenever the max score hits opennsfw2's own internal threshold (≈0.5) and ignores your threshold entirely. The README is explicit: block_nsfw takes priority.
  • use_threshold (default on) - with block_nsfw off, blocks when the score crosses your threshold slider (default 0.8).
  • Both off: never blocks; you just get the report.

When it blocks, the output image becomes a 1×1 black pixel - not a same-size black frame like the OpenAI moderation node. That's a meaningful difference for downstream wiring: a 1×1 tensor won't preview nicely and will wreck any node that expects the original dimensions. Plan around it, or just read the result text and do your own branching.

The result string is actually well-built: status (NSFW/SAFE), max score, which mode blocked, and for video batches the worst frame index, average/min/max across frames. Outputs are image (original or 1×1 black) and result (STRING).

Installation is pack-wide, and this is the node that makes the requirements heavy:

cd ComfyUI/custom_nodes
git clone https://github.com/AI-TEC/ComfyUI-AITECCAFE-Toolkit
pip install -r ComfyUI-AITECCAFE-Toolkit/requirements.txt

That pulls in opennsfw2 and tensorflow, which is the big one - TensorFlow is a multi-GB dependency and is the reason this pack is a chunky install. First run also downloads the pretrained weights if they're not cached, so give it a moment. If tensorflow and your ComfyUI Python environment fight, that's the classic failure mode here - check the console for the import error before blaming the node.

Where it fits: batch pipelines that must not ship NSFW content onward - the pack's own Media Loader feeding frames through this checker before any save node is a natural pairing. Just remember the author's own advice, which applies to the whole pack's moderation tools: treat the score as a rough reference. No detector is a courtroom.

CategoryAITECCAFE-Toolkit

Inputs (4)

NameTypeDefaultDescription
imageIMAGE
block_nsfwBOOLEANfalse
use_thresholdBOOLEANtrue
thresholdFLOAT0.800–1

Outputs (2)

NameTypeDescription
imageIMAGE
resultSTRING