ZML_筛选提示词V2
Strip tags you don't want, by category, with translations — ZML_筛选提示词V2
- 筛选后文本
- 过滤提示词
- 过滤翻译
ZML_筛选提示词V2 filters a prompt by category - not by typing a list of banned words, but by flipping switches named 艺术家 (artist), 场景 (scene), 服饰 (clothing), 物品 (object), and so on. Flip "artist" on, and every artist tag in your prompt gets stripped out. That's a surprisingly useful superpower when you inherit a workflow with someone else's artist pile and want it gone.
The mechanism is grounded in data the author actually sourced: the keyword lists come from a hand-curated tag library by the Civitai user Miaoka (the README credits 《喵咔》's 妙妙小工具 as the inspiration). The pack ships ten category files in zml_w/txt/miaoka/ - 二次元角色, 人物, 场景, 服饰, 物品, 环境, 画面, 艺术家, 表情动作, 镜头 - each a list of tags, plus an English-to-Chinese translation map per category. At run time the node loads the sets for whatever switches you've enabled, merges in any 自定义过滤词 you typed (comma-separated), then walks your input line by line and drops every tag whose core name matches.
Three outputs, and they're the reason this is more than a filter:
筛选后文本- your prompt with the matched tags removed, punctuation-formatting applied on top过滤提示词- a flat comma-separated list of everything it removed过滤翻译- one per removed tag, asenglish/中文/分类, e.g.artist//艺术家
That last output is the fun part: it tells you what it took out and why, in both languages. Beginners learn their tag vocabulary by watching the filter explain itself. You can also chain it: feed 过滤提示词 elsewhere, or use it as a whitelist elsewhere in the graph.
Installing it
Ships in ComfyUI-ZML-Image. Manager → install ComfyUI-ZML-Image, or:
cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
Restart. No downloads - the Miaoka keyword files are bundled. UI is Chinese by default; the English patch is at https://github.com/zml-w/ZZZ_ZML_English_Patch. Note the node's 输入文本 requires a wire (forceInput), so you can't just type into it - connect a text node or your prompt encoder's output first.
Common issues
The biggest gotcha is expectations. This is a drop matching tags filter, not a "keep only these categories" sorter - tags not in any enabled category pass through untouched. If you expect a 场景-switch to wipe everything non-scene, you'll be confused. It also filters against the core tag: (tag:1.2) and {{tag}} are matched on tag after stripping weight syntax, which is the right behavior.
The Miaoka word lists are anime-tag-centric. If you're on a photorealistic SDXL workflow the categories will under-match and the filters will feel weak - that's the data, not a bug. And remember the filter operates per-line, preserving your original line breaks, so a one-line mega-prompt and a block-structured prompt behave the same.
Author's own caveat applies here too: the pack is a solo dev's personal toolkit, updated weekly, and while this node was rebuilt from the Miaoka tool it's still Chinese-first. If a switch doesn't seem to bite, check whether the tag you're testing is actually in the shipped lists before assuming it's broken.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| 输入文本 | STRING | — | |
| 自定义过滤词 | STRING | — | |
| 二次元角色 | BOOLEAN | false | — |
| 人物 | BOOLEAN | false | — |
| 场景 | BOOLEAN | false | — |
| 服饰 | BOOLEAN | false | — |
| 物品 | BOOLEAN | false | — |
| 环境 | BOOLEAN | false | — |
| 画面 | BOOLEAN | false | — |
| 艺术家 | BOOLEAN | false | — |
| 表情动作 | BOOLEAN | false | — |
| 镜头 | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 筛选后文本 | STRING | — |
| 过滤提示词 | STRING | — |
| 过滤翻译 | STRING | — |