Text Encode System Prompt (Scaled Bias)
One encoder, three model templates
- clip
- CONDITIONING
Here's a thing nobody warns you about when you move from SDXL-era checkpoints to the 2026 LLM-encoded models: those checkpoints' text encoders are actual chat LLMs, and they expect their prompts wrapped in the exact chat template they were trained on. Drop a system prompt into a plain CLIP Text Encode and the model may treat your markup as literal text - the KB's troubleshooting doc has a whole section on (word:1.4) being fed in as punctuation. This node handles the wrapping for three model families at once and adds a bonus: token-level emphasis that works on LLM encoders.
How it works
Inputs: clip, prompt, system_prompt, a model_type combo (flux2dev, klein, or z-image), and thinking_content (Klein only). Pick the model type and the node builds the right chat template - Flux 2 dev's Mistral-style [SYSTEM_PROMPT]...[/INST] wrapper, Klein's Qwen3 <|im_start|> format with its <think> block, or Z-Image's Qwen3-style system-then-user layout. The prompt is encoded inside that wrapper, so your system prompt actually lands where the model expects it, and the output is a standard CONDITIONING you feed into the positive/negative socket of any sampler.
The "scaled bias" half is the interesting part. Inside the prompt you can write emphasis as <word=1.5> - angle brackets around the text you want, an equals sign, and a strength. The encoder tokenizes the prompt, isolates the tokens for that word, and scales their embedding vectors by the strength value. It's a per-token scaling applied directly to the conditioning embeddings, not a CFG-based weight and not the SD-style (word:1.2) syntax that LLM encoders mangle. Same end goal - make the model pay more attention to a phrase - but it works on Qwen/Mistral-style encoders where the old syntax is literal punctuation. Any prompt without <word=strength> tags just encodes normally, so the node is safe as a drop-in replacement for a plain text encode.
The inputs that matter
model_type- get this right; it's the whole point. Flux 2 dev, Klein, or Z-Image have different templates and different encoders, and mixing them up produces garbled conditioning.prompt/system_prompt- your content. Leavesystem_promptempty and it encodes with no system wrapper at all.thinking_content- Klein only; inject custom chain-of-thought text inside the<think>block. Empty uses the model's default thinking.
Output: one CONDITIONING socket.
Install
Ships in ComfyUI-UtilsCollection:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart, or use ComfyUI Manager (search "UtilsCollection"). No model downloads - you bring your own checkpoint, and its CLIP (via Core's Load CLIP) is what you wire into the clip input.
Gotchas
The obvious one is matching the node to the model: it's a template wrapper, and templates are model-specific. Also note the whole scaled-bias family is marked experimental, so expect occasional API churn as the author tracks Core behavior. And if the encoder gives you the "clip input is invalid" error, your checkpoint genuinely has no usable text encoder loaded - double-check the Load CLIP wiring before assuming the node is broken.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| model_type | COMBO | flux2dev | Select the model type to use the correct template format. |
| prompt | STRING | — | |
| system_prompt | STRING | — | |
| thinking_content | STRING | (Klein only) Custom thinking content to inject. Leave empty for default. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |