NIX_XYGridMapper
Turn an iteration counter into an (x, y) setting pair so you can sweep two values at once
- x_value
- y_value
- name
NIX_XYGridMapper is a grid-search helper. It takes an index - the kind of thing a counter or loop emits - and maps it to a coordinate in a two-dimensional grid: one value from an X sequence, one from a Y sequence. Feed it a sequence of indexes 1, 2, 3... and you get a sweep across both axes, which is how you test "what happens as I raise both the LoRA weight and the CFG" without building 25 manual branches.
It's part of the NIX pack - small, dependency-light (numpy + Pillow), no models. One install gets you this and the rest of the pack's utilities.
How it works
You define two sequences with three numbers each:
- x_min, x_max, x_step - the X axis, a float range. Defaults 0.1 → 1.0 in 0.1 steps.
- y_min, y_max, y_step - the Y axis, a float range. Defaults 0.1 → 1.0 in 0.1 steps.
- index (INT, min 1, max 2000) - the counter.
The node builds the full list of X values and Y values, then treats index as a row-major pointer: x_index = (index - 1) % len(x_values) and y_index = (index - 1) // len(x_values). So index 1 gives the first X and first Y, and as the index climbs you move across X, then wrap to the next Y row.
Outputs:
- x_value (FLOAT) - the X at that position.
- y_value (INT) - the Y at that position, truncated to an integer.
- name (STRING) -
"y_x"with dots stripped, e.g."1_05"for y=1, x=0.5. Handy for filenames.
The name generation and the y-to-int truncation are the two quirks to remember.
Where it slots in
This is the ComfyUI cousin of A1111's X/Y plot. Drive index from a loop or counter, wire x_value into one parameter (LoRA weight, CFG, denoise strength) and y_value into another (steps, seed, batch size), and run a batch to produce a grid of variations. The name output lets you save each result as something readable instead of 00042.png.
Use X for continuous float parameters and Y for integer-flavored ones - that's clearly what the node's types expect, and it spares you the surprise of a truncating Y. If you need two float axes, you'll want a different mapper or to cast.
Getting it installed
- ComfyUI Manager: search "NIX" / "NIX ComfyUI Plugin", or Install Custom Nodes → Git URL →
https://github.com/J-ChenX/ComfyUI-NIX. Restart after. - By hand:
Restart ComfyUI. Under the "NIX" category.cd ComfyUI/custom_nodes git clone https://github.com/J-ChenX/ComfyUI-NIX
Things that will bite you
- y_value is INT. Your Y sequence of 0.1, 0.2, 0.3 becomes 0, 0, 0. If that's not what you meant, sweep the float axis with X.
- Out-of-range index returns the first element, silently. Index 0 or 2001 won't error - it'll just hand back the grid's start. Design your loop bounds accordingly.
- Max index is 2000, so a big grid caps at 2000 combos (say, 50×40).
- Name strips dots but not minus signs - negative values produce names like
-05which can be awkward in filenames. - Quiet pack. No community footprint for NIX as of mid-2026, so no copied grid workflows; the mapping math is a short readable block in the source if you want the exact row-major order.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| x_min | FLOAT | 0.100–5 | — |
| x_max | FLOAT | 1.000–5 | — |
| x_step | FLOAT | 0.100.05–5 | — |
| y_min | FLOAT | 0.100–5000 | — |
| y_max | FLOAT | 1.000–500000 | — |
| y_step | FLOAT | 0.100.05–5000 | — |
| index | INT | 11–2000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| x_value | FLOAT | — |
| y_value | INT | — |
| name | STRING | — |