Tile Unpacking
Load a tile set from a single packed image
- packing
- IMAGE
- TILESET
Everything else in this pack is about making tile sets. This node is about reloading one you already have. Tile Unpacking takes a single packed atlas image - the kind TilePacking produces, or a tile pack you downloaded or generated in a previous session - and splits it back into individual tiles, reconstructing the TILESET metadata as it goes. It's the "load" button for the whole pipeline, and it means a tile set survives as a plain image rather than a fragile workflow.
What it does
You give it a packing image plus three parameters - kind (wang, dual, or self), resolution, and colors - and it reverses the pack layout: individual tiles come out as a batch, cropped to canonical resolution, along with a freshly built TILESET. Because the pack layout is deterministic, unpacking is an exact round trip with TilePacking. Two niceties in the code: for self packs it detects the tile count and sets the tileset's candidates accordingly, and the resulting TILESET means you can feed the tiles straight back into RandomTiling, DualBoundaries, or WangBoundaries as if you'd just generated them.
Why would you bother? Because this is how you take a tile set you made last month (or someone else's) and run it through the pack's machinery without regenerating anything. You can even use it as a bridge: unpack an SD 1.5-era Wang texture pack, feed the tiles into DualBoundaries, and upgrade them to a dual set.
Inputs and outputs
- packing (IMAGE) - the packed atlas image
- kind (enum) - wang | dual | self
- resolution (INT, default 256) - the tile size, must match how the pack was made
- colors (INT, default 3) - number of edge/corner colors, must match the pack
Outputs: IMAGE (the individual tiles as a batch) and TILESET (reconstructed metadata).
Installing and notes
Standard pack install: git clone https://github.com/samsartor/content_aware_tiles into ComfyUI/custom_nodes (or ComfyUI Manager → "content_aware_tiles") and restart. Pure tensor slicing, no models involved.
The honest gotcha is bookkeeping: resolution and colors must match how the pack was created, and there's no metadata embedded in the image to tell you - the error messages will blame a shape mismatch, but the real cause is almost always a wrong resolution or colors value. Keep a note of your settings when you pack, or you'll be guessing. Also expect no community help on this research pack; the workflow JSON and the ~30 readable lines of node code are the documentation.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| packing | IMAGE | — | |
| kind | COMBO | 3 options: wang, dual, self | |
| resolution | INT | 256 | — |
| colors | INT | 3 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| TILESET | TILESET | — |