DOGMA Mapped Image List → Batch v25
DOGMA Mapped Image List → Batch v25
- images
- batch
ComfyUI has two ways of holding several images, and node authors are not consistent about which one they use. A batch is a single tensor with a frame dimension. A list is a Python list of separate tensors. They look identical on the canvas and they are not interchangeable.
This node converts one to the other, in order, so a tile-combining node that wants a batch can be fed by crop nodes that emit a list.
What it is and why it exists
DOGMA's crop and settings nodes are written with OUTPUT_IS_LIST = True - each geometric group is one frame in a list, which is what lets a per-group prompt travel alongside it. That's the right shape for the detail loop. It's the wrong shape for anything that wants to treat the crops as a stack.
The specific consumer this was written for is Steudio's Combine Tiles, which wants a single batch. The docstring names it: "reassemble a mapped IMAGE list in original order." That word order is doing work - the reason this isn't just a torch.cat one-liner is that list order matters, and the node preserves it.
How it works
The whole implementation is about fifteen lines, and every one of them is a size problem.
It sets INPUT_IS_LIST = True, so ComfyUI hands it the raw list rather than trying to interpret it as a batch. Any None entries are skipped - that's the pack's convention for a muted or empty group. Frames arriving without a batch dimension get one added.
Then it takes the dimensions of the first surviving frame and conforms everything else to them, bilinearly, using F.interpolate. So mismatched crop sizes aren't an error, they're a resize. That's convenient and it's also the thing to be aware of: if your crops are all different sizes, you're silently upscaling and downscaling crops to match the first one, which is not obviously what you want for detail work. It clamps the result to 0–1 and returns it.
It raises a ValueError if the list is empty, which is the one failure mode it bothers to catch: DOGMA v25 received an empty tile list.
Inputs and outputs
One input. images (IMAGE) - and because the node is list-consuming, you connect a list output into it directly, no adapter needed. The widget-less socket can be confusing the first time, because it's the same socket type as any other IMAGE input; the difference is entirely in how the node reads it.
One output: batch (IMAGE), a single stacked tensor. Wire it into whatever wants a batch - Steudio's tile combine, a save-image node if you want to eyeball the crops, an upscaler.
Install
ComfyUI Manager → search DOGMA Nodes (publisher axior), install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
# restart ComfyUI
Nothing to install alongside - no external dependencies, no weights in the repo. If you're using it as intended, the other thing you need is Steudio's tile nodes, which are a separate pack and a separate install.
Common issues
The empty-list error is the one you'll actually see, and it almost always means the crop node upstream found no groups - a mask that never fired, or a category that didn't exist in the image. That's a detection problem, not a batching problem; look at the crop node's own info output before touching this.
The subtler one is the silent resize. Because it conforms everything to frame zero, a mixed-size list converts without complaint and you don't learn that you were mixing sizes until you look at the result closely. If your crops should all be the same size - and with any single crop node they will be - then a mismatch means something upstream changed the pipeline mid-list, which is worth investigating rather than papering over.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| batch | IMAGE | — |