Nodes/comfyui-usetaesd/TAESD Encode (Tiled)
ComfyUI Node

TAESD Encode (Tiled)

Encoding a huge image? Tile the encode instead of blowing up VRAM

By neocrz·Created about a year ago·Updated 10 months ago· 4
TAESD Encode (Tiled)
  • pixels
  • LATENT
taesd_model_nametaesd
tile_size512
overlap64

Encode is the quiet half of the VAE job, and it's the half that kills low-VRAM setups first: push a big source image through a full VAE encoder and the card either chokes or starts swapping. TAESD Encode (Tiled) (class EncodeTAESDTiled, from neocrz/comfyui-usetaesd) handles it by slicing the image into overlapping tiles, encoding each one with a Tiny AutoEncoder, and stitching the latents back together. Peak memory stays bounded no matter how wide your source image is.

It's the paired sibling of TAESD Encode, tuned for the case where the source itself is the problem - a several-thousand-pixel reference you want to img2img, a big crop, a panorama. Same output as the plain node, just processed in chunks. And like all TAESD paths, you're trading final fidelity for speed and memory; keep this for iteration and previews.

How it works

The node loads a TAESD encoder from models/vae_approx/, wraps it with the right per-model vae_scale/vae_shift, and calls ComfyUI's encode_tiled with your tile_size and overlap. One detail that trips people up: on the encode side, ComfyUI expects tile sizes in image pixels (its own default is 512), so this node passes them straight through - no conversion. The decode-side sibling is the one that converts to latent pixels; the pack handles both correctly, but the two nodes are not symmetric under the hood. The encoder also ignores the alpha channel, so RGBA inputs become RGB.

The inputs that matter

  • pixels (IMAGE) - the big image to encode.
  • taesd_model_name - taesd (default), taesdxl, taesd3, taef1. Match it to the checkpoint family you're about to sample with.
  • tile_size (INT, default 512, step 64) - tile size in image pixels. Smaller tiles, less memory per chunk.
  • overlap (INT, default 64, step 32) - pixel overlap between tiles so the latent seams don't show. Zero is allowed but expect visible artifacts at the boundaries.

Output is a single LATENT, ready for KSampler.

Installing it

Via ComfyUI Manager (search comfyui-usetaesd) or:

cd ComfyUI/custom_nodes
git clone https://github.com/neocrz/comfyui-usetaesd

Restart ComfyUI. No requirements.txt - the pack only uses ComfyUI core, so installation is genuinely painless. The model files are not included, and this node needs the encoder files in ComfyUI/models/vae_approx/:

cd ComfyUI/models/vae_approx
wget https://huggingface.co/madebyollin/taesd/resolve/main/taesd_encoder.safetensors
wget https://huggingface.co/madebyollin/taesdxl/resolve/main/taesdxl_encoder.safetensors

Common issues

  • FileNotFoundError - the {model}_encoder.safetensors isn't in vae_approx. Same folder, same fix.
  • taesd3 / taef1 error out. Those two madebyollin repos ship only a combined diffusion_pytorch_model.safetensors, not the split encoder files this pack looks for. In practice, taesd and taesdxl are your working options.
  • Seams or weird seams-free-but-blurry output. Tune overlap up for smoother stitching; keep it a modest fraction of tile_size. If the image is small enough to encode in one chunk, the plain TAESD Encode is faster - tiling exists for the memory problem, not as an everyday default.

A small single-file MIT pack with no dependencies. It does one thing - tiled low-VRAM encoding - and does it without asking you to install anything else.

Categorylatent/TAESD

Inputs (4)

NameTypeDefaultDescription
pixelsIMAGE
taesd_model_nameCOMBOtaesd4 options: taesd, taesdxl, taesd3, taef1
tile_sizeINT51264–16384Tile size for encoding (in image pixels)
overlapINT640–16384Overlap between tiles (in image pixels)

Outputs (1)

NameTypeDescription
LATENTLATENT