- api_config
- results
- signal_metadata
- blocked
- triggered_labels
- workflow_id
- raw_json
Most of the Civitai pack is about making stuff: images, videos, audio. This node is the opposite - it takes an arbitrary chunk of text and runs it through the XGuard content-moderation classifier, returning a verdict plus which policy labels fired. It's the sibling of the prompt-moderation node, with one difference: instead of grading a structured positive/negative prompt pair, you hand it any text and it just grades that.
Who actually needs this? The honest answer is fewer people than will install it out of curiosity. It earns its place in two scenarios: you're building an automated pipeline that accepts user-supplied text (captions, prompts, chat strings) and you want a pre-filter before anything gets generated or published, or you're doing moderation QA - checking what does and doesn't trip the classifier so your content doesn't get rejected downstream. If you're generating on Civitai's fleet, knowing the filter's shape ahead of time saves you failed jobs and wasted Buzz.
How it works
Same skeleton as every node in the pack, minus the media: the text goes up as an xGuardModeration workflow to Civitai's orchestration API, an LLM-based classifier grades it against a label set, and the verdicts come back as strings. The tooltips lay the mechanism bare - it's a chat-completion classifier, and store_full_response controls whether the raw response (logprobs array and all) gets kept in the result blob.
The inputs that matter
text(required) - the text to evaluate. Multiline, so paste whole paragraphs or wire in a string from another node.store_full_response(required, default false) - the debug switch. The tooltip is blunt about the cost: on, your result blob goes from ~2–3 KB to ~200 KB. Leave it off unless you're one-off debugging the classifier's token distribution.labels_json- narrows evaluation to only the named labels; anything not in the defaults (or overrides) is silently ignored. Empty = all labels.label_overrides_json- merges with / overrides the default label configs fromXGuardModerationOptionsGrainfor the mode. Defaults are fine until you know you need otherwise.
Outputs: results, signal_metadata, blocked (the verdict that matters), triggered_labels, workflow_id, and raw_json.
Install and auth
Part of the official civitai-comfy-nodes pack. ComfyUI Manager → Custom Nodes Manager → search Civitai Comfy Nodes → Install → restart, or git clone into custom_nodes + pip install -r requirements.txt (just requests). Credentials: Civitai Auth node → CIVITAI_API_TOKEN → stored OAuth/key → browser login.
Where people get burned
Don't mistake a local pre-check for a guarantee - the fleet's final moderation can differ from what this node evaluates, and it's a metered call like everything else here. And again: keep store_full_response off. It's a debugging tool with a 100x blob-size tax, not a setting to leave on.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| store_full_response | BOOLEAN | false | Debug opt-out. When true, the worker stores the full raw chat completion response (including the complete logprobs.content array) in the destination blob instead of the trimmed version. Intended for one-off debugging of classification decisions where the full logprobs distribution or generated token stream needs inspection. Leaves blobs at ~200KB instead of ~2-3KB — do not enable in normal traffic. |
| text | STRING | The text to evaluate. | |
| labels_jsonopt | STRING | Optional label filter. When provided, only the named labels are evaluated. Labels not found in the defaults (or label overrides) are silently ignored. When omitted or empty, all labels are evaluated. | |
| label_overrides_jsonopt | STRING | Optional label configuration overrides. When provided, these merge with/override the defaults from the XGuardModerationOptionsGrain for the given mode. | |
| api_configopt | CIVITAI_CONFIG | Optional Civitai Auth connection; defaults to CIVITAI_API_TOKEN or stored OAuth login. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| results | STRING | — |
| signal_metadata | STRING | — |
| blocked | STRING | — |
| triggered_labels | STRING | — |
| workflow_id | STRING | — |
| raw_json | STRING | — |