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

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

Let the model think before it draws

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

Z-Image's Qwen3-4B encoder is a reasoning model, and reasoning models have a trick that image-prompting mostly ignores: you can hand them an explicit thought to "think" before they produce the answer. UC_ScaledBiasTextEncodeZImageThinkPrompt is the node that injects your chain-of-thought into Z-Image's <think> block - the difference between "draw a rainy street" and "the model reasoned through a rainy street before rendering it."

How it works

The node builds a Qwen3-style template: a user turn containing your prompt, then an assistant turn that opens with a <think> block. Your thinking text goes inside that block. That's the shape Z-Image's encoder was trained to generate, and it's distinct from the sibling UC_ScaledBiasTextEncodeZITSystemPrompt node: that one wraps a system prompt; this one wraps reasoning. Leave thinking empty and the node falls back to a plain encode with no think block, so it degrades gracefully.

Like the rest of the scaled-bias family, it also supports token-level emphasis - <word=1.5> inside the prompt scales those tokens' embeddings, which is the Qwen-compatible replacement for the SD-style parentheses this model's tokenizer reads as literal text. Inputs: clip, prompt (multiline), thinking (multiline). Output: one CONDITIONING socket for the sampler's positive or negative input.

What to put in the think block

The practical pattern: a short, concrete reasoning paragraph that pre-decides the hard parts of the image - lighting, composition, subject placement, material - before the model has to commit. "The scene is a narrow alley at dusk, a single warm shop light on the left, wet cobblestones reflecting it, one figure mid-stride facing away." Instead of the model free-associating from the prompt, it starts from your decisions and renders them. It's the closest thing local Z-Image has to the "think before you answer" behavior that made reasoning LLMs feel smart, and it's worth an afternoon of experimenting because the difference is often dramatic on complex scenes.

Install

Part of ComfyUI-UtilsCollection:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection

Restart, or use ComfyUI Manager (search "UtilsCollection"). You supply the Z-Image CLIP; the pack adds no model downloads. Requirements auto-install.

Gotchas

The standing family rule applies: Z-Image CLIP only - the <think> wrapper is Z-Image/Qwen-specific, and feeding it a different model's CLIP produces silently wrong conditioning rather than an error. This whole encoder family is marked experimental, so treat the API as moving. And don't overstuff the think block; if the reasoning gets longer than the prompt, you're usually fighting yourself. Also fine to combine with the system-prompt variant (system node upstream, thinking node here) if you want both.

Categoryadvanced/conditioning

Inputs (3)

NameTypeDefaultDescription
clipCLIP
promptSTRING
thinkingSTRING

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING