Smart Batch Processor
One node that stitches, grids, borders, and splits — with a log string to prove it
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- image_9
- result_1
- result_2
- result_3
- result_4
- processing_log
Smart Batch Processor is the Swiss-army node of the Niutonian Smart Image Suite: one node that can stitch horizontally, stitch vertically, build a grid, add borders, or split an image - and it's the only node in the pack that hands you a text log of what it just did. If you're building a workflow where the operation changes between runs but the images don't, this is the node that keeps it in one box instead of four.
It's pure Pillow, no models, no API. And it has a couple of quirks worth knowing before you wire it into anything you'll rely on.
How it works
operation_mode picks the job:
stitch_horizontal/stitch_vertical- line up your connected images in a strip, usingstitch_direction,stitch_alignment,resize_mode, andspacing.create_grid- arrange images into agrid_rows×grid_colsgrid withspacing.add_borders- wrap every valid image in a border ofborder_widthandborder_color.split_images- split the first connected image into a grid.
batch_size (1–9) is mostly a hint about how many inputs you're using - the node actually just reads whatever image_1–image_9 are connected, so you can leave it at the default. output_format is individual or combined; like a couple of other controls in this suite it's currently accepted but doesn't change the behavior, so don't expect combined to fuse anything yet.
Results come out of result_1 through result_4, plus a processing_log output - a plain STRING you can wire into any Show Text node to see what ran. The catch: there are four result outputs, but some modes produce more work than that. add_borders with six images generates six bordered images and silently drops the extras past result_4. split_images is the reverse - it only ever operates on the first image and caps its output at four parts. Plan around four results per batch and you won't be surprised.
The template system - and its honest limit
save_template with a template_name writes your current settings (operation mode, spacing, grid rows, border width, etc.) as a JSON file into a templates/ folder inside the pack's own directory. That part works. What doesn't exist yet is a way to load a saved template back into the node - there's no load input. So think of it as a config export you can stash in version control, not a working preset system. The README pitches it as "save frequently used settings," and the save half is real.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/Niutonian/comfyui-niutonian-smart-image
Restart, find it under Niutonian/Image Processing. No extra dependencies (Pillow only), no model downloads. If you installed the pack via ComfyUI Manager, the requirements are handled automatically.
Honest verdict: this is the pack's "kitchen sink" node, and like most kitchen sinks it's convenient rather than deep. The individual dedicated nodes (Smart Image Stitch, Smart Grid Stitch, Smart Border & Frame) each do their one job better and expose more controls. Reach for Batch Processor when you want a single drop-in that can switch operations - or when you specifically want that processing_log string feeding a text node so your workflow tells you what it did.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| operation_mode | COMBO | stitch_horizontal | 5 options: stitch_horizontal, stitch_vertical, create_grid, add_borders, split_images |
| batch_size | INT | 41–9 | — |
| output_format | COMBO | individual | 2 options: individual, combined |
| save_template | BOOLEAN | false | — |
| template_name | STRING | my_template | — |
| stitch_directionopt | COMBO | right | 4 options: left, right, top, bottom |
| stitch_alignmentopt | COMBO | center | 3 options: start, center, end |
| resize_modeopt | COMBO | none | 3 options: none, largest, smallest |
| spacingopt | INT | 100–100 | — |
| grid_rowsopt | INT | 21–4 | — |
| grid_colsopt | INT | 21–4 | — |
| border_widthopt | INT | 200–100 | — |
| border_coloropt | COMBO | white | 3 options: white, black, gray |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — | |
| image_6opt | IMAGE | — | |
| image_7opt | IMAGE | — | |
| image_8opt | IMAGE | — | |
| image_9opt | IMAGE | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| result_1 | IMAGE | — |
| result_2 | IMAGE | — |
| result_3 | IMAGE | — |
| result_4 | IMAGE | — |
| processing_log | STRING | — |