Nodes/ComfyUI Safety Checker/Falcons AI Safety Checker
ComfyUI Node

Falcons AI Safety Checker

A purpose-trained NSFW classifier, not a CLIP heuristic

By shabri-arrahim·Created 2 years ago·Updated 2 years ago· 1
Falcons AI Safety Checker
  • image
  • STRING
  • IMAGE
model_name
safety_threshold0.90

This node's sibling in the same pack, CompVisSafetyChecker, wraps the notoriously trigger-happy checker that shipped with early Stable Diffusion. FalconsAISafetyChecker wraps a different model entirely: Falconsai/nsfw_image_detection, a Vision Transformer fine-tuned specifically to do one job - decide whether an image is "normal" or "nsfw." It's one of the more-downloaded NSFW classifiers on Hugging Face for a boring but good reason: it's small, it's free, and it doesn't need a whole Stable Diffusion pipeline dragged along to run it, which is exactly why a lot of hobbyist tools reach for it as their default.

Where you'd use it: same job as its sibling - an automated content gate at the end of a workflow that generates or receives images and needs to decide, without a human looking, whether something should get served further. Same caveat also carries over, and it's worth restating because someone on r/comfyui asked for this exact pack expecting it and it didn't fit their need: this checks the pixels, not the prompt. If your actual problem is stopping specific requests (real-person likeness, that category of concern), this doesn't touch that - it only ever judges the rendered image.

How it works

Where CompVis's checker measures CLIP similarity against a handful of fixed "unsafe concept" embeddings, this one is a straight binary image classifier - trained end-to-end on labeled normal/nsfw examples rather than reasoning by concept similarity. No concept-level breakdown, no "which category triggered it" - just a confidence score for "this looks nsfw."

The inputs and outputs that matter

  • image (IMAGE) - what gets classified.
  • model_name - dropdown sourced from your models/diffusers folder, empty until you've pulled the checkpoint down (see install).
  • safety_threshold (default 0.9, range 01) - a confidence gate, and a much more literal one than the CompVis node's. Read it as "how sure does the model need to be before it flags this." 0.9 is fairly conservative out of the box - it wants a strong nsfw signal before acting. Lower it if you want a more paranoid filter that catches borderline stuff; raise it toward 1.0 if you're getting false positives on things like swimwear or close-up skin and want it to only fire on the obvious cases.

Outputs: a STRING verdict and an IMAGE passthrough (expect it blacked out on a flag, same convention as the CompVis node). Feed the IMAGE onward to your save/preview node, and branch on the STRING if your workflow needs to react differently when something gets caught.

How to install it

Via ComfyUI Manager: search ComfyUI Safety Checker, install, restart - it's the same pack as CompVisSafetyChecker, so if you already installed that node you already have this one, you just need its model. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/shabri-arrahim/ComfyUI-Safety-Checker
cd ComfyUI-Safety-Checker
pip install -r requirements.txt

Then pull the actual classifier weights:

huggingface-cli download Falconsai/nsfw_image_detection \
  --local-dir models/diffusers/Falconsai_nsfw_image_detection

Restart ComfyUI afterward - the model_name dropdown only populates at startup.

Common issues & troubleshooting

model_name shows nothing. You need the huggingface-cli download step above, and the folder needs to actually be models/diffusers/Falconsai_nsfw_image_detection - not some other name or nested a level off from where the README puts it.

It's barely flagging anything. 0.9 is a genuinely high bar. That's a reasonable default if you'd rather under-flag than annoy users with false blocks, but if you want a stricter net, bring the threshold down - even to something like 0.50.7 - and see what changes.

You expected it to also check the prompt. It doesn't, and neither does its sibling node - both checkers in this pack only ever look at the rendered image. Prompt-side moderation is a separate problem this pack doesn't solve.

Node doesn't appear after install. Check it landed under custom_nodes/ and that you restarted the ComfyUI process - a browser refresh alone won't register a newly installed custom node.

CategorySafetyChecker

Inputs (3)

NameTypeDefaultDescription
model_nameCOMBO0 options:
imageIMAGE
safety_thresholdFLOAT0.900–1

Outputs (2)

NameTypeDescription
STRINGSTRING
IMAGEIMAGE