LZ Prompt Weight
Stop hand-typing (tag:1.2) everywhere
- prompt
If you've ever rewritten a prompt by hand to add (tag:1.3) to half a dozen tags, you know it's tedious and error-prone - drop a parenthesis and the whole weight silently fails. LZ Prompt Weight does the wrapping for you: feed it a comma-separated prompt, set a default weight, and it emits (tag:weight) syntax for every tag.
The mechanism, from the source: it splits the prompt on commas, and for each tag decides what to do. A tag already wrapped as (tag:weight) passes through untouched. A tag written as tag:1.2 gets parsed into the tag and its weight. Anything else gets the default_weight applied. Tags at exactly weight 1.0 are emitted bare (no wrapper), and whole-number weights render without decimals - so (tag:2) rather than (tag:2.0).
The inputs
prompt- the comma-separated tags. Not multiline in the schema, so keep it one line.default_weight- a float from 0.1 to 1.9, default 1.0. This is the weight every unwrapped tag receives.separator- how tags get joined back together. Default", ", which is the booru-friendly format.- Output:
prompt- the weighted string, ready for a CLIP text encoder.
The big caveat: this only matters on CLIP models
This is the point where I have to be honest, because the KB hammers it: (tag:weight) attention syntax is a CLIP-era feature and it is inert on LLM-encoded models - Flux, Anima, Z-Image, and anything else with an LLM text encoder treat your parentheses and colons as literal characters. Worse than useless: it becomes punctuation noise inside your instruction. On those models, don't run your prompt through this node, or at minimum set weights that read as plain words.
On SD 1.5, SDXL, and every anime finetune built on them (Illustrious, NoobAI, Pony), it's a genuine time-saver. The practical range is roughly 0.5–1.5; below 0.5 the concept barely registers, above 1.5 you get oversaturation and distortion. The node lets you set up to 1.9, and the moment you push past ~1.5 you're usually doing more harm than good - stacked weights have been a beginner trap since the SD 1.5 era.
What it does not do
It doesn't handle nested parentheses, AND, BREAK, or any of the fancier syntax - it's a straight tag-wrapper. And if your prompt is natural-language sentences rather than comma tags, splitting on commas and re-wrapping every fragment will mangle it. This is a tool for booru-style tag prompts; if you write sentences, skip it. It also leaves already-weighted tags alone, which is the right call - it won't double-wrap your hand-written weights, just normalizes the rest to your default.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/liz-ils/ComfyUI-LZNodes
Restart ComfyUI, or use Manager → search "ComfyUI-LZNodes". No extra dependencies, no model downloads.
The companion for manual tag control is LZTagEditor in the same pack - same idea, but ten named slots with per-tag strength and on/off toggles instead of a blanket default weight.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| default_weight | FLOAT | 1.000.1–1.9 | — |
| separator | STRING | , | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |