Tag Filter (from list)
Does your prompt actually contain the tags you think it does? This node answers in two outputs
- filtered_tags
- missing_tags
Ever look at a prompt and realize you have no idea whether the quality tags you spent twenty minutes assembling actually made it in? If you're on an SDXL-lineage model - Pony, Illustrious, NoobAI, the lot - those tags are doing real work. score_9, score_8_up on Pony, masterpiece, best quality on Illustrious: they earn their place. This node is the two-second way to prove they're there, or find out they're not.
Tag Filter (from list) is a tiny pure-Python node from the bby-nodes pack. It takes one list of tags you care about (your reference list) and one list of tags to check (your actual prompt), and it tells you which ones matched and which ones went missing. It's the diff you keep re-reading your prompt to compute by eye.
How it works
The mechanism is boring, which is exactly why it's reliable. Both inputs get split on newlines and commas, so you can paste a prompt with 1girl, long hair, red dress or a quality list one-per-line - either works. Each reference tag is normalized (lowercased and underscores turned into spaces, unless you disable those toggles) and deduplicated, first occurrence wins.
Then it runs one of two modes, from the author's own description:
- exact - the tag must match a reference tag outright.
looking at viewermatcheslooking at viewer, nothing else. - partial - a reference tag found inside an input tag counts as a hit.
looking at viewerinsidewoman looking at viewermatches - and notably, the node returns the reference (canonical, shorter) form, not the longer input tag.
Where people get tripped up: partial mode isn't a substring sanity check per input - an input tag can match multiple reference tags, and all of them come back (deduplicated). And it's pure membership testing. There's no wildcard syntax, no regex, no glob. Don't go looking for *horns*; you'll be disappointed.
The inputs and outputs that matter
You set five things, and only three of them really need your attention:
- tag_list - your reference list: the tags you want to verify or extract.
- input_tags - the thing being checked: your actual prompt.
- match_mode -
exactorpartial(defaultexact). case_sensitive(default off) andstrip_underscores(default on) - leave both alone unless you know why you're touching them. Booru tags use underscores but models are trained on spaces, so the default normalize-on is the right call.
The two outputs are both plain comma-joined strings (not lists), which is handy: filtered_tags and missing_tags each wire straight into a CLIPTextEncode text input or a text-concat node. The classic workflow is to route missing_tags back into a concatenate and append whatever quality tag the check revealed was absent. Lazy, automatic, done.
Installing it
No dependencies, no model downloads, no wheels - this is a single-file utility, so install is the boring two-liner:
cd ComfyUI/custom_nodes
git clone https://github.com/Eonizer/ComfyUI-bby-nodes
Restart ComfyUI and you'll find it under the bbyNodes category in the node menu. Or just search "ComfyUI-bby-nodes" in ComfyUI Manager and hit Install. That's the whole install story; there is no second act.
Common issues
- Nothing matches and you're sure it should. Check
case_sensitiveandstrip_underscores. If you pasted a reference with underscores and the input uses spaces, and you flipped the toggle, that's your answer. - Partial mode gives you short tags you didn't paste. That's the canonical-form behavior above, not a bug. If you need the original wording back, use exact mode.
- You expected a list, got one big string. Outputs are comma-joined; most text inputs (including CLIPTextEncode) are happy with that, but a node expecting a list of tags won't be.
It's not the node you'll build a workflow around - it's the one that quietly saves you from shipping a batch where your quality tags got stripped somewhere upstream. For that job, it's exactly right.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| tag_list | STRING | — | |
| input_tags | STRING | — | |
| match_mode | COMBO | 2 options: exact, partial | |
| case_sensitive | BOOLEAN | false | — |
| strip_underscores | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| filtered_tags | STRING | — |
| missing_tags | STRING | — |