Nodes/civitai-comfy-nodes/Civitai Media Rating
ComfyUI Node

Civitai Media Rating

Civitai's own moderation brain, exposed as a node

By civitai·Created 2 months ago·Updated about a month ago· 42
Civitai Media Rating
  • image
  • api_config
  • nsfw_level
  • blocked_reason
  • is_blocked
  • labels
  • age_classification
  • face_recognition
  • ai_recognition
  • anime_recognition
  • workflow_id
  • raw_json
include_age_classificationfalse
include_face_recognitionfalse
include_airecognitionfalse
include_anime_recognitionfalse
enginedefault

This is the node that lets a machine tell you whether an image is NSFW - and a bunch of other things - using the exact same rating pipeline Civitai runs on its own uploads. If you're building an automated pipeline (batch-generating, auto-uploading, content filtering before a model card goes up), that's genuinely useful: it's the platform's own verdict, from the platform's own servers, so "Civitai would block this" and "this node says blocked" line up by construction.

How it works

It's one of the Analysis family in the Civitai pack: send an image up to the Orchestration API, get structured moderation data back. The key control is engine:

  • default - HiveVLM, a third-party moderation model.
  • civitai - Civitai's own rating engine, and the one you want if your goal is "will Civitai accept this?" The four boolean inputs (include_age_classification, include_face_recognition, include_airecognition, include_anime_recognition) are all flagged civitai engine only - on the default engine they're no-ops. Two of them (AI-vs-real and anime-vs-real detection) are also marked GPU-only on Civitai's side.

The output fan-out is the fun part. Eleven outputs:

  • nsfw_level, is_blocked, blocked_reason - the headline trio. If you're gating an upload, is_blocked + blocked_reason is your gate.
  • labels - what the model thinks is in the frame.
  • age_classification, face_recognition, ai_recognition, anime_recognition - the four optional analyses, when you asked for them on the civitai engine.

Inputs you actually set

  • image - an IMAGE input. The tooltip is unusually technical: the image is "pre-processed in the API layer - imported into blob storage so the worker can pre-fetch it as a declared resource," and after processing the output slot contains the blob AIR URL. Translation: you wire an image in, and Civitai handles the rest.
  • engine - default vs. civitai, as above. This is the decision that matters.
  • The four include_* booleans - all default false; flip the ones you want, on the civitai engine.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/civitai/civitai-comfy-nodes.git
pip install -r civitai-comfy-nodes/requirements.txt

Or ComfyUI Manager → "Civitai Comfy Nodes" → Install → restart. Authenticate (CIVITAI_API_TOKEN or sidebar), and remember every rating call costs a little Buzz.

Gotchas

This is the one node where "early preview" plus "someone else's policy" both bite at once. The moderation rules behind is_blocked are Civitai's, and they've shifted repeatedly through the platform's history - what's blocked today may not be blocked next quarter, and the pack regenerates node shapes from the API spec, so the option list can change too. Also, a rating is a model's opinion: HiveVLM and Civitai's engine disagree on edge cases, which is exactly why the engine switch exists. And remember the data flow - the image you send up is processed on Civitai's infrastructure, so this isn't the node for sensitive content you'd rather keep local. For gating your own pipeline against the platform's own standards, though, it's the closest thing to asking Civitai directly.

CategoryCivitai/Analysis

Inputs (7)

NameTypeDefaultDescription
include_age_classificationBOOLEANfalseInclude age classification analysis in the results (civitai engine only).
include_face_recognitionBOOLEANfalseInclude face recognition and similarity analysis in the results (civitai engine only).
include_airecognitionBOOLEANfalseInclude AI vs real image detection in the results (civitai engine only, GPU-only).
include_anime_recognitionBOOLEANfalseInclude anime vs real image detection in the results (civitai engine only, GPU-only).
imageoptIMAGEThe image to rate. Pre-processed in the API layer — imported into blob storage so the worker can pre-fetch it as a declared resource. After processing, contains the blob AIR URL.
engineoptSTRINGdefaultThe engine to use for media rating. Valid values: "default" (HiveVLM) or "civitai".
api_configoptCIVITAI_CONFIGOptional Civitai Auth connection; defaults to CIVITAI_API_TOKEN or stored OAuth login.

Outputs (10)

NameTypeDescription
nsfw_levelSTRING
blocked_reasonSTRING
is_blockedSTRING
labelsSTRING
age_classificationSTRING
face_recognitionSTRING
ai_recognitionSTRING
anime_recognitionSTRING
workflow_idSTRING
raw_jsonSTRING