Nodes/Gigachad Nodes/⚡ Gigachad VAE Encode
ComfyUI Node

⚡ Gigachad VAE Encode

Turn a starting image into a latent — with tiled encoding for the big ones and video support

By Winnougan·Created 4 months ago·Updated 4 months ago· 2
⚡ Gigachad VAE Encode
  • pixels
  • vae
  • latent
tiledfalse
tile_size512
tile_overlap64
temporal_size64
temporal_overlap8

Gigachad VAE Encode is the mirror image of the pack's VAE Decode: it takes an IMAGE and compresses it into a LATENT, which is what you need the moment your workflow stops being pure text-to-image. Load a reference photo, encode it, and feed the latent into a sampler at denoise < 1 - that's img2img, style transfer from an input, inpainting setups, and a dozen other patterns, all starting with this node.

The inputs

  • pixels (IMAGE) and vae (VAE) - the image to encode and the VAE to do it with. Both required.
  • tiled (default off) - tiled encoding, same logic as the decode side. Big source images (2048px+, or high-res photos you're feeding in for img2img) can OOM a small card on a full encode; flipping this on splits the work into tiles.
  • tile_size (default 512) and tile_overlap (default 64) - spatial tiling controls. Shrink the tile size if you're still OOMing; raise the overlap if you see seams.
  • temporal_size (default 64) and temporal_overlap (default 8) - temporal tiling for video sources, where you're encoding a clip rather than a still.

The single output is latent (LATENT), which wires into a sampler's latent_image or into a latent-manipulation node.

How it works

Full encode is vae.encode(); tiled mode uses the VAE's tiled encoder with your spatial and temporal tile settings. There's no magic here - it's the standard VAE compression with explicit memory controls exposed. The two things to actually remember:

  1. Encode + denoise is the img2img recipe. Encode your source, drop denoise to something like 0.3–0.6, and the sampler preserves the structure while changing the style or refining detail. Full denoise = 1.0 mostly ignores the input.
  2. Tiled encode is not free. It's a memory safety net, not a quality boost - keep tiled off for normal-size images and only flip it when you hit an OOM. The KB's concepts doc covers the same "tiled when you must" pattern for upscaling.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/Winnougan/comfyui-gigachad.git

or search comfyui-gigachad in ComfyUI Manager and restart. No requirements.txt - pure ComfyUI, nothing extra to install.

Verdict: a solid, slightly more capable version of the stock VAEEncode, worth having if you do any image-input work on modest VRAM. If your workflow is strictly text-to-image and you never start from a photo, you won't touch it - but the day you want to img2img a reference, this is the node that makes the latent. Pair it with the pack's GigachadVAEDecode and the controls match on both sides.

CategoryGigachad

Inputs (7)

NameTypeDefaultDescription
pixelsIMAGE
vaeVAE
tiledBOOLEANfalseUse tiled encoding to reduce VRAM usage for large images.
tile_sizeINT51264–4096
tile_overlapINT640–512
temporal_sizeINT648–4096Temporal tile size (frames) for video VAEs.
temporal_overlapINT84–256Temporal overlap (frames) for video VAEs.

Outputs (1)

NameTypeDescription
latentLATENT