Tile Images (Latent)
Normalize latent tiles without decoding
- tiles
- tileset
- vae
- LATENT
The latent twin of TileImages, for when you want to keep everything in latent space. Same job - normalize a batch of tiles into one canonical format - except the input and output are LATENT tensors instead of images, so nothing gets decoded and re-encoded on the way through. In a fully latent pipeline (LatentDualBoundaries → sampler → LatentTilePacking), this is the utility that tidies the tile batch between stages.
What it does
It runs the same tilize_tiles normalization the image version uses, on latent tensors: unpacks a packed latent atlas back into individual latent tiles, crops the seam margin off uncropped resolution * 2 latents, or passes canonical tiles through untouched. Output is a LATENT batch of individual tiles at the canonical latent resolution (resolution // vae.downscale_ratio). The vae input is only consulted for that downscale ratio - no actual encoding or decoding happens here, consistent with every latent node in the pack.
Inputs and outputs
- tiles (LATENT) - any latent tile layout you have
- tileset (TILESET, forceInput) - kind, colors, resolution, candidates
- vae (VAE) - for the latent downscale factor
Output is a single LATENT: the normalized tile batch, ready for LatentTilePacking, LatentRandomTiling, or any other latent consumer.
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. No models.
The TILESET port is forceInput, as everywhere in this pack - the batch can't be interpreted without its metadata, so keep that wire connected. And remember the resolution bookkeeping: the TILESET stores pixels, the tensors live at latent resolution, and the VAE input is what bridges the two; if you ever see shape mismatches down the line, the usual cause is a tileset from a different-resolution generation than the latents you're feeding. Research-pack utility, minimal docs, ~15 readable lines if you need to verify anything.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| tiles | LATENT | — | |
| tileset | TILESET | — | |
| vae | VAE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |