💪TB | Tiny Encode
Tiny Encode demystified
- image
- vae
- latent
💪TB | Tiny Encode does one job and does it carefully: it takes a real image and turns it into the latent representation a diffusion model can work on, using your VAE. That's the same job ComfyUI's stock VAEEncode does - except this one chops the image into overlapping tiles first, so you can encode a big image on a small card.
Why does that matter? A VAE isn't a cheap operation at high resolution. Encode a 2048px image in one shot and you can blow past the VRAM of a 6–8 GB card - exactly the hardware this pack is aimed at. TinyBreaker's whole pitch is "big images, small GPU," and this node is part of making that true on the encode side.
The two inputs that matter
The node is simple: image in, latent out, plus a VAE and two tuning knobs.
- tile_size - the size of each tile, expressed in pixels of the input image, from
128pxto1024px. Default is512px. Lower means each VAE call is smaller, so peak memory drops. The tradeoff is spelled out in the tooltip: smaller tiles can lower image quality. - overlap - how much adjacent tiles overlap,
0%to100%, default100%. Overlap is what keeps tile edges from showing up as seams. The node blends overlapping tiles together with a gradient mask, so at high overlap you get invisible stitching at the cost of doing more redundant work. If you're ever tempted to crank overlap to 0 to save time, know that's where visible tile artifacts come from.
Under the hood the source confirms the mechanism: the image is walked tile-by-tile, each tile encoded, then the latent tiles are blended onto a canvas via a gradient mask. The tiling step size is derived from the tile size divided by the VAE's downscale ratio (typically 8), so 512px input tiles become small latent patches.
Why you'd reach for it
Two common spots. First, img2img: encode a source image into latent space, then let a TinyBreaker sampler denoise it. Second, as the front half of an upscale pass - the pack's upscalers use this same tiled encode internally before refining. If you're just sampling from a prompt, you don't need this node at all; 💪TB | Empty Latent Image (or the genparams flow) starts you in latent space directly.
One honest caveat: unless your source image is genuinely large, stock VAEEncode is fine and faster. Tiny Encode earns its keep at high resolution or low VRAM, not in a 512px workflow. It's a tool for the ceiling, not the routine.
Install and prerequisites
Same as every node in this pack:
cd ComfyUI/custom_nodes
git clone https://github.com/martin-rizzo/ComfyUI-TinyBreaker
Or grab it via ComfyUI Manager (search "tinybreaker") and restart. No Python dependencies to install. The VAE you plug in can be the one the pack's LoadTinyBreakerCkpt node hands you, or any standard VAE - the tiling is VAE-agnostic.
Where people get burned: feeding it an image whose dimensions aren't divisible by the VAE's downscale ratio can produce a latent a few pixels off from what you expect, which shows up as weird edges after decode. Keep images at clean multiples of 8 and you won't think about it again.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The image to be encoded to a latent representation. | |
| vae | VAE | The VAE model used for encoding the image. | |
| tile_size | COMBO | 512px | The size of the tiles used to divide the image into smaller regions for processing, expressed in pixels of the input image. A lower tile size reduces memory usage but may result in lower image quality. |
| overlap | COMBO | 100% | The percentage of overlap between adjacent tiles. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | Latent representation of the input image. |