PromptRemove
Strip tags out of a prompt — with wildcards, so you can ban a whole family
- STRING
PromptRemove is the pack's bouncer: give it a prompt and a list of tags to kick out, and it returns the prompt minus those tags. Nothing fancy, but the wildcard support is the part that makes it genuinely useful - remove text, and it only kills the exact tag; remove *text*, and it kills every tag containing the word text, which is a very different and much more thorough cleanup.
This is the node you reach for when Ranbooru's built-in filter list isn't enough. The pack already drops the obvious junk (watermark, signature, ai_generated, and friends), but your pet-peeve tag won't be on its list. PromptRemove is where you add your own rules downstream, right before the CLIP Text Encode.
How it works
Split the prompt on separator, then for each entry in remove_tags either remove exact matches or - if the entry contains a * - remove every tag that contains the remaining substring. Multi-tag removal works by comma-separating remove_tags; each entry is handled in turn. Then it rejoins with the separator and hands back a STRING.
The wildcard semantics are simple and worth internalizing: * is stripped from your entry and a substring check runs, so background would also remove colored_background and white_background. That's usually what you want when you're cleansing a booru dump. Exact matches are the default for non-wildcard entries, so plain background only removes the literal tag.
Inputs and outputs
prompt- STRING, the prompt to clean.separator- STRING, default,. Must match your prompt's delimiter.remove_tags- STRING, default empty. Comma-separated list of tags to remove; embed*for substring matching.
Output: STRING, the cleaned prompt.
Installing it
Part of the Ranbooru pack: ComfyUI Manager, search "Ranbooru", or
cd ComfyUI/custom_nodes
git clone https://github.com/Inzaniak/comfyui-ranbooru
then restart. No requirements.txt, no model downloads - it's pure string handling.
Common issues
The separator gotcha is the same one as the rest of the prompt nodes: , versus , changes what counts as a tag boundary, and a mismatch makes exact-match removal silently fail. Also remember that matching is exact by default and per-tag - 1girl won't remove 1girls, and a tag with a leading space won't match a clean entry. When a removal "isn't working," check whether the tag actually differs by whitespace or pluralization, then reach for the wildcard. It's a deterministic node - no random state, no re-roll surprises - so a prompt in gives the same cleaned prompt out every time.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| separator | STRING | , | — |
| remove_tags | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |