PixaromaNodes Explained
All Nodes Explained videos
Video coming soon
Goes live, Romania timeThursday 26 November, 18:00The practice workflows are ready now, so you can download them before it starts.
Video 6

ComfyUI VAE Explained: Load VAE, VAE Decode and VAE Encode

What the VAE does and how to use its nodes: VAE Decode, Load VAE, VAE Encode and VAE Decode (Tiled). Which VAE goes with your model and what the red error means, how to start from your own photo with denoise, why the same VAE must sit on both sides, what every trip through the VAE costs, and when the tiled node saves a very big image, with two deeper looks. Made with Z-Image Turbo.

To open one: drag the .json file onto ComfyUI, or use Workflow > Open. New to ComfyUI? Install it first.

Practice tasks

The same tasks as the notes in the Practice workflow.

  1. 1

    Connect

    The missing VAE wire

    Press Run. ComfyUI stops before it starts: VAE Decode has no vae wire.
    Drag VAE from the Load VAE at the top left into the vae input of VAE Decode, and press Run again.

    You know it worked when that error is gone. A new one comes, on the KSampler: that is Task 2.

  2. 2

    Fix it

    The wrong VAE on the encode side

    The KSampler stops with a message about shapes that cannot be multiplied. The KSampler is fine: the Load VAE under VAE Encode is set to pixel_space, so the photo was packed the wrong way.
    Delete that second Load VAE. Drag VAE from the first Load VAE into the vae input of VAE Encode, and press Run.

    You know it worked when you get an animated cat in the same pose as the photo.

  3. 3

    Add

    Your own photo

    In Load Image, click choose file to upload and pick a photo of your own: your pet, your room, your desk. Press Run.

    You know it worked when the new image keeps the shapes of your photo, and the size under it is the size of your photo.

  4. 4

    Experiment

    Denoise

    Set denoise on the KSampler to 0.3, press Run. Then try 0.7 and 1.

    You know it worked when 0.3 looks almost like your photo, 0.7 keeps the pose, and at 1 your photo is ignored.

  5. 5

    Experiment

    The tiled node

    Add VAE Decode (Tiled). Give it the same samples and vae wires as VAE Decode, drag its IMAGE into Save Image, and press Run. Then set tile_size to 64 and overlap to 0, and press Run again.

    You know it worked when you zoom in close and find thin straight lines, a grid, like in the video. Set tile_size back to 512 and overlap to 64.

  6. 6

    Save

    Your workflow

    Press Ctrl + S, type a name like My VAE practice, and press Enter.

    You know it worked when your workflow shows in the Workflows panel on the left.

Models

Download each file and put it in its folder.

Model fileSizePut it inDownload
Diffusion model pick onez_image_turbo_int8_convrot.safetensorsint8, the one used in the video6.2 GB
ComfyUI/models/diffusion_models/z-image
Hugging Face
Diffusion model pick onez_image_turbo_bf16.safetensorsbf16, full detail, needs more video memory12.3 GB
ComfyUI/models/diffusion_models/z-image
Hugging Face
Diffusion model pick onez_image_turbo_nvfp4.safetensorsnvfp4, for RTX 50 cards4.5 GB
ComfyUI/models/diffusion_models/z-image
Hugging Face
Text encoder pick oneqwen_3_4b_fp8_mixed.safetensorsfp8, the one used in the video5.6 GB
ComfyUI/models/text_encoders
Hugging Face
Text encoder pick oneqwen_3_4b.safetensorsfull detail8.0 GB
ComfyUI/models/text_encoders
Hugging Face
VAEae.safetensors0.3 GB
ComfyUI/models/vae
Hugging Face

After the download, press R in ComfyUI (or restart it), so the new files show up in the loaders.

Z-Image Turbo is free (Apache 2.0). The Comfy-Org files download without an account.

Chapters

Click a time to jump there on YouTube.

  1. Intro
  2. What the VAE Does
  3. VAE Decode
  4. Load VAE: Which VAE Goes With Your Model
  5. A Deeper Look: How a VAE Packs
  6. VAE Encode
  7. The Same VAE on Both Sides
  8. Every Trip Loses a Little
  9. VAE Decode (Tiled)
  10. A Deeper Look: How the Tiles Are Joined
  11. Your Turn
  12. Quick Recap
  13. Thank You, Legends