AK XZ Range Int
A seed or steps sweep without a custom KSampler
- range
- xz_config
AK XZ Range Int is the node that finally makes "test five seeds, keep the best one" a five-second setup instead of a copy-paste ritual. It belongs to the ComfyUI-AK-XZ-Axis pack, and its entire job is to generate a list of integers for an integer parameter on any KSampler - seed and steps are the obvious ones - then feed them to that parameter one at a time.
The pitch that separates this pack from the XY-plot crowd: it doesn't need a custom KSampler. Plenty of grid-testing tools ship their own sampler node and demand you rewire your graph around it. This one plugs into the stock KSampler's own widget inputs, which is exactly why the author calls it "XY for any KSampler."
How it works
Set type to Seed or Step, give it a start and an end, and the node returns a list of integers from start to end. Wire the range output into the KSampler's seed (or steps) input, and ComfyUI executes the sampler once per value. Connect the xz_config output to an AK XZ Axis Plot node and each image comes out labeled with the value that made it.
The xz_steps input is where it gets interesting, because it behaves differently depending on how you're using the node:
- X mode (no
xz_configconnected):xz_stepsis the count of values you want. The node spreads that many integers evenly betweenstartandend, always including both endpoints. Sostart=0, end=10, xz_steps=3gives you[0, 5, 10], not[0,1,2...10]. That's a real timesaver when you're exploring a range rather than exhaustively testing it. - Z mode (
xz_configconnected): the node instead generates one value per image slot already present in the config, so it rides along as the second varying parameter inside an existing sweep.
The input to know about: steps_define_end
If you'd rather think in "how many values" than "what's the last value," flip steps_define_end on. Then the node ignores end entirely and computes it for you as start + xz_steps - 1. Handy for steps sweeps where you know the count but not the target number. Default off, mostly self-explanatory beyond that - the author's own README says exactly that.
Why you'd actually reach for it
Seed testing is the classic case. The sampler's converging-vs-ancestral split in the KB's sampler entity is the practical rule: if you're A/B-ing a setting on a fixed seed, use a converging sampler like DPM++ 2M so the same seed reproduces the same image; ancestral samplers (Euler a, DPM++ SDE) inject fresh noise every step and a "seed sweep" on them mostly measures luck. Sweep seeds cheap, keep the winner, then move on.
Steps sweeps are the other big use. Nothing tells you "20 steps is where this model stops improving" like a labeled strip of the same seed at 10, 15, 20, 25, 30.
The other outputs
Both outputs matter:
range(INT list) → KSampler widgetxz_config(STRING) → AK XZ Axis Plot (or the next Range/Batch node, if you're stacking an X+Z test)
Install
ComfyUI Manager → search AK XZ → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/akawana/ComfyUI-AK-XZ-Axis.git
Restart, done. No extra pip packages, no models to fetch - the pack is pure Python on top of what ComfyUI already has. There's a ready-made xz_workflow_seed.json in the repo's /workflows/ folder.
Gotchas
Two small ones. First, the range is inclusive of both ends, and when start equals end the node just repeats that value xz_steps times - useful if you want a Z-slot to stay constant while X varies. Second, this pack is new (late 2025) and lightly used, so don't expect a wiki's worth of docs; the demo workflows and the README are basically the whole manual.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| type | COMBO | Seed | 2 options: Seed, Step |
| start | INT | 0 | — |
| end | INT | 1 | — |
| xz_steps | INT | 0 | — |
| steps_define_end | BOOLEAN | false | — |
| xz_configopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| range | INT | — |
| xz_config | STRING | — |