Tile Packing
Every tile variant in one atlas
- tiles
- tileset
- IMAGE
If you've ever downloaded a tileable texture pack, you've seen this node's output: one image holding every tile variant in a tidy grid, the whole library at a glance. Tile Packing takes your generated tile set and lays it out into a single atlas - the same "pack" layout the paper uses for its result images, and the same thing you'd save to disk so you never have to regenerate the set.
What it does
It takes the tile batch plus its TILESET and rearranges it via pack_tiles into a compact colors² × colors² grid - 9×9 tiles at the default 3 colors - laid out so every tile variant appears exactly once (with a scheme specific to each kind - wang, dual, self). Think of it as the "save the library" node: one image that documents every tile, easy to eyeball, easy to share, and - because the pack layout is deterministic - easy to reverse back into individual tiles with TileUnpacking later. It's also the convenient preview before you commit to a full RandomTiling: you can check the whole set at a glance instead of squinting at the field for repeated motifs.
Inputs and outputs
- tiles (IMAGE) - your finished tile batch
- tileset (TILESET, forceInput) - kind, colors, resolution, candidates
Output is a single IMAGE - the packed atlas. Hook it to SaveImage (this is the image you keep) and also branch it into RandomTiling to see the set in action.
Installing and gotchas
Standard pack install: git clone https://github.com/samsartor/content_aware_tiles into ComfyUI/custom_nodes (or ComfyUI Manager → "content_aware_tiles") and restart. No model downloads - pure tensor layout work.
The error you'll meet is the dual one, again: packing a dual tileset demands exactly colors**4 * 2 tiles (interior + cross), and the node refuses otherwise with a message stating what it found. Also, don't be surprised if the packed output looks slightly cropped relative to your raw tiles - the node normalizes tiles to their canonical resolution first (tilize_tiles), trimming the seam margin off uncropped tiles so the atlas is clean. If the atlas looks off, check whether you fed it raw boundary output instead of post-sampler tiles; the pack expects finished interiors. This pack has no community forums to lean on - zero reddit presence - so keep the workflow JSON handy; the node itself is about twenty readable lines.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| tiles | IMAGE | — | |
| tileset | TILESET | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |