Nodes/ComfyUI-TC_ADV_ZPrompt/TeamC Advanced Z-Image Prompts (TC_ADV_ZPrompt)
ComfyUI Node

TeamC Advanced Z-Image Prompts (TC_ADV_ZPrompt)

1.3) Does Nothing on Z-Image — This Node Fixes That

By Faildes·Created 8 months ago·Updated 8 months ago· 0
TeamC Advanced Z-Image Prompts (TC_ADV_ZPrompt)
  • clip
  • CONDITIONING
text
use_scheduletrue
schedule_steps30
weight_strength2.00
clamp_min0.00
clamp_max3.00
and_strength0.60
base_bias4.00

If you've typed (the cube's base is flat on the ground:1.35) into a Z-Image prompt and watched it do nothing, you're not crazy and the model isn't broken. Z-Image's text encoder is a Qwen3 LLM, and like every other LLM-encoded model it silently throws attention weights away - the encoder wrapper literally passes disable_weights=True. People get burned by this weekly, usually when they notice the 1.35 digits themselves showing up in the image, since they get tokenized as ordinary text.

TeamC Advanced Z-Image Prompts (TC_ADV_ZPrompt) is the workaround: one node, under conditioning/advanced, that parses classic SD prompt syntax and hand-applies the emphasis at the token level before encoding. It's a small, focused pack - this is its only node - by the author who goes by Faildes on GitHub (published to the Comfy Registry under the crody0901 account). No downloads, no API, no keys.

How it works

The guts are a reimplementation of the Automatic1111 attention parser: (word) multiplies attention by 1.1, (word:1.35) by 1.35, [word] divides, BREAK inserts a −1.0 weight. It tokenizes your cleaned prompt, aligns those content tokens against the full token stream, rewrites each token's weight, and re-encodes via clip.encode_from_tokens - doing by hand what ComfyUI's CLIPTextEncode does automatically for CLIP models.

Two extras make it more than a parser:

  • AND blending. It splits top-level AND clauses, encodes each separately, and mixes the embeddings by a weighted average (base_bias sets how much the whole prompt weighs against the parts), then blends toward that mix by and_strength. Each part is resampled to the same sequence length first, since the parts won't tokenize to identical lengths.
  • Prompt scheduling. Compel-style [a:b:step] and [a|b] alternation get parsed with lark, producing multiple CONDITIONING entries with start_percent/end_percent bands that the sampler honors.

Before encode, weights go through the pipeline: negatives become 1 + w (NegPiP), everything is scaled by weight_strength, then clamped to clamp_minclamp_max.

The inputs that matter

  • text - your prompt, with SD syntax. clip - the Z-Image CLIP loader.
  • weight_strength (default 2.0) - global multiplier on emphasis. The real "how strong" knob.
  • clamp_max (default 3) and clamp_min (default 0) - the ceiling and floor on per-token weights. If emphasis feels like it's doing nothing, your clamp is pinning it.
  • use_schedule (default on) and schedule_steps - toggle the [a:b:step] feature; schedule_steps is the total step count used to convert step numbers into percentages.
  • and_strength (default 0.6) and base_bias (default 4.0) - only matter if you use AND.

Output is a single CONDITIONING socket - wire it straight into your sampler where the normal CLIPTextEncode output would go.

Installing it

ComfyUI Manager: search ComfyUI-TC_ADV_ZPrompt and install. Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/Faildes/ComfyUI-TC_ADV_ZPrompt

Then restart ComfyUI. That's the whole install - there are no requirements to pip, no model files to fetch. lark is used for scheduling but optional: if it's missing, the code quietly falls back to treating the prompt as plain text, and ComfyUI ships lark anyway.

Where people get burned

  • The trap this node exists for: on plain Z-Image, emphasis isn't ignored-so-much-as-never-applied, and stray numbers get rendered as text. If you don't install this, remove the parentheses and rewrite for clarity instead.
  • Fallback mode. If the content tokens can't be located inside the encoded token stream, the node logs a warning and applies no weighting. Read the console if emphasis mysteriously stops working.
  • The bigger picture. Z-Image Turbo is guidance-distilled, so you're running CFG ~1 and the negative prompt box is inert - this node won't resurrect negatives. And on LLM encoders, word order binds attributes, which is the tool the community actually lands on; AND and BREAK are a crutch for SD muscle memory, and this is the best crutch you'll find. Emphasis still helps, but a well-ordered sentence will beat a weighted mess every time.

If you just want (keyword:1.3) to mean something on Z-Image, this is the one.

Categoryconditioning/advanced

Inputs (9)

NameTypeDefaultDescription
textSTRING
clipCLIP
use_scheduleBOOLEANtrue
schedule_stepsINT301–10000
weight_strengthFLOAT2.000–50
clamp_minFLOAT0.00-10–10
clamp_maxFLOAT3.000–10
and_strengthFLOAT0.600–1
base_biasFLOAT4.000–100

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING