LZ Tag Editor
Ten named tag slots with per-tag strength and on/off
- string
Hand-editing a booru prompt to bump one tag's weight or delete another is fiddly - and with weights you're juggling parentheses and colons while the whole thing stays unreadable. LZ Tag Editor gives you ten named slots, each with its own tagN_name, tagN_strength, and tagN_onoff toggle, and rebuilds the prompt string for you. Type a tag, set a strength, flip it off when you don't want it, and the output stays clean.
For Illustrious, NoobAI, Pony, and every danbooru-tag model, this is the comfortable way to work: the model wants comma-separated tags with occasional weight emphasis, and the editor turns that into a spreadsheet-like form instead of a wall of text. The KB's prompt-engineering doc makes the case that tag-based models reward exactly this discipline - quality tags, sensible strengths, no stray characters.
How the output is built
The source is straightforward: for each slot from 1 to 10, it takes the name, and:
- if
tagN_onoffis off, the tag is skipped entirely; - if strength is exactly 1.0, the tag is emitted bare;
- otherwise it's wrapped as
(tagname:strength).
Slots are processed in order and the loop stops at the first empty name - so slot 1, 3, 5 with 2 and 4 blank produces only tags 1, 3, 5. Empty middle slots are fine; a blank slot 1 leaves you with an empty prompt.
Inputs and a couple of gotchas
input_string(required) - a string input. Here's the honest quirk: the node parses it for(tag:strength)pairs, but the actual output is rebuilt entirely from the ten slots. Soinput_stringbehaves more like a scaffold / reminder of what's in play than the source of truth. The slots are the real controls - if you change a tag in the input box expecting it to flow through, it won't. Put your tags in the slots.
Two more things worth knowing. First, the output joins tags with a bare comma, no space (",".join). Most booru models don't care, but if you're feeding an encoder that does, pipe the result through a replace or concat to add spaces back. Second, tagN_strength is configurable up to 100, but that's a UI range, not a recommendation - practical CLIP weights live around 0.5–1.5, and past ~1.5 you're stacking distortion. Treat the upper range as "for your experimentation."
And the CLIP-model caveat applies here too: (tag:strength) syntax is inert on LLM-encoded models (Anima, Flux, Z-Image), where it becomes literal punctuation. On those, keep every strength at 1.0 (which emits bare tags) or skip the editor.
Installing it
Same pack, same install:
cd ComfyUI/custom_nodes
git clone https://github.com/liz-ils/ComfyUI-LZNodes
Restart ComfyUI, or Manager → search "ComfyUI-LZNodes". No extra dependencies, no model downloads.
If you don't need the per-slot toggles and just want a blanket weight applied to everything, LZPromptWeight in the same pack is the simpler tool - it wraps an entire comma-separated prompt with one default weight.
Inputs (31)
| Name | Type | Default | Description |
|---|---|---|---|
| input_string | STRING | — | |
| tag1_nameopt | STRING | — | |
| tag1_strengthopt | FLOAT | 1.000–100 | — |
| tag1_onoffopt | BOOLEAN | true | — |
| tag2_nameopt | STRING | — | |
| tag2_strengthopt | FLOAT | 1.000–100 | — |
| tag2_onoffopt | BOOLEAN | true | — |
| tag3_nameopt | STRING | — | |
| tag3_strengthopt | FLOAT | 1.000–100 | — |
| tag3_onoffopt | BOOLEAN | true | — |
| tag4_nameopt | STRING | — | |
| tag4_strengthopt | FLOAT | 1.000–100 | — |
| tag4_onoffopt | BOOLEAN | true | — |
| tag5_nameopt | STRING | — | |
| tag5_strengthopt | FLOAT | 1.000–100 | — |
| tag5_onoffopt | BOOLEAN | true | — |
| tag6_nameopt | STRING | — | |
| tag6_strengthopt | FLOAT | 1.000–100 | — |
| tag6_onoffopt | BOOLEAN | true | — |
| tag7_nameopt | STRING | — | |
| tag7_strengthopt | FLOAT | 1.000–100 | — |
| tag7_onoffopt | BOOLEAN | true | — |
| tag8_nameopt | STRING | — | |
| tag8_strengthopt | FLOAT | 1.000–100 | — |
| tag8_onoffopt | BOOLEAN | true | — |
| tag9_nameopt | STRING | — | |
| tag9_strengthopt | FLOAT | 1.000–100 | — |
| tag9_onoffopt | BOOLEAN | true | — |
| tag10_nameopt | STRING | — | |
| tag10_strengthopt | FLOAT | 1.000–100 | — |
| tag10_onoffopt | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |