NSFW Filter Policy (Label Table)
Five independent toggles when the strictness ladder doesn't fit
- block_policy
Where the Level 1-4 node gives you a strictness ladder, NSFW Filter Policy (Label Table) gives you the raw switchboard: five independent checkboxes, one per class the Viddexa classifier can output. Reach for this one when the level presets don't fit - you want to block hentai but allow sexy, for instance, which the strictly-nested level system can't express, since each level only ever adds to the one below it.
How it works
The classifier behind this pack sorts every image into one of five buckets: porn, hentai, sexy, drawing, or normal. This node is just five booleans, one per bucket, and it packages whichever ones you flip true into a block_policy object. The defaults - porn, hentai, and sexy on, drawing and normal off - reproduce the pack's documented default policy exactly, so if you're happy with that policy you don't actually need this node at all. It's only useful the moment you want to deviate from it.
The inputs and outputs that matter
Five booleans, all required, all independent:
porn(defaulttrue)hentai(defaulttrue)sexy(defaulttrue)drawing(defaultfalse) - flip this on if you also want to catch anime/manga-style explicit content, which the classifier treats as a separate bucket from photographic content.normal(defaultfalse) - this is the "safe" bucket. Flipping it on means you're blocking images the classifier thinks are fine, which is almost never what you want; it's there for completeness, not because it's a common setting.
One output: block_policy (NSFW_BLOCK_POLICY), same connector type as the level-based policy node, so it plugs into the same places - the optional block_policy input on either check node.
How to install it
Standard install for the whole pack. ComfyUI Manager: search "NSFW Guard", install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/vuhung3990/comfyui-nsfw-guard
pip install -r comfyui-nsfw-guard/requirements.txt
then restart. Like the level-policy node, this one builds a policy object and doesn't run any classification itself, so it's not what pulls in moderators/transformers or downloads any model weights - that happens over in NSFW Load Model and the check nodes.
Common issues & troubleshooting
You flipped normal on and now every image gets blocked. That's exactly what it does - it's not a bug, it's the one setting on this node that's genuinely easy to fat-finger into uselessness. Unless you have a specific reason to also block "safe" content, leave it off.
You want stricter-than-default but the level node doesn't offer the combination you need. That's this node's whole reason to exist - independent toggles instead of the level ladder. Turn on exactly the classes you want blocked and leave the rest alone.
Policy doesn't seem to apply. Check the output is actually connected to a check node's block_policy input, not left floating - an unwired policy node produces a block_policy value that just sits there unused; the check node needs the wire to actually adopt it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| porn | BOOLEAN | true | — |
| hentai | BOOLEAN | true | — |
| sexy | BOOLEAN | true | — |
| drawing | BOOLEAN | false | — |
| normal | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| block_policy | NSFW_BLOCK_POLICY | — |