Combine Coords (to COORDS)
Combine x and y number lists into one COORDS wire
- x_coords
- y_coords
- COORDS
Combine Coords (to COORDS) (class CombineCoords) takes two lists of numbers - x coordinates and y coordinates - and zips them into a single COORDS value. That COORDS is a custom type this pack defines, and it's the clean way to feed multiple paste or crop locations into CropByCoords and PasteByCoords without juggling two separate strings.
Think of it as the constructor for a small data type. x_coords = [10, 200] and y_coords = [50, 300] becomes one COORDS value representing two points: (10, 50) and (200, 300). Then that single wire carries both crop positions into the crop node, which processes the batch - one point per image, or all points against the batch.
How it works. It pairs the lists element-wise, in order. The one genuinely useful behavior in the source: if the lists are different lengths, the shorter one is padded with its last value. So x = [10, 200] with y = [50] gives you (10, 50) and (200, 50) - the y stays pinned while x varies. That's convenient for "sweep across the image at one row" style workflows, and it means you rarely need to pad lists by hand. Empty lists fall back to [0] so the node doesn't crash.
The inputs that matter. x_coords and y_coords, both INTS (defaults [0]). Where do those lists come from? StringToIntegers (type them as text), SplitCoords (split an existing COORDS back apart), or any node that emits INTS. Output is the single COORDS value.
One honest caveat: COORDS is not a ComfyUI-standard type - it's this pack's own. That means the output only wires into nodes that understand COORDS (this pack's crop/paste nodes, or other packs that happen to use the same type name). It won't plug into a generic integer widget. That's expected, just know it before you wonder why the connection is refused.
Install. Same as every node in this pack - no deps, no models:
cd ComfyUI/custom_nodes
git clone https://github.com/einhorn13/ComfyUI-ImageProcessUtilities
Restart ComfyUI. The pack isn't on the official Comfy Registry as of writing, so use the clone if Manager's search comes up empty.
Common issues. The uneven-list padding is a feature, but it can bite: if you meant for the short list to loop around or align differently, you'll get the last-value-repeat instead, silently. If coordinates seem to land at odd spots, double-check which list is shorter and whether last-value padding is what you actually wanted.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| x_coords | INTS | 0 | — |
| y_coords | INTS | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| COORDS | COORDS | — |