Z-Image Text Encoder
Talk to Z-Image's Qwen3 encoder like it's a chat
- clip
- conversation_override
- conditioning
- formatted_prompt
- debug_output
- conversation
Z-Image doesn't read your prompt the way SDXL did. Its text encoder is Qwen3-4B - an actual language model - so under the hood your prompt gets wrapped in a chat template with a system message, an optional <think> block, and an assistant turn before a single token reaches the diffusion model. The stock ComfyUI CLIPTextEncode hides all of that and just feeds it your words. ZImageTextEncoder is the node that hands you the whole conversation to play with.
That's the entire pitch of fblissjr's pack, and it's worth being honest about what it is: a research sandbox, the author's own words, a hobbyist free-time project with breaking changes promised up front. It's complementary to the native nodes, not a replacement. If you just want a picture, CLIPTextEncode is fine. If you want to understand why Z-Image ignored half your prompt, this is where you poke at it.
How it works
Z-Image's encoder is an autoregressive LLM, which is the big shift the whole current generation of models made - Qwen3 here, Mistral on Flux 2, Qwen2.5-VL on the Qwen-Image line. It reads your prompt as an instruction, not a bag of tags. So the old CLIP muscle memory is dead: ((word:1.4)) weighting does nothing, negative embeddings have nothing to bind to, and there's no CLIP skip. What you get instead is the chat structure. This node lets you set the system prompt (style direction), pre-fill a <think> block (interpretation hints), and even seed an assistant turn - the exact levers the model was trained on.
Fair warning from the README's own examples: those extra channels fight your user prompt and don't always win cleanly. System-plus-thinking-plus-assistant can overpower parts of what you actually asked for - in the author's test it won "dog vs cat" but lost "pink vs white." The user prompt is the strongest signal; everything else is a nudge.
The inputs and outputs that matter
clip(required) - your Qwen3-4B text encoder, loaded through ComfyUI's standard CLIP loader.user_prompt(required) - the thing you're actually generating. This dominates; write it first and keep it tight.system_promptandtemplate_preset- style steering. The preset dropdown carries ~145 built-in system prompts (anime_ghibli, art_deco, and so on); pick one or write your own.add_think_block(default on) andthinking_content- the<think>channel. Leave the toggle on; fill the content only when you want to hint interpretation.
Outputs: conditioning goes to your KSampler's positive input. formatted_prompt shows you the exact text that got encoded - genuinely useful for seeing why something misfired. debug_output is verbose tracing. And conversation (a ZIMAGE_CONVERSATION object) is what you chain into ZImageTurnBuilder for multi-turn character edits.
One more thing worth internalizing: the LLM encoder has no hard 77-token wall, so nothing truncates. That is not permission to write essays. Drift sets in past roughly 75-100 effective tokens - 3-5 strong concepts, subject first, beats a wall of adjectives.
How to install it
ComfyUI Manager: search ComfyUI-QwenImageWanBridge, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/fblissjr/ComfyUI-QwenImageWanBridge
then restart. The nodes themselves are lightweight - the real download is the models: a Z-Image checkpoint plus the Qwen3-4B text encoder (community GGUF and fp8 builds exist if 16GB is tight).
Common issues & troubleshooting
Your negative prompt does nothing. On Z-Image Turbo that's expected - it runs at CFG 1, guidance-free, so negatives have no effect regardless of this node. Base runs CFG 3-5 and does respond; use ZImageTextEncoderSimple for the negative side.
Prompt weighting isn't working. It won't. That syntax was CLIP-era and the LLM encoder path never implemented it. Steer with sentence structure and the system prompt instead.
The style prompt is eating your subject. Turn down how much you're loading into system/thinking/assistant, or clear them. Check formatted_prompt to see what actually got sent - that output exists precisely for this.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| user_prompt | STRING | Your prompt - what you want the model to generate | |
| trigger_wordsopt | STRING | LoRA trigger words - prepended to user_prompt. Can convert to input for LoRA loader connection. | |
| conversation_overrideopt | ZIMAGE_CONVERSATION | Connect from ZImageTurnBuilder - uses this conversation instead of building one | |
| template_presetopt | COMBO | none | Select template - auto-fills system_prompt field (editable) |
| system_promptopt | STRING | System prompt - auto-filled by template, edit freely | |
| add_think_blockopt | BOOLEAN | true | Add <think></think> block. Default True matches DiffSynth/diffusers reference implementations. |
| thinking_contentopt | STRING | Content inside <think>...</think> tags (auto-enables think block) | |
| assistant_contentopt | STRING | Content AFTER </think> tags (what assistant says after thinking) | |
| raw_promptopt | STRING | RAW MODE: Bypass ALL formatting. Write your own <|im_start|> tokens. All other fields ignored when set. | |
| strip_key_quotesopt | BOOLEAN | false | Remove all double quotes from JSON-style prompts. Keys ("subject":) and values ("text") both get quotes stripped. |
| filter_paddingopt | BOOLEAN | true | Filter padding tokens from embeddings. Matches diffusers and DiffSynth reference implementations. Disable to use stock ComfyUI behavior (padded sequence + mask). |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| formatted_prompt | STRING | — |
| debug_output | STRING | — |
| conversation | ZIMAGE_CONVERSATION | — |