Image Grid Composite 3x3 (Swwan) · 旧版兼容
Nine images, one contact sheet, no settings
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- IMAGE
Nine IMAGE inputs, one IMAGE out, laid out in reading order. That's the node. It's Legacy in this pack - SwwanImageConcatMulti supersedes it - and yet it's the shape a lot of people reach for when comparing a sweep: nine seeds, nine LoRA weights, nine upscale settings, all in one square you can post or just eyeball.
There is nothing to configure, which is either the whole appeal or the whole problem, depending on what you're doing.
Interface and mechanism
image1 through image9, all required, all IMAGE. One output: IMAGE.
The implementation is a row-wise concatenation - images 1–3 joined along the width axis, 4–6 and 7–9 the same, then the three rows stacked along the height axis. That means the operation is a strict torch.cat: every input must share the same height, width, channel count and batch size. Mismatched sizes are a shape error, not a resize. Nine images from nine different generation branches is fine; nine images at nine different resolutions is not.
Batch semantics follow from the same rule: nine single frames give you one sheet; nine batches of N frames give you a batch of N sheets. Mixed batch sizes won't concat.
The reason the pack keeps it (rather than deleting it, as it deleted a lot of overlapping nodes) is that saved workflows call it by ID and Legacy nodes preserve their historical data contract. If a workflow in the wild expects a 3x3 sheet with exactly these nine inputs, that's what it keeps getting.
What to use instead, honestly
For anything new, Image Concat Multi (Swwan) does this and more with one node: layout=grid with columns=3 takes a dynamic number of inputs, tiles them, and completes the last row with black fill rather than erroring; match_image_size will lanczos-fit your tiles to a common size; and layout=batch_grid will explode a batch of 9+ frames into the same 3-wide sheet without you wiring nine wires at all. That last one is the killer - for a nine-frame animation, it's one wire instead of nine.
Where the fixed 3x3 wins: you actually want the rigidity. Everything must be the same size, so if something upstream silently changed resolution, this node refuses to run instead of quietly producing a distorted comparison. That's a feature when you're building a benchmark grid and a nuisance when you're building a demo.
And if you'd rather have the tiles joined without filling empty slots, remember that Image Concat Multi's grid mode pads the last row with black tiles by design. Nine images into 3 columns is a perfect fit, so the fixed 3x3 and the dynamic node produce the same layout - the difference is only in how they behave when your count changes.
Install
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/aining2022/ComfyUI_Swwan.git
cd ComfyUI_Swwan
python -m pip install -r requirements.txt
Windows portable:
.\python_embeded\python.exe -m pip install .\ComfyUI\custom_nodes\ComfyUI_Swwan\requirements.txt
Restart ComfyUI, hard-refresh the browser, search Swwan; it's filed under Swwan/Legacy. Nothing to download, and the vision extras in requirements.txt (opencv-python, scipy, scikit-image) are for other nodes in the pack - this one is pure torch.
The one install-shaped problem you might actually hit: this ID is part of the pack's 1.0.0 namespace migration away from KJNodes-overlapping names, and the pack deliberately registers no aliases for the old IDs. A workflow built against a pre-1.0 install will show a missing node here. Run the repo's migration tool and it'll map the old ID for you:
python scripts/migrate_workflow.py old.json --dry-run
It defaults to writing a new file and leaving the original untouched, so there's no reason to skip the dry run.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image1 | IMAGE | — | |
| image2 | IMAGE | — | |
| image3 | IMAGE | — | |
| image4 | IMAGE | — | |
| image5 | IMAGE | — | |
| image6 | IMAGE | — | |
| image7 | IMAGE | — | |
| image8 | IMAGE | — | |
| image9 | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |