⚗️🔬| Advanced VAE Decoder ^X2.1
Decode outside the box — a VAE decoder that skips the clamp and tiles when VRAM runs low
- samples
- vae
- IMAGE
Advanced VAE Decoder is an experimental stand-in for ComfyUI's plain VAEDecode, and it exists because the plain one silently throws away data. When your sampler hands back a latent, the standard decoder clamps every pixel into the 0.0–1.0 range before you ever see it. This node can stop that from happening, and it can also tile the decode when your 1600×1088 Z-Image render tries to blow past your VRAM.
It's part of Martin Rizzo's Z-Image Power Nodes pack, the companion set to his Amazing Z-Image Workflow. Z-Image Turbo's native sweet spot is roughly 1–2MP, which is exactly the range where a single non-tiled decode starts hurting on an 8GB card, so this isn't a random toy - it's aimed at the two pain points that show up right at the end of every high-res Z-Image workflow.
How it works
Under the hood it's still the same vae.decode() as the core node. The difference is what happens to the output. Normally ComfyUI rescales the VAE's [-1, 1] output and clamps it to [0, 1]. With allow_extended_range on, the node swaps that for a plain shift (add 1, divide 2) with no clamp, so pixels are free to sit outside the normal range. That's useful if you're pushing values through a downstream HDR-ish tonemapping step and want to keep the headroom instead of clipping it at the decode stage.
low_vram_mode takes the other route: it hands the latent to ComfyUI's built-in VAEDecodeTiled with a 512px tile size, so the decode happens in chunks. Slower, marginally softer tiles, but you stay on-GPU when a full-size decode would OOM.
The inputs that matter
samples(LATENT) andvae(VAE) - the latent you want rendered and the VAE that renders it. For Z-Image you're usually feedingae.safetensors(or theZ-Image_half_natural_vaethe author recommends alongside the ConvRot checkpoints).allow_extended_range(BOOL) - the headline feature. The author's own guidance: enable to keep high dynamic range data, and disable again if you see artifacts or distortion.low_vram_mode(BOOL) - force tiled decoding. Leave it off unless you're genuinely memory-starved; the quality trade-off is real even if small.
The output is a plain IMAGE (list of decoded tensors), so it wires straight into a preview, Save Image, or an upscaler.
Install
Same as the rest of the pack - ComfyUI Manager, search "Z-Image Power Nodes", install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/martin-rizzo/ComfyUI-ZImagePowerNodes
Restart ComfyUI. There's no requirements.txt - the pack runs on stock ComfyUI. Minimums per the README: Python 3.10, PyTorch 2.5, ComfyUI v0.11.0. You do still need the Z-Image model triplet (diffusion model, Qwen3-4B text encoder, and a VAE in models/vae/).
Gotchas
This is an experimental node - the ⚗️🔬 in the menu isn't decoration. The author is explicit that experimental nodes "may change or be removed without prior notice," so don't build a workflow you'll never update around it. Two practical traps: extended-range output can look blown out or wrong in a normal preview (that's expected; it's data you haven't tone-mapped yet), and tiled mode's seams are most visible on gradients. If either happens, flip the respective toggle off and you're back to standard behavior. For most people, honestly, the stock VAEDecode is fine - reach for this one when the clamp genuinely costs you or the OOM screen appears.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | The latent representation to be decoded into an image. | |
| vae | VAE | The VAE model used to decode the latent input. | |
| allow_extended_range | BOOLEAN | When enabled, the standard numerical clamping on the VAE output is bypassed, permitting pixel values to exist outside the typical [0.0, 1.0] range, which could be beneficial for preserving high dynamic range data. Disable if image artifacts or distortion appear. | |
| low_vram_mode | BOOLEAN | When enabled, force the VAE decoding process to be split into smaller tiles. While this significantly reduces VRAM usage on large images, it results in slower processing speeds and a slight reduction in final image quality. This option should remain disabled unless you are operating under severe GPU memory constraints. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | The decoded image. |