Nodes/ComfyUI-ZImagePowerNodes/⚗️🔬| Style + Prompt Encoder ^X2.2 (Advanced)
ComfyUI Node

⚗️🔬| Style + Prompt Encoder ^X2.2 (Advanced)

Where Z-Image prompts actually get built

By martin-rizzo·Created 7 months ago·Updated about 14 hours ago· 349
⚗️🔬| Style + Prompt Encoder ^X2.2 (Advanced)
  • clip
  • style
  • palette
  • CONDITIONING
  • PROMPT
  • style_name
  • palette_name
  • original_prompt
prompt
user_styles
user_palettes

The library nodes in this pack are just pickers. This is the one that does the work. StylePromptEncoderX22Advanced takes your prompt, a chosen style, and an optional color palette, builds a final styled prompt out of them, and encodes it into the conditioning that your sampler actually runs. If you've been poking at the Z-Image Power Nodes pack and wondering how the style system fits together - this is the node at the center of it.

It's part of ComfyUI-ZImagePowerNodes by Martin Rizzo, the pack built around Z-Image / Z-Image Turbo (and the same author's Amazing Z-Image Workflow). The node encodes text using whatever CLIP you give it - for Z-Image, that's the Qwen3-4B text encoder.

How it works

Three things get combined before anything touches the sampler:

  1. Your prompt is inserted into the selected style's template at its {$@} placeholder. The style template wraps it in context ("YOUR CONTEXT: … YOUR PHOTO: {$@}") rather than just bolting adjectives on.
  2. If a palette is wired in, its color names, textures, and object words get resolved into the prompt text - so the final prompt says "deep indigo velvet" instead of a hex code.
  3. The whole assembled string is tokenized and encoded through the clip input, producing the conditioning.

This matters for one practical reason: the PROMPT output lets you see what it actually generated. If your image looks wrong, nine times out of ten the culprit is in the styled prompt, not the sampler. Inspect it once and you'll stop blaming the wrong node.

The inputs that matter

  • clip (CLIP) - your text encoder. Load Qwen3-4B with a CLIP loader and feed it here.
  • prompt (STRING, multiline) - your base prompt. Kept intact, inserted into the style template.
  • style (ZIPN_CUSTOM_STYLE) - from the Style Library v1.0 node.
  • palette (ZIPN_CUSTOM_PALETTE) - from the Palette Library v2.0 node. Optional in practice; leave unwired if you don't want palette text injected.
  • user_styles / user_palettes (STRING, multiline) - the Advanced part. Define your own styles here. Per the author's own description, each definition starts with >>> followed by the style name, then the description on the next lines, with {$@} where your main prompt gets inserted:
>>>Moonlit Lake
a scene on the edge of a dark lake, {$@} lit by a low silver moon

The outputs

  • CONDITIONING - the final encoded text. Wire this into your sampler's positive-conditioning input (the pack's own ZSampler Turbo is the natural fit).
  • PROMPT - the fully assembled, styled prompt string. Feed it to a display node to debug.
  • style_name and palette_name - which style/palette actually got applied. Useful for logging or saving with your image.
  • original_prompt - your untouched input, handy for metadata.

Installing it

Install the pack once for all of it:

cd ComfyUI/custom_nodes
git clone https://github.com/martin-rizzo/ComfyUI-ZImagePowerNodes.git

Restart, or install via ComfyUI Manager (search "Z-Image Power Nodes"). No Python dependencies - the install weight is the models: Z-Image Turbo diffusion model, Qwen3-4B text encoder, Flux 1 VAE (ae.safetensors). GGUF checkpoints need ComfyUI-GGUF on top.

Where people get burned

This is an experimental node (⚡Z-Image/__experimental), so it can change or vanish without notice - the author says so in the description itself. Two more things trip people up:

  • Old ComfyUI won't show it. The pack targets ComfyUI v0.11.0+ and uses the newer node schema. If the node doesn't appear in the menu after install, update ComfyUI before hunting for other causes.
  • The style/palette types are pack-internal. You can't hand a random custom node a ZIPN_CUSTOM_STYLE and expect it to cope. Keep the flow inside the pack: library nodes in, this encoder in the middle, sampler out.

It's not the stable Style Prompt Encoder the pack also ships - this is the experimental X2.2 with palette support and custom-style injection bolted on. If all you need is the 123 built-in styles, the stable node may be the safer bet. If you want palettes and your own style definitions, this is the one to reach for.

Category⚡Z-Image/__experimental

Inputs (6)

NameTypeDefaultDescription
clipCLIPThe CLIP model used for encoding the text.
styleZIPN_STYLEThe visual style to be applied to the input prompt.
paletteZIPN_PALETTEThe visual style to be applied to the input prompt.
promptSTRINGThe base text prompt to be encoded and styled.
user_stylesoptSTRINGAn optional multi-line string to customize existing styles. Each style definition must start with '>>>' followed by the style name, and then include its description on the next lines. The description should incorporate '{$@}' where the main text prompt will be inserted.
user_palettesoptSTRINGAn optional multi-line string to customize existing styles. Each style definition must start with '>>>' followed by the style name, and then include its description on the next lines. The description should incorporate '{$@}' where the main text prompt will be inserted.

Outputs (5)

NameTypeDescription
CONDITIONINGCONDITIONINGFinal encoded text that will guide the image generation process.
PROMPTSTRINGFinal prompt after applying the selected visual style and color palette.
style_nameSTRINGName of the visual style that was applied to the prompt.
palette_nameSTRINGName of the color palette that was applied to the prompt.
original_promptSTRINGThe original text input before any modifications or style adaptations.