Nodes/Tenser Tensor/TT Vae Encode (Tiled)
ComfyUI Node

TT Vae Encode (Tiled)

Encode a 4K image without watching your VRAM die

By tenser-tensor·Created 7 months ago·Updated 5 months ago· 0
TT Vae Encode (Tiled)
  • vae
  • image
  • LATENT
tile_width512
tile_height512
overlap64

The VAE is the step that turns pixels into latent space and back, and it's a quiet VRAM hog. Feed it a huge reference image - a 2K or 4K photo you want to img2img or inpaint over - and a stock VAEEncode can blow through your card in one tensor. TT VAE Encode (Tiled) does what the name says: it chops the image into tiles, encodes each one separately, and stitches the latents back together. Same result, a fraction of the peak memory.

From the TenserTensor pack, this node is the encode half of the pack's tiled VAE pair. The mechanism is honest about what it's doing - it calls ComfyUI's vae.encode_tiled under the hood, which is the same tiling machinery the core decode uses.

The three inputs that matter

  • tile_width / tile_height (default 512, 64–4096 in steps of 64) - the tile size in pixels. Smaller tiles = less memory per pass. If you're on 8GB, 512 works; if you have headroom, larger tiles are faster because there are fewer seams to worry about.
  • overlap (default 64) - how much tiles overlap so the edges blend instead of showing hard lines. The pack's own docs recommend 10–15% of tile size, so at 512 tiles, 64–80 is the sweet spot. Too little overlap and you get visible tile seams in the latent, which show up as grid artifacts after sampling; too much and you're just doing extra work.

Feed it image (pixels) and vae, and you get a LATENT out - wire that straight into a KSampler or the sampler's latent input.

Where you actually use it

Tiled encode earns its keep in high-res img2img and inpainting. If you load a 3000×2000 reference and want to keep its composition, encoding it in one shot is exactly the moment 8GB cards say "out of memory." The tiled version rides that out. It's also genuinely fine as a drop-in replacement for VAEEncode - the output latent is compatible with everything, so you can swap it in without rewiring the graph.

Caveats and gotchas

Same pack-wide notes apply: this is a legacy V1 node. TenserTensor migrated its node set to ComfyUI's API V3, and V1 nodes are in the Deprecated/ category, scheduled for removal in a future major release. It still works today.

For install, it's the usual TenserTensor route:

cd ComfyUI/custom_nodes
git clone https://github.com/tenser-tensor/ComfyUI-TenserTensor

or ComfyUI Manager → search "TenserTensor" → install → restart. Dependencies are gguf and kornia; Manager handles them.

One trap: the tiling here happens in pixel space - the encode path uses your tile size directly, not divided by the VAE compression. So don't copy the tiny latent-space tile numbers you might have seen for a tiled decode. And if your output has seam artifacts, raise overlap before you shrink the tiles - that's the fix 90% of the time. Finally, make sure you're not silently running with overlap at 0, which the node allows and which produces exactly the kind of visible seams you'd expect.

CategoryTenserTensor/VAE

Inputs (5)

NameTypeDefaultDescription
vaeVAE
imageIMAGE
tile_widthINT51264–4096
tile_heightINT51264–4096
overlapINT640–4096

Outputs (1)

NameTypeDescription
LATENTLATENT