ComfyUI Node

Remove Prompt Cyan

A blacklist filter for your random prompts

By CyanAutumn·Created 2 years ago·Updated 12 months ago· 4
Remove Prompt Cyan
    • STRING
    black_text
    input_prompt

    Remove Prompt Cyan is the quiet half of the ComfyUi Random Manage Cyan pack, and it's probably the smarter half. Where its sibling Random Prompt Cyan adds randomized tags to your prompt, this one strips tags out - a blacklist filter for strings. The author's own description is one line: "黑名单tag删除用" - for deleting blacklisted tags. If you're batch-generating with wildcards, this is the node that keeps the results on-character.

    Think about the workflow the pack was built for: you randomize a character's appearance from wildcard files, queue fifty images, and hope. The problem is that random is random - sometimes the roll hands you "long hair, green eyes" when your character has none of that. Remove Prompt Cyan sits between the random node and the text encoder and deletes whatever you don't want, so you get variety only in the dimensions you actually care about.

    How it works

    It's blunt but honest: split the incoming prompt on commas, drop any tag that exactly matches an entry in your blacklist, and rejoin. The one piece of genuine cleverness is that it automatically checks both spaced and underscored forms - type long hair in black_text and it also blocks long_hair, because tag models flip between the two conventions constantly. The README spells this out: you only need to type the word with spaces.

    Two inputs, both simple:

    • input_prompt - the prompt string to filter (typically the output of Random Prompt Cyan, or any text node).
    • black_text - your comma-separated blacklist, multiline.

    One STRING output, which feeds the positive side of a CLIP Text Encode. And yes - same trap as its sibling: despite the "conditioning" category and the copy-pasted CLIP tooltip, this is a pure string node. No encoding happens; wire the string output into a real text encoder.

    Where it quietly lets you down

    • Exact match only. long hair in the prompt won't be touched by a blacklist entry of hair - substring matching isn't a thing here. Similarly, if your prompt carries weight syntax like (long hair:1.2) or long hair (detailed), the token no longer equals long hair and it sails through. Feed it clean, comma-separated, unweighted tags.
    • Commas are the only delimiter. A sentence-style prompt ("a woman with long hair in a forest") is one big token and the node shrugs at it. This tool assumes Danbooru-style tag prompts.
    • The rejoin uses " , " (comma-space), which is fine for CLIP encoders, just slightly unusual to read in a console if you debug the string.

    Installing it

    It ships in the same pack as Random Prompt Cyan, so one install covers both. Via ComfyUI Manager, search "ComfyUi Random Manage Cyan"; or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/CyanAutumn/ComfyUi_Random_Manage_Cyan
    

    then restart ComfyUI. No requirements.txt, no model downloads - just Python's stdlib. The one genuine requirement is a recent ComfyUI, because the pack imports the newer comfy.comfy_types API; the README warns that old builds won't even register the nodes, so if they're missing after restart, update ComfyUI first.

    It's a narrow tool - if you don't run randomized or wildcard-driven prompts, you'll never need it. But if you do, it's the cheapest way to enforce "this character never has X" across a whole batch without writing a script or re-rolling prompts by hand.

    Categoryconditioning

    Inputs (2)

    NameTypeDefaultDescription
    black_textSTRINGThe text to be encoded.
    input_promptSTRING字符串类型的输入

    Outputs (1)

    NameTypeDescription
    STRINGSTRINGA conditioning containing the embedded text used to guide the diffusion model.