Prompt Converter with Filter
Strip the Boilerplate and Keep the Tags You Took Out
- novelai3
- ponyxl
- animagine3.1
- illustrious
- animagine4.0
- filtered
The base Prompt Converter is great at one thing: turning a tag prompt into five model-specific strings. But sometimes you don't want all the tags. Feed a converted prompt into a negative prompt and the auto-stamped quality tags (masterpiece, best_quality, Pony's score_9 opener) pollute it. Or you want every rating tag stripped because you're handling the NSFW dial yourself. That's what this node adds: eleven category filter toggles and a sixth output that hands you back everything you filtered out.
What it adds
Prompt Converter with Filter is the same converter with a surgical extra. You get the identical five outputs - novelai3, ponyxl, animagine3.1, illustrious, animagine4.0 - plus filtered, a STRING containing the tags you removed. And its inputs grow from five booleans to sixteen: the usual text, rating, unique, auto_quality_tags, and remove_weights, then one toggle per tag category.
It works by subclassing the base node and hijacking the sort step. While it's looking each tag up in the 21 MB tag_dict.json to figure out its category for ordering, it also checks that category against your filter flags. Matches get pulled out of every model output and collected into one list, which comes back in the filtered output - deduped and sorted, comma-separated. When every filter is off it behaves exactly like the plain node, so nothing changes until you flip something.
The categories map to the Danbooru taxonomy plus a few node-internal groups:
- filter_general, filter_style, filter_genre, filter_character, filter_other - the standard board categories.
- filter_unknown - tags the dictionary doesn't recognize. Nice for auditing junk in a scraped prompt.
- filter_person, filter_score, filter_quality, filter_rating, filter_generation - the converter's own groupings: person/count tags, Pony's
score_*family, quality tags likemasterpieceandbest_quality, rating tags, and era tags (newest/late/mid/early/oldest).
The one trick worth building a workflow around
That filtered output is genuinely useful, not just a dumping ground. Two examples:
- Split SFW/NSFW. Set
ratingtosafeand turn onfilter_rating, and the removedgeneral/nsfw/rating_explicitmarkers land infiltered. Run the safe output through one sampler, wirefilteredinto a second CLIPTextEncode for an explicit pass. One prompt, both dials. - Keep characters separate. Turn on
filter_characterto strip every character tag from the main prompt and collect them in one string - handy when you want character identity steered by its own LoRA or its own CLIP branch instead of buried in the tag soup.
Installing it
Same pack as the base node - one clone installs both, so if you have Prompt Converter, this is already in your node list. If not:
cd ComfyUI/custom_nodes
git clone https://github.com/vkff5833/ComfyUI-PromptConverter
Restart ComfyUI and look for "Prompt Converter with Filter". No model downloads. The README mentions pip install -r requirements.txt, but that file doesn't exist in the repo and the node is pure standard-library Python - skip the pip step. Do expect a ~25 MB clone; almost all of it is the tag dictionary the filtering depends on.
Gotchas
Same ones as the base node, plus one filter-specific trap: the filtered output is just removed tags joined with commas. It's meant to be read or re-fed as a string, not further structured - don't expect a second set of categorized outputs. And remember the related-tag search in the UI calls Danbooru's public API over the network, so a silent search failure doesn't mean the conversion or filtering broke. Everything local runs offline, happily.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| rating | COMBO | safe | 4 options: safe, sensitive, questionable, explicit |
| unique | BOOLEAN | true | — |
| auto_quality_tags | BOOLEAN | true | — |
| remove_weights | BOOLEAN | false | — |
| filter_general | BOOLEAN | false | — |
| filter_style | BOOLEAN | false | — |
| filter_genre | BOOLEAN | false | — |
| filter_character | BOOLEAN | false | — |
| filter_other | BOOLEAN | false | — |
| filter_unknown | BOOLEAN | false | — |
| filter_person | BOOLEAN | false | — |
| filter_score | BOOLEAN | false | — |
| filter_quality | BOOLEAN | false | — |
| filter_rating | BOOLEAN | false | — |
| filter_generation | BOOLEAN | false | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| novelai3 | STRING | — |
| ponyxl | STRING | — |
| animagine3.1 | STRING | — |
| illustrious | STRING | — |
| animagine4.0 | STRING | — |
| filtered | STRING | — |