ComfyUI Node

Get NSFW score

The raw NSFW score, before anyone commits to a verdict

By phyblas·Created 12 months ago·Updated 4 months ago· 17
Get NSFW score
  • image
  • score
model_name

GetNsfwScore is the plainest node in this pack and the one all the others inherit from. It takes an image, runs one of eight NSFW detectors, and returns a single score (FLOAT) between 0 and 1. No threshold, no boolean, no censoring - just the number. You'd reach for it when you want to see the confidence rather than get a yes/no, or when you want to do your own thresholding elsewhere in the graph.

How it works

The model_name dropdown is identical to the rest of the pack: compvis (default, and the author's pick for accuracy), falconsai, adamcodd, umairrkhn, marqo, gantman, nudenet (320) and nudenet (640). The detector downloads itself on first use and is cached in memory after that, so warm runs are fast.

Two honest caveats. First, the score scales differ between models - the README says so explicitly, and it's true in practice. A 0.5 in compvis isn't the same risk level as a 0.5 in falconsai. Second, if you pick one of the nudenet options, the score is just the highest-scoring NSFW element NudeNet found - you get no bounding box, no count, no idea where the content is. Use nudenet here only if you already know you want it.

The one output

  • score (FLOAT) - 0 to 1, higher means more likely NSFW.

Wire it into a > Compare or a primitive to make your own threshold, log it to a text node, or feed it into the score input of the fancier nodes in the pack to watch what they're deciding on. If you just want a boolean, use IsNsfw instead - it's this node plus a threshold.

Install

Shared with the whole pack - ComfyUI Manager (search "nsfw-shorier") or:

cd ComfyUI/custom_nodes
git clone https://github.com/phyblas/nsfw-shorier_comfyui

Restart ComfyUI after. First run per detector model is the slow one; the download is a one-time thing.

Gotchas

  • Different models = different score ranges. Calibrate before you trust a number.
  • The compvis model is a chunky CLIP-based download the first time you use it.
  • If you want location data or per-part scores, this is the wrong node - that's what FindNsfwPart is for.
CategoryNSFW

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
model_nameCOMBO8 options: compvis, falconsai, adamcodd, umairrkhn, marqo, gantman, +2

Outputs (1)

NameTypeDescription
scoreFLOAT