Keep Only English Tags [LP]
Keep Only English Tags [LP] — ComfyUI Node Guide
- tags TEXT
A cleanup pass for comma-separated tag strings: feed it a tag list and get back the same list with anything non-English stripped out. Small node, but it solves a genuinely annoying problem if you're working with autotagged or scraped datasets.
Why you'd need this
Danbooru-style tagging - the vocabulary Illustrious, NoobAI, and most anime-focused models were trained on - is the standard prompting interface for that whole model family: exact tags for pose, clothing, camera angle, character beat sentences for precision. That system lives and dies on the tag strings actually being clean, consistent English tokens the model recognizes. The problem is that real-world tag sources aren't always that tidy - scraped datasets, multilingual boorus, or autotaggers run over mixed-language source material can hand you tag strings with stray non-English tokens mixed in among the tags you actually want.
If you're prepping a tag list before it hits a prompt, a training caption, or anywhere downstream that expects clean English tags, running it through this first means you're not manually eyeballing every string for tokens that shouldn't be there.
Inputs and outputs
text(STRING, multiline, default empty) - your tag string, presumably comma-separated in the shape typical Danbooru-style tag lists take.
Output: tags TEXT (STRING) - the same content with non-English entries removed.
This node lives in this pack's "Tags" category specifically, distinct from Keep Only English Words which sits in "Text" - the category split is the clearest signal for which one fits your input: this one for a comma-separated tag list, the other for freeform prose or captions.
Installing it
ComfyUI Manager: search "ComfyUI-LevelPixel" (listed as "Level Pixel"), install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/LevelPixel/ComfyUI-LevelPixel.git, restart ComfyUI. No models, no extra dependencies - text processing only.
Common issues
Since this strips non-English content, feed it output that's actually shaped like a tag list - if what you're holding is a full sentence rather than comma-separated tags, you probably want Keep Only English Words instead, which is built for that shape.
If a tag you expected to survive got stripped, the likely cause is mixed-script content inside a single tag token (a tag that's partly romanized and partly not, or carries a stray non-Latin character), which this kind of filter tends to treat as non-English wholesale rather than partially cleaning. Spot-check your output against your input if results look aggressive - this is the kind of node worth eyeballing on a sample before running it across an entire dataset unattended.
And remember this only filters by language - it's not validating that surviving tags are actually real, recognized Danbooru-style vocabulary. A garbled but Latin-alphabet token will pass right through untouched; this node's job is language filtering, not tag correctness.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tags TEXT | STRING | — |