ComfyUI Node

AK XZ Axis Plot

AK XZ Axis Plot labels your sweeps

By akawana·Created 9 months ago·Updated 7 months ago· 4
AK XZ Axis Plot
  • image
  • plot_image
  • xz_config
xz_config
header_height_percent25
grid_spacing0
sting_trim30
draw_headerstrue
plot_typeplot

If you've run a seed sweep in ComfyUI, you know the pain: ten PreviewImage tiles that all look vaguely like the same person and zero way to tell which is seed 42 and which is seed 9001. AK XZ Axis Plot is the part of the ComfyUI-AK-XZ-Axis pack that fixes exactly that. It takes the batch of images coming out of your KSampler, paints a clean header on each one saying what parameter produced it, and hands you a single readable strip instead of a tile wall.

The one-line pitch

This is the main visualization node of the pack. You don't feed it seeds or prompts - you feed it the images after the sampler and the xz_config string that the pack's Range/Batch nodes produce. It reads the config, figures out which image belongs to which parameter value, and labels accordingly.

How it actually works

Under the hood it's plain PIL drawing, which is why the pack has zero extra dependencies. Each incoming image gets a white header on top: the X-axis value in black text, and the Z-axis value (if there is one) in blue. Header height is set as a percentage of the image height (header_height_percent, default 25%), and each label line is trimmed to sting_trim characters - yes, that's a typo for "string_trim" in the author's own code, but it's the field name, so it's the field name. Set it lower than 30 and it clamps back to 30.

Two output modes via plot_type:

  • plot (default) - all the labeled images get concatenated into one horizontal strip, optionally with grid_spacing pixels of black between them. This is what you save.
  • separate - returns the labeled images as a batch, so you can still walk through them individually.

One clever trick buried in the code: the raw parameter config is embedded as JSON into the top row of pixels of the output image, with an AKXZ magic marker. That's how the metadata survives the trip through a save/load cycle, and it's what the pack's AKXZ Preview Plot node reads back when you want to verify what a plot actually contains.

The inputs that matter

  • image - the IMAGE output from your VAE Decode (or whatever comes after the KSampler).
  • xz_config - the STRING output from any AK XZ Range or Batch node. Miss this and the node has nothing to label with.
  • plot_type, draw_headers, header_height_percent - the display choices. draw_headers off turns it into a dumb concatenator.

The one input you'll set and forget is header_height_percent; the rest have sane defaults.

The killer feature: the instant off-switch

If the node receives exactly one image, it does nothing - no headers, no processing, just passes the image through. That's intentional. You leave the node in your workflow permanently, and the moment you don't want a sweep, you drop the range node back to a single value and your graph behaves like a normal single-image generator. No rewiring, no bypass toggle.

Install

Via ComfyUI Manager: search for AK XZ and install. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/akawana/ComfyUI-AK-XZ-Axis.git

Then restart ComfyUI. There's no requirements.txt, no model downloads, nothing beyond the torch/PIL/numpy ComfyUI already ships. The pack is small, pure-Python, and young (announced December 2025), so don't expect a big support community behind it - but the demo workflows live in the repo's /workflows/ folder if you want a working starting point.

The honest catch

"Plot" here means a one-dimensional strip with labels, not a true 2D grid. The pack's own README is refreshingly blunt about this: with a stock KSampler you can only truly iterate one axis, plus optionally inject a second varying parameter (the Z) inside each pass. If you genuinely need a real XY grid, you're better served by approaches that chain list-output samplers - the roughly simultaneous r/comfyui "XYZ-GridPlots" alternative does exactly that. But for the 90% case of "I want a labeled sweep of seeds, cfg, or prompts," this node is the simplest thing that works.

CategoryAK/XZ Axis

Inputs (7)

NameTypeDefaultDescription
imageIMAGE
xz_configSTRING
header_height_percentINT255–50
grid_spacingINT0
sting_trimINT30
draw_headersBOOLEANtrue
plot_typeCOMBOplot2 options: plot, separate

Outputs (2)

NameTypeDescription
plot_imageIMAGE
xz_configSTRING