Nodes/ComfyUI-UtilsCollection/Text Encode with Z-Image Thinking Prompt
ComfyUI Node

Text Encode with Z-Image Thinking Prompt

The thinking-prompt encoder

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

Z-Image doesn't just read your prompt. Its Qwen3 encoder is a chat model that was trained to think before it answers, and ComfyUI's default text encode throws that ability away. This node gives it back: you feed a thinking block alongside your prompt, the node wraps both in Z-Image's chat template, and the model starts its "reasoning" from text you wrote instead of a blank <think>. It's the closest thing to steering a model's internal deliberation, and you'll feel it in prompt adherence and composition.

What it is

A single-purpose encode node: clip + prompt + thinking in, one CONDITIONING out. If thinking is non-empty it builds the template:

<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
<think>
{thinking}
</think>

That's the whole mechanism - and that's the whole point. It hands the encoder a filled-in chain-of-thought before generation. Leave thinking empty and it falls back to a plain Z-Image encode, so the node is safe to leave in a workflow.

Why you'd reach for it

Think of it as a controllable style/tone lever. Want a more deliberate, structured composition? Write thinking text that tells the model what to prioritize before it renders. Building a multi-shot storyboard? You can vary the thinking text per generation while keeping the main prompt fixed. It's a genuinely different axis of control than weights or word choice - same input text, different internal reasoning, different result.

It pairs naturally with UC_TextEncodeZITSystemPrompt (also in this pack), which adds a system prompt block instead of a thinking block. Use them together: system prompt for the standing rules, thinking prompt for the per-generation reasoning.

The inputs that matter

  • clip - your Z-Image / Z-Image Turbo / Z-Image Base text encoder (the Qwen3-based one that ships with the model). This is not for Flux or SDXL encoders.
  • prompt - your actual prompt. Braces and weight syntax work.
  • thinking - the reasoning text injected inside <think>. The whole point of the node.

Output is a single CONDITIONING, straight into a KSampler like any text encode.

Installing it

Part of ComfyUI-UtilsCollection:

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

Restart ComfyUI afterwards, or use ComfyUI Manager and search "ComfyUI-UtilsCollection". Light dependencies, but the pack requires a recent ComfyUI (it's built on the current Core node API).

Common issues

The one real gotcha is using it with the wrong encoder. It's Z-Image/Qwen3-specific; on a T5 or CLIP encoder the template means nothing and you'll see odd conditioning. Also, Turbo and Base handle thinking differently - Turbo is guidance-distilled and runs at CFG 1, so expect subtler effects there than on Base, where you have room to tune (CFG 3-5, 25-50 steps per the community standard for Z-Image Base). If the thinking text seems ignored entirely, double-check your clip is actually the Qwen3 encoder and that ComfyUI Core is recent - this node tracks current Core encoder behavior, and old installs misbehave in confusing ways.

Categoryadvanced/conditioning

Inputs (3)

NameTypeDefaultDescription
clipCLIP
promptSTRING
thinkingSTRING

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING