(deforum) Set VAE Downscale Ratio
An experimental tuning knob for tiling workflows
- vae
- VAE
Everything about this node screams "experimental" - it's categorized under deforum/_for_testing, its display name starts with a parenthetical, and its entire job is to reach into a VAE object and rewrite one attribute. It takes a VAE in, sets downscale_ratio on it, and hands the same VAE back out.
What's the ratio for? In tiling workflows the VAE's downscale factor controls how much the latent is shrunk relative to the image, which interacts with high-res passes and the Deforum loop's per-frame processing. Deforum's default reasoning assumed one ratio; this node lets you override it (default 42, range 32–64). If you're not chasing a specific memory/quality tradeoff in a tiled or hi-res render, you almost certainly don't need it.
Inputs and output
vae- any VAE object. Passed through untouched except for the one attribute.downscale_ratio- the integer to write, 32–64, default 42.- Output:
VAE- the same object, now withvae.downscale_ratioset.
The source is four lines of real work: vae.downscale_ratio = downscale_ratio; return (vae,). That's the honest extent of it.
Where it fits
It's a pass-through node in the VAE chain: Load VAE → Set VAE Downscale Ratio → VAE Encode/Decode. Because it mutates the object in place, whatever node consumes that VAE downstream sees the new ratio. The _for_testing category is the pack's own label saying "this may change or vanish," so treat it as a spare part, not a foundation.
Installation
Part of Deforum Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes.git
Restart ComfyUI, or install "Deforum Nodes" by XmYx via ComfyUI Manager. No extra dependencies - it's a plain attribute setter on a standard ComfyUI VAE object.
Honest guidance
If you hit a VRAM wall or odd latent sizes in a tiling workflow and someone's tutorial says "mess with the VAE downscale ratio," this is the lever. Otherwise, leave it alone - it's the kind of knob that exists because someone hit a specific bug, and poking it without a reason is how you get weird latent-size mismatches that are a pain to debug. When in doubt, the default 42 and the _for_testing label tell you everything: it was tuned for one scenario, not for general use.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| downscale_ratio | INT | 4232–64 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| VAE | VAE | — |