Nodes/ComfyUI-ZML-Image/ZML_XY_提示词
ComfyUI Node

ZML_XY_提示词

Sweep one variable prompt across weight strengths — ZML_XY_提示词

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_XY_提示词
  • CLIP
  • 条件(Conditioning)
  • 图表信息
固定提示词masterpiece, best quality, 1girl
多行变量red dress blue dress white dress
分隔符,
权重数量2
权重起始值1.00
权重结束值1.20
XY互换false

ZML_XY_提示词 is the prompt-tester of the pack's XYZ family. It takes a fixed prompt, a list of variable prompts, and a range of attention weights, then cross-products them into a grid of pre-encoded conditionings. "Does adding 'red dress' help? At what weight?" - rendered as a labeled table instead of forty manual runs.

Mechanically it's a two-axis sweep in one node. 固定提示词 (default masterpiece, best quality, 1girl - the author's anime defaults) is the constant base. 多行变量 is your variable axis: one line per cell, e.g. the default red dress / blue dress / white dress. Then the weight axis: 权重数量, 权重起始值, 权重结束值 interpolate strengths (default 1.0 → 1.2 across 2 steps). Each cell's prompt becomes 固定提示词 + 分隔符 + (variable:weight) - the 分隔符 (default , ) joins them. XY互换 swaps which axis is which.

The node does the CLIP encoding itself (it needs a CLIP input, and it's required). Outputs are 条件(Conditioning) - a CONDITIONING list, one entry per cell - plus 图表信息 for ZML_XY_图表拼接. Wire the conditioning into a sampler alongside whatever model you're testing, and the grid drawer labels each cell with the prompt line and weight. Short variable lines get truncated in the labels (17 chars + "..."), which keeps the grid readable.

This is the node to reach for when you want to know how much a prompt token matters: weight sweeps around a single concept. The KB's prompt-engineering doc is a good companion here - it's blunt that (word:1.3) weights are alive on the SDXL-anime lineage (Illustrious/NoobAI/Pony) but silently discarded on LLM-encoded models like Flux. On a 2026-era LLM-based model, this node's weight axis is doing nothing, and you'd use 多行变量 as the entire experiment instead.

Installing it

Ships in ComfyUI-ZML-Image. ComfyUI Manager → ComfyUI-ZML-Image, or:

cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image

Restart. No downloads; CLIP encoding is core ComfyUI. Chinese UI; English patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.

Common issues

Two traps. First, the weight sweep only means something if your checkpoint honors (token:weight) - on SDXL-lineage anime models it does, on LLM-encoded models it doesn't. If every weight step comes out identical, that's the model family, not a broken node. Second, the 分隔符 is inserted as-is between fixed and variable, so the default , gives fixed, (red dress:1.0) - if you change the delimiter to BREAK or a newline, make sure your checkpoint's prompt grammar accepts it.

Also worth knowing: this node and ZML_XY_LoRA加载器V3 overlap - V3 does prompts × LoRAs, this does prompts × weights. They even share the same ZML_GRID_INFO contract, so you can swap which one feeds your grid drawer. For pure "which wording is strongest" tests, this is the one. Solo-dev pack, Chinese-first, but this node is small and its math (linspace + CLIP encode) is hard to get wrong.

Categoryimage/ZML_图像/XYZ

Inputs (8)

NameTypeDefaultDescription
CLIPCLIP
固定提示词STRINGmasterpiece, best quality, 1girl
多行变量STRINGred dress blue dress white dress
分隔符STRING,
权重数量INT2
权重起始值FLOAT1.00-5–10
权重结束值FLOAT1.20-5–10
XY互换BOOLEANfalse

Outputs (2)

NameTypeDescription
条件(Conditioning)CONDITIONING
图表信息ZML_GRID_INFO