AK XZ Batch Prompts
A/B test prompts without rebuilding your graph
- clip
- positives
- negatives
- xz_config
Prompt A/B testing in stock ComfyUI is miserable. You change the text, rerun, change it back, rerun - and because you're fiddling by hand you can't trust that the only difference between two outputs is the wording. AK XZ Batch Prompts from ComfyUI-AK-XZ-Axis lets you queue up to eleven prompt pairs, run them in one go on the same seed, and get back a labeled comparison instead of a guess.
What it does
You connect a clip (from your checkpoint loader), type in a positive and negative prompt for pair 0, and the node CLIP-encodes them for you - that's a genuine convenience, because it means you're working with plain text, not hand-building conditioning. Wire the two list outputs into your KSampler's positive and negative inputs and it runs once per pair.
The slots go from pos_0/neg_0 (required) through pos_10/neg_10. The optional ones only appear as inputs once a full pair is connected - the pack ships a small JS extension that adds and removes sockets as you fill them, so you're not staring at eleven empty slots. That's the "dynamic inputs" the README mentions, and it works the way you'd hope.
The usual pattern
Everyone reaches for the same shape: keep the same negative on every pair, vary only the positive. The node is built for this - it caches encoded conditioning, so identical text is only encoded once, and if a negative is empty it just labels the image "Pos: ..." without the "|| Neg: ..." suffix. If you do vary the negative too, it'll happily carry it through as its own parameter.
The X/Z behavior (the part to read twice)
- X mode (no
xz_configconnected): each prompt pair becomes one labeled image in a sweep. Simple and complete. - Z mode (
xz_configconnected): the node pairs up with whatever X-axis sweep is already running and assigns each prompt to a Z-slot - so you can run, say, a cfg sweep where every cfg value is generated once per prompt variant. It pads or trims the prompt list to match the number of images in the X config, which is exactly how a "cfg × prompt" matrix falls out of the X+Z design.
Inputs and outputs that matter
Inputs you set: clip (one connection, mandatory), and the pos_N/neg_N text pairs. The xz_config input only matters once you're stacking a Z-axis on top of an existing sweep.
Outputs:
positives(CONDITIONING list) → KSamplerpositivenegatives(CONDITIONING list) → KSamplernegativexz_config(STRING) → AK XZ Axis Plot for the labeled output
Install
ComfyUI Manager → search AK XZ → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/akawana/ComfyUI-AK-XZ-Axis.git
Restart, and load xz_workflow_prompts.json from the repo's /workflows/ folder for a working example. No pip requirements, no model downloads - the pack is dependency-free beyond ComfyUI itself.
The honest caveats
Because CLIP encoding happens inside this node, the conditioning output is the pack's own flavor of the standard structure - fine for stock KSamplers, but if your workflow needs advanced tricks (BREAK, per-token weighting via custom encoders, Flux-style prompt schedules), those live upstream of this node anyway, so encode your fancy stuff yourself and use the Range nodes for the X axis instead. Also keep the usual prompt-testing discipline from the KB's prompt-engineering material: lock the seed and vary only the wording, or the plot will lie to you. And note the pack is young - December 2025, thin community footprint - so the README plus the demo workflows are the whole manual.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| clip | CLIP | — | |
| pos_0 | STRING | — | |
| neg_0 | STRING | — | |
| xz_configopt | STRING | — | |
| pos_1opt | STRING | — | |
| neg_1opt | STRING | — | |
| pos_2opt | STRING | — | |
| neg_2opt | STRING | — | |
| pos_3opt | STRING | — | |
| neg_3opt | STRING | — | |
| pos_4opt | STRING | — | |
| neg_4opt | STRING | — | |
| pos_5opt | STRING | — | |
| neg_5opt | STRING | — | |
| pos_6opt | STRING | — | |
| neg_6opt | STRING | — | |
| pos_7opt | STRING | — | |
| neg_7opt | STRING | — | |
| pos_8opt | STRING | — | |
| neg_8opt | STRING | — | |
| pos_9opt | STRING | — | |
| neg_9opt | STRING | — | |
| pos_10opt | STRING | — | |
| neg_10opt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| positives | CONDITIONING | — |
| negatives | CONDITIONING | — |
| xz_config | STRING | — |