Nodes/PromptModels Studio/🔍 Text Prompt Blocker (Preview)
ComfyUI Node

🔍 Text Prompt Blocker (Preview)

The safe way to tune your blocklist

By cdanielp·Created 9 months ago·Updated 2 months ago· 28
🔍 Text Prompt Blocker (Preview)
    • original_prompt
    • status
    • detected_words
    â—„promptâ–ş
    â—„blocked_wordschild, kid, baby, infant, underage, young, school, nursery, teen, minor, toddler, preteenâ–ş
    â—„detect_containedtrueâ–ş
    â—„expand_variationstrueâ–ş

    The name says it all: this is the test bench version of the Text Prompt Blocker. The main node will happily stop your entire workflow with an exception the moment it sees a banned word. This one never blocks anything - it only tells you what it would have blocked. You feed it a prompt, it checks against your blocklist, and it reports back with a status string and the list of detected words. When you're building a safety filter, you want that separation: tune the list here without a single workflow-breaking exception, then copy the finished list into the real node.

    It's the kind of utility that saves you from a genuinely annoying iteration loop. The hard blocker's whole job is to fail loud; previewing a blocklist with the hard blocker means every false positive nukes your run. This node turns that into "here are the three words that matched, adjust accordingly."

    How it differs from the main node

    Fewer knobs, no enforcement. It keeps the two detection toggles that matter for tuning - detect_contained (substring matching, default on) and expand_variations (auto-variants + suffixes, default on) - but drops case_sensitive and hard_block entirely. There's no "block" path to configure because it never blocks. It's also marked as an output node, meaning it's designed to sit at the end of a graph and show you results.

    The inputs and outputs

    • prompt - the text to audit.
    • blocked_words - comma-separated list, same default as the hard blocker (child, kid, baby, infant…).

    Outputs:

    • original_prompt (STRING) - the input, passed through untouched.
    • status (STRING) - "âś… LIMPIO" when clean, or "⚠️ DETECTADO: N palabra(s) prohibida(s)".
    • detected_words (STRING) - comma-joined matched words, capped at ten with a "+N more" suffix.

    Installing it

    ComfyUI Manager → search "COMFYUI_PROMPTMODELS" → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cdanielp/COMFYUI_PROMPTMODELS
    

    No API key, no models - pure string matching, free to run. ComfyUI >= 0.26.0.

    The workflow that actually works

    Build the blocklist in this node first. Test your real prompts against it, watch which innocent words trip it (hello, "young adult"), and tune - turn off detect_contained for words with clean compound uses, prune over-eager expansions. Then paste the final blocked_words into the main Text Prompt Blocker and let it enforce. The pairing is the feature; use one to design, the other to defend.

    CategoryText/Security

    Inputs (4)

    NameTypeDefaultDescription
    promptSTRING—
    blocked_wordsSTRINGchild, kid, baby, infant, underage, young, school, nursery, teen, minor, toddler, preteen—
    detect_containedoptBOOLEANtrue—
    expand_variationsoptBOOLEANtrue—

    Outputs (3)

    NameTypeDescription
    original_promptSTRING—
    statusSTRING—
    detected_wordsSTRING—