Nodes/ComfyUI-UtilsCollection/Text Encode with Z-Image Thinking Prompt (Scaled Bias) (Legacy)
ComfyUI Node

Text Encode with Z-Image Thinking Prompt (Scaled Bias) (Legacy)

Inject reasoning into a Z-Image prompt

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
Text Encode with Z-Image Thinking Prompt (Scaled Bias) (Legacy)
  • clip
  • CONDITIONING
prompt
thinking

Some Z-Image-family checkpoints are trained with a thinking prompt variant: before the model produces its answer, there's a reasoning block you can fill - and the model genuinely reasons about it before rendering. That's a strange, powerful lever in image generation, and it has no equivalent in a plain CLIP encoder. This node is the way to reach it: it takes your prompt and an explicit thinking text, wraps them in Z-Image's think template, and encodes - with the pack's scaled-bias emphasis syntax available on top.

How it works

Inputs are clip, prompt, and thinking. The node builds Z-Image's think template - <|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n<think>\n{thinking}\n</think> - encodes it, and returns CONDITIONING. Leave thinking empty and it degrades to a plain encode with the structural placeholder. The scaled-bias layer scans the prompt for <name=number> tags and scales those token embeddings, so you can weight a concept inside the request even though the model is an LLM encoder.

What the think block buys you

Think of it as giving the model a line of "inner monologue" before it commits. A thinking prompt like the light is low and golden; the dress is wet; keep the face readable hands the model reasoning it can build the image around, rather than just a flat request it has to decode. People who use Z-Image's thinking variant report noticeably better adherence on prompts where the logic of the scene matters - the "why" helps the "what". This is also the format Z-Image's own thinking-capable checkpoints were trained with, so you're speaking the model's language.

Where people get burned

  • Not every Z-Image checkpoint is the thinking variant. If your model wasn't trained with the think block, injecting reasoning changes nothing (at best) or adds odd formatting artifacts (at worst). Check what you actually loaded.
  • This is Z-Image's template - don't feed a Flux 2 or Klein clip.
  • The thinking text is a real reasoning injection, not a second prompt; write it as such, not as a list of more tags.
  • Bias syntax <tag=1.3> in the prompt is supported; in the thinking field it's just text.

Installing it

Ships in silveroxides/ComfyUI-UtilsCollection. ComfyUI Manager: search ComfyUI-UtilsCollection, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
cd ComfyUI-UtilsCollection
pip install -r requirements.txt   # opencv-python, typing-extensions

Restart. No node-specific model downloads. Legacy alias of UC_ScaledBiasTextEncodeZImageThinkPrompt, identical behavior.

Categoryadvanced/conditioning

Inputs (3)

NameTypeDefaultDescription
clipCLIP
promptSTRING
thinkingSTRING

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING