VAE Scale SDXL Block
Turn one stage of your SDXL VAE up, down, or off
- vae
- VAE
Every SDXL VAE is a stack of discrete stages: an encoder that compresses pixels down to a 4-channel latent (an input conv, four down blocks, a mid block, an output head) and a mirrored decoder that reconstructs pixels on the way out. VAE Scale SDXL Block lets you multiply the weights of one of those stages by any factor from 0 to 2, leaving everything else untouched. Scale 1.0 means "leave this block alone," 0.0 means "zero it out entirely," 1.5 means "amplify it."
This is not a node you need for normal generation. Your checkpoint's baked SDXL VAE is fine as-is, and honestly, most of these knobs should stay at 1.0 forever. It's a tinkering tool for people who are investigating what a given VAE stage actually does - which blocks carry color, which ones carry fine detail, which ones you can mangle without the image falling apart. If you're the kind of person who reads "the VAE is a codec, not a color filter" and immediately wants to find out which weights are the color, this is your toy.
How it works
The node reads the VAE's full state dict, then for every tensor it looks up the scale whose key is the longest matching prefix of that tensor's name. encoder.down.2. is a longer match than encoder.down., so setting encoder.down.2. to 0.5 scales only that down block, not the whole encoder. A multiplier of exactly 1.0 is skipped, so the tensors are copied through untouched. Everything is then reassembled into a brand-new VAE object - a real materialized merge, not a patch, and it exists only in memory until you save it.
The inputs that matter
The widget list mirrors the architecture's key names: quant_conv / post_quant_conv (the tiny convs that squeeze and stretch the latent), encoder.* and decoder.* for each stage, with down.0–down.3 and up.0–up.3 being the four spatial stages on each side. There are 22 of them. For a beginner, the only two worth touching at first are quant_conv and post_quant_conv - they're the single most independent pieces of the whole pipeline and the easiest to A/B. Output is a single VAE, wired into VAEDecode like a loaded one.
The honest warning
Weights drive activations, and the SDXL VAE has a history of producing NaNs when its internal activations get too big - that's the entire reason madebyollin's fp16 fix exists. Zeroing blocks or cranking scales to 2.0 is the fast lane back to black frames. Keep scales between 0.5 and 1.5 while you're learning, and if output goes black or NaN, the first suspect is your scale, not your sampler.
Installing it
This comes from the easygoing0114/ComfyUI-easygoing-nodes pack. Install via ComfyUI Manager (search Easygoing), or:
cd ComfyUI/custom_nodes
git clone https://github.com/easygoing0114/ComfyUI-easygoing-nodes.git
Restart ComfyUI. No extra dependencies or model downloads - the pack uses ComfyUI's own stack - but it's written against the V3 node API, so a current ComfyUI build is required for these nodes to show up at all.
Scale nodes don't get flashy, but if you've ever wanted to dissect what your VAE is actually doing, this is the cleanest way to start poking.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| quant_conv | FLOAT | 1.000–2 | — |
| post_quant_conv | FLOAT | 1.000–2 | — |
| encoder.conv_in | FLOAT | 1.000–2 | — |
| encoder.down.0. | FLOAT | 1.000–2 | — |
| encoder.down.1. | FLOAT | 1.000–2 | — |
| encoder.down.2. | FLOAT | 1.000–2 | — |
| encoder.down.3. | FLOAT | 1.000–2 | — |
| encoder.mid.attn_1. | FLOAT | 1.000–2 | — |
| encoder.mid.block_1. | FLOAT | 1.000–2 | — |
| encoder.mid.block_2. | FLOAT | 1.000–2 | — |
| encoder.norm_out | FLOAT | 1.000–2 | — |
| encoder.conv_out | FLOAT | 1.000–2 | — |
| decoder.conv_in | FLOAT | 1.000–2 | — |
| decoder.mid.attn_1. | FLOAT | 1.000–2 | — |
| decoder.mid.block_1. | FLOAT | 1.000–2 | — |
| decoder.mid.block_2. | FLOAT | 1.000–2 | — |
| decoder.up.0. | FLOAT | 1.000–2 | — |
| decoder.up.1. | FLOAT | 1.000–2 | — |
| decoder.up.2. | FLOAT | 1.000–2 | — |
| decoder.up.3. | FLOAT | 1.000–2 | — |
| decoder.norm_out | FLOAT | 1.000–2 | — |
| decoder.conv_out | FLOAT | 1.000–2 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| VAE | VAE | — |