Nodes/ComfyUI-BerniniR Wrapper/Bernini-R VAE Loader
ComfyUI Node

Bernini-R VAE Loader

The 16-channel Wan VAE loader every Bernini-R run needs on both ends

By xiaolibai-sys·Created 2 months ago·Updated 2 months ago· 9
Bernini-R VAE Loader
    • vae
    vae_name

    Bernini-R is a Wan-family diffusion model, which means it doesn't use the 4-channel latent space SDXL and friends live in. Its VAE is the Wan 16-channel one: 4× temporal compression and 8×8 spatial compression. BerniniR_VAELoader is a deliberately boring node - it just loads that VAE - but you'll use it on both ends of almost every workflow, because this pack routes all encoding and decoding through its own VAE nodes rather than ComfyUI's built-ins.

    Why not just use the stock VAE loader?

    You could theoretically hand a stock VAELoader the same file. The reason this pack ships its own is that Bernini-R's conditioning and VAE nodes need to know exactly what they're working with. BerniniR_Conditioning chunks long source videos into temporal slices before encoding, and BerniniR_VAEDecode/BerniniR_VAEEncode do tiled encode/decode with color matching. Those nodes expect a VAE that this loader hands them cleanly. The 16-channel shape is the key number - it's why a length of 81 pixel frames maps to ~20 latent frames, and why you should never feed Bernini latents into an SDXL VAE decoder and expect anything but noise.

    The input

    One required input: vae_name - the Wan 16-channel VAE .safetensors in ComfyUI/models/vae/. Same VAE family Wan 2.1/2.2 uses, so if you already run Wan locally you likely already own this file. The README notes the WanI38B VAE with 48 latent channels is also supported internally, but the 16-channel Wan VAE is the standard, documented path.

    Output and wiring

    One output: vae (VAE). It plugs into BerniniR_Conditioning (which encodes your source video and reference images into context latents), and into BerniniR_VAEDecode on the way out. In a plain text-to-video graph that's the whole life of the VAE: in through Conditioning, out through Decode.

    Installing and troubleshooting

    Install the pack through ComfyUI Manager (search "ComfyUI-BerniniR Wrapper") or clone it into custom_nodes and restart. The Python side is light - the pack pins numpy, einops, tqdm, comfy-kitchen, and on Windows pywin32 - but don't let the short requirements.txt fool you into thinking there's nothing to download. The real downloads are the three model files: the Bernini-R diffusion model in diffusion_models/, the Wan T5-XXL encoder in text_encoders/, and this VAE in vae/.

    Common misses:

    • Empty dropdown → the VAE isn't in vae/. Wrong folder is the classic.
    • Gray or washed-out output at decode time → usually not this node's fault. The pack applies guidance in noise-residual space, and a mis-wired BerniniR_GuidanceStrengthSchedule is the more common cause of flat-looking video. Check the sampler's guidance_schedule wiring before blaming the VAE.
    • OOM during decode → the fix lives in BerniniR_VAEDecode (enable tiling, shrink tile stride), not here.

    One piece of context so you know what you're signing up for: Bernini-R editing costs roughly double the compute of a plain Wan 2.2 generation because the source clip becomes part of the model input. The VAE is never the bottleneck in that equation - but it is the thing that silently produces garbage frames if you mismatch the latent space. Keep this loader's output on the pack's own VAE nodes and you won't hit that trap.

    CategoryBernini-R/Loaders

    Inputs (1)

    NameTypeDefaultDescription
    vae_nameCOMBOWan 16-channel VAE (4x temporal, 8x8 spatial compression)

    Outputs (1)

    NameTypeDescription
    vaeVAE