LucidFlux_SM_Decoder
Turning the restored latent back into pixels — and why 'wavelet' should stay on
- latent
- ae
- images
What it is
LucidFlux_SM_Decoder is the last stop on the standard (1K/2K) path: it takes the restored latent from LucidFlux_SM_KSampler and turns it back into an image you can save. Every example workflow ends here or at the PiD decoder, and it's one of the few nodes in this pack where a single checkbox is doing most of the interesting work.
The mechanism is worth understanding because it explains a color bug people hit. The sampler's latent isn't a plain FLUX latent - it carries the original input images inside it, and the decoder uses that. When wavelet is on, the decode runs a wavelet reconstruction pass: it takes the VAE-decoded result's high-frequency detail and stitches it onto the original image's low-frequency (color and broad structure). In other words, the VAE invents the fine detail, but the original image keeps ownership of the colors. That's why restored output from this pack doesn't drift into weird green or magenta casts the way naive latent restores often do - it's a color-alignment trick, straight out of the align_color module in the source.
The inputs
The inputs:
- vae: a combo of files in
models/vae/. The README points you atae.safetensorsfrom Comfy-Org, or the optional UltraFlux VAE (Owen777/UltraFlux-v1) - the node auto-detects UltraFlux by its weights and switches the decode math accordingly. The 2K example uses UltraFlux; the 1K example uses plainae.safetensors. - latent: from LucidFlux_SM_KSampler. It's the one that carries
imagesand theinfer_2kflag inside, which is why the node knows what to color-align against. - wavelet: default on. Leave it on. Turning it off gives you the raw VAE decode, which is faster but loses the color lock to the source.
- ae (optional): a VAE input instead of the combo picker - feed an already-loaded ComfyUI VAE if your graph has one hanging around. If it's set, it takes precedence over the
vaecombo.
Output: images, an IMAGE you can preview, save, or pipe onward (the 2K path sometimes feeds it into the PiD 4K stage).
Install
Install is the pack's shared routine: git clone https://github.com/smthemex/ComfyUI_LucidFlux into custom_nodes (or search it in ComfyUI Manager), pip install -r requirements.txt, restart ComfyUI, then put ae.safetensors in models/vae/. This node specifically needs that file, and it's a gated download from Comfy-Org's model repo - log in on Hugging Face or grab the pre-mirrored copies floating around.
The trap
The one real trap: don't swap in a stock VAE Decode node to "save a step." The latent this pack produces is not shaped like a stock Flux latent - it's built for this decoder's internal bookkeeping (the carried images, the scaling-factor and shift-factor handling, the UltraFlux branch). Run it through the stock node and you'll get either a tensor-shape error or an image with the color lock missing. Keep the pair together: KSampler from this pack, Decoder from this pack.
Also worth a beat on expectations: at 1K the result is genuinely better than the raw input on damaged photos, but the showcase resolution is the 2K path with the UltraFlux VAE. If you've got the VRAM, that's the combination to reach for - the decoder is where the "universal restoration" money actually gets paid out.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | COMBO | 1 options: none | |
| latent | LATENT | — | |
| wavelet | BOOLEAN | true | — |
| aeopt | VAE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |