Nodes/ComfyUI_UltraFlux/UltraFlux VAE Patch (F16)
ComfyUI Node

UltraFlux VAE Patch (F16)

The UltraFlux VAE Loads Wrong in ComfyUI, and It Won't Warn You

By smthemex·Created 11 months ago·Updated a day ago· 29
UltraFlux VAE Patch (F16)
  • vae
  • vae
◄partitionedfalse►

Your VAE is a /16. ComfyUI is sure it's a /8.

Every bad-VAE story ends the same way: grey, washed-out image, and someone in the comments pointing out you didn't load the right VAE. Helpful, at least the picture screams at you.

UltraFlux's VAE doesn't scream. Load UltraFlux.safetensors with the stock VAELoader and it loads clean - no error, no warning, colors look plausible. What you silently get is /8 semantics applied to an autoencoder that isn't /8. Its config declares stride: 2, which makes it a symmetric F16 model: the encoder's conv_in runs at stride 2 for a total downscale of 16, and the decoder inserts a nearest x2 upsample before conv_out for a matching upscale. ComfyUI assumes the Flux-standard 8x, so it halves your output resolution and hands you a latent whose scale isn't the one the DiT trained against.

UltraFluxVAEPatch is the node that tells ComfyUI the truth. VAE in, VAE out.

What it does to the model

It patches in place. The encoder's conv_in.stride becomes 2, and decoder.conv_out is replaced with a wrapper that does the nearest-neighbour 2x interpolate and then the convolution - exactly where the official Decoder.forward puts that upsample, so the weights line up as the paper's code expects. Then it fixes the VAE's own downscale_ratio / upscale_ratio to 16 so ComfyUI stops doing the wrong arithmetic downstream.

The author checked it against the reference diffusers AutoencoderKL(stride=2): encoder correlation 0.999999, decoder 0.999990. That's not "looks about right," that's the same function.

Practical consequence, and it's the one to remember: an empty latent of 2048 in ComfyUI decodes to a true 4096-pixel image through this node. Which is precisely what UltraFlux was built for, so the "wrong" resolution was never wrong - the decoder was.

Inputs and outputs

  • vae - from VAELoader, with UltraFlux.safetensors selected. Nothing else goes here; this is not a general-purpose VAE repair node.
  • partitioned - boolean, default false. The tooltip explains it better than I could: it reproduces the official tiled decode path (overlap-1 tiles), which the official pipeline enables by default, but it's a coarser approximation - relative error 8.6e-2 against 3.0e-3 for the plain path. So: leave it off for quality, and turn it on when a 4K decode runs you out of VRAM. The pack's example workflow note says exactly that - flip partitioned if you OOM.
  • vae out - into VAEDecode.

The wiring

VAELoader (UltraFlux.safetensors) → UltraFluxVAEPatch (partitioned: false) → VAEDecode → SaveImage

That's it. Two things worth internalising: put it after the loader and before every decode, and keep encode and decode on the same patched VAE. The whole point of this node is that the latent scale is different from stock Flux's, so a latent encoded with the patched VAE and decoded with an unpatched one gives you a soft, wrong-coloured mess that no amount of sampling fixes. Don't mix.

You also can't break it by stacking it twice - the patch is idempotent and returns early if the decoder's already been marked.

The VAE that got its own fan club

Funny footnote: around December 2025 this VAE escaped its own model. Trained on a huge pile of 4K imagery, it started showing up in Z-Image workflows as a detail knob, with a big comparison post and a loud camp of skeptics arguing it wasn't adding detail so much as sharpening. Both may be right.

Either way, it isn't a generic Flux VAE you can shuffle around freely. It's a /16 autoencoder with its own latent scale, and this pack is the only thing telling ComfyUI that.

Install

Same pack, same clone. If you already have UltraFlux working you have it.

cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_UltraFlux
# restart ComfyUI

Or search ComfyUI_UltraFlux in ComfyUI Manager. No extra pip packages. You do need UltraFlux.safetensors in ComfyUI/models/vae - it ships on the Owen777/UltraFlux-v1 HuggingFace repo rather than inside a checkpoint, so grab it separately.

Common issues

  • Image comes out at half the size you asked for. You skipped this node, or wired VAELoader straight into VAEDecode. The stock loader can't detect F16; that's the entire reason this node exists.
  • OOM at 4096. Turn partitioned on. It's the tiled path the official pipeline uses anyway, and yes, it's a slightly worse decode - that's the trade the tooltip is being honest about.
  • Blurry or wrong colours despite the node being present. Check you didn't route some decodes through the patched VAE and others through a different one.
  • The pack's older examples don't match. It was rewritten around ComfyUI's core Flux implementation; workflows from the diffusers-wrapper era have a different node arrangement. Rebuild from example_workflows.
CategoryUltraFlux

Inputs (2)

NameTypeDefaultDescription
vaeVAE—
partitionedBOOLEANfalseReproduce the official tiled decode path (overlap-1 tiles). The official pipeline enables it by default, but it is a coarser approximation: rel 8.6e-2 vs 3.0e-3 for the plain path.

Outputs (1)

NameTypeDescription
vaeVAE—