CL Tagger Action Filter
Keep the character, drop the pose
- filtered_tags
- removed_tags
- kept_count
- removed_count
- character_tags
- character_count
If you've reverse-engineered a prompt from an image, you know the tagger's output is a firehose: 1girl, long hair, blue dress, standing, looking at viewer, full body, blue eyes. Great - but half of it is the pose the source image happened to have, and the moment you feed that into a generator you're copying a composition you didn't want. CL Tagger Action Filter sits between a tagger and your prompt and cuts the list down to the parts you actually care about - with character tags pulled out on their own socket.
It's built for Mira CL Tagger v2 output specifically, and it does two jobs: keep the descriptive/character tags while filtering out action and pose tags (so you can re-pose freely), and extract character tags into their own string.
How it works
The node takes the tag text, splits it on commas, and canonicalizes every tag - lowercase, underscores to spaces, parens unescaped. Then each tag is looked up in a semantic classification cache that ships with the pack (action_tag_semantic_cache.json.gz, about 400KB, bundled in the repo - no download). That cache holds a score and margin for tags in categories like action_pose and gaze_eye_state, plus the full set of CL Tagger v2.00 character names.
The preset dropdown decides the score/margin thresholds:
- balanced - the recommended default.
- strict - keeps fewer tags; use when balanced still leaves junk.
- all_candidates - for testing; keeps everything classified so you can see what the cache actually knows.
With include_gaze on (default), gaze and eye-state tags count as keepable; flip it off and looking at viewer gets dropped too. Character tags are matched exactly against the 49,516 character entries in CL Tagger v2.00 and routed to the character_tags output regardless of the preset.
The inputs and outputs that matter
You only really set four things: tags (paste or wire the tagger's output in), preset, include_gaze, and separator (default ", ", which is what you want for Danbooru-style tag prompts).
Outputs are where it earns its keep:
filtered_tags- the descriptive tags minus actions. Wire this into your CLIP Text Encode positive prompt.character_tags- just the named characters, handy when you want to keep identity fixed while you re-pose or restyle.removed_tagspluskept_count/removed_count- for debugging what got thrown away.character_count- a quick sanity check that the character was actually recognized.
The honest caveats
The README is upfront that the action classification is experimental; the character matching is exact and reliable, the action/pose classification less so. So treat filtered_tags as a strong suggestion, and keep an eye on the counts - if strict strips tags you wanted, drop to balanced or all_candidates and check what's landing in removed_tags.
Two mechanical traps. First, the cache is keyed to CL Tagger v2.00's vocabulary - feed it output from a different tagger (WD14 variants, a newer CL Tagger) and tags will silently fail to match. Second, character matching is exact: a misspelled or differently-formatted character tag won't match, full stop. And if the cache file is missing from the node folder, you'll get a FileNotFoundError telling you exactly that - it should never happen since it ships in the repo, but it's loud when it does.
Installing it
Part of ComfyUI-Random-Text-Picker ("ComfyUI Prompt Tools"). Manager: search "Random Text Picker" or "Prompt Tools", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/hvnyiv/ComfyUI-Random-Text-Picker
Then restart. No Python dependencies beyond ComfyUI's own, and the only "model" it needs is that 400KB cache already in the repo. Update with git pull and a restart.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| tags | STRING | — | |
| preset | COMBO | balanced | 3 options: balanced, strict, all_candidates |
| include_gaze | BOOLEAN | true | — |
| separator | STRING | , | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| filtered_tags | STRING | — |
| removed_tags | STRING | — |
| kept_count | INT | — |
| removed_count | INT | — |
| character_tags | STRING | — |
| character_count | INT | — |