Weighted System Prompt Text Encode
1.3) weighting back to LLM-encoded models — system prompt included
- clip
- CONDITIONING
Here's the problem this node exists to fix: your 2026 model's text encoder is a full language model, and ComfyUI's classic (word:1.3) prompt weighting is silently discarded by it. Flux 2 Dev encodes with a Mistral-3, Z-Image and Klein with Qwen3, Krea 2 with Qwen3-VL - and the wrapper those encoders run under passes disable_weights=True, so your carefully weighted prompt is read as flat text. The KB's own prompt-engineering doc calls it outright: "(word:1.3) is silently discarded." Every SD1.5/SDXL habit died in one step.
This node is the workaround, and it's the node in this pack's VLM/text family you'll actually reach for. It does two things at once: it builds a proper chat-template system prompt for the encoder, and it re-implements per-word weighting the way it has to work on an LLM encoder - by scaling the embedding vectors themselves.
How it works
Two mechanisms, worth separating. First, system_prompt (and optional thinking_content) get injected into a template matched to the model_type you pick. Flux 2 Dev gets a [SYSTEM_PROMPT]...[/SYSTEM_PROMPT][INST]...[/INST] Mistral-style block; Klein and Z-Image get <|im_start|>system / <|im_start|>assistant Qwen chat delimiters, with Klein and z-image-thinking additionally wrapping your thinking content in <think>...</think> tags. Pick the model type that matches the CLIP you loaded, and your system prompt actually takes effect instead of leaking in as prompt tokens.
Second, weighting. The node parses (word:1.3) style segments in the prompt, tokenizes the text progressively, maps each weighted range to its tokens, and scales the embedding vectors for exactly those token positions - the "classical scaled bias" approach, applied manually because Core refuses to. Then a separate multiplier scales the whole conditioning tensor (and its pooled output) by a constant, which is a different knob: per-word weight vs. global strength.
Inputs and output
- clip - your text encoder, from Load CLIP / a checkpoint loader. Must match
model_type. - model_type -
flux2dev(default),klein,krea2,z-image,z-image-thinking. This one matters: get it wrong and the template is wrong. - prompt - your prompt, with
(word:1.2)weights. Supports dynamic prompt wildcards. - system_prompt - optional system role text.
- thinking_content - optional
<think>block for Klein / z-image-thinking. - multiplier - float, default 1.0 (no-op). Negative values flip the conditioning, which is usually a mistake, but it's there.
Output is a standard CONDITIONING that feeds straight into your sampler's positive (or negative) input - same socket as any Text Encode node.
Installing it
Ships in ComfyUI-UtilsCollection. ComfyUI Manager → search ComfyUI-UtilsCollection → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Deps are light (opencv-python, typing-extensions) and no extra model files are needed - the encoder is whatever you load yourself. Heavy downloads in this pack belong only to the MiniMax H3 projection nodes.
Where people get burned
Loading a Qwen3 encoder while model_type says flux2dev. The node can't know which CLIP you wired in, so the template silently mismatches and your system prompt stops working. Check model_type first whenever results look wrong. And don't expect (word:1.3) to behave identically to SDXL - it's applied as embedding scaling, which is the closest thing these encoders can do, not the same attention-level weight. It's close enough that most people stop missing the old syntax once they have it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| model_type | COMBO | flux2dev | 5 options: flux2dev, klein, krea2, z-image, z-image-thinking |
| prompt | STRING | — | |
| system_prompt | STRING | — | |
| thinking_content | STRING | — | |
| multiplier | FLOAT | 1.0-1000–1000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |