π Flux LayerDiffuse Decoder (Simple)
The node that turns Flux latents into actual transparent PNGs
- transparent_vae
- samples
- transparent_image
This is the payoff node of the pack's whole Flux transparency system. You've generated latents with a normal KSampler; this decodes them through the special TransparentVAE and hands you an RGBA image with real alpha - hair strands, glass edges, smoke, all with genuine transparency rather than a cutout someone matted afterward. That's the entire pitch of LayerDiffusion, the technique lllyasviel's team published back in 2024: generate the alpha channel with the image instead of reconstructing it. What this pack does is bring that to Flux, which is exactly where the original tooling never went.
How it works
The decoder takes two inputs: a TRANSPARENT_VAE (from the pack's FluxLayerDiffuseStandaloneLoader, which loads TransparentVAE.pth) and your samples (LATENT) straight out of the KSampler. It moves both to the GPU, and the TransparentVAE's decode() does the VAE decode internally - including the latent-transparency offset that produces the alpha. Output is a transparent_image (IMAGE) that's already RGBA (BCHWβBHWC, clamped 0β1), ready for the pack's SaveTransparentImage or PreviewTransparentImage nodes.
The use_augmentation toggle (default on) switches the internal augmentation pass used during decode. Leave it on unless you're chasing a specific artifact; it's part of the RedAIGC-derived pipeline this pack is ported from.
Wiring it in
The README's quick workflow is the ground truth:
UNETLoader (Flux) + LoraLoader (layerlora.safetensors, strength 1.0)
β CLIPTextEncode (DualCLIPLoader type="flux")
β EmptySD3LatentImage + KSampler
β FluxLayerDiffuseStandaloneLoader β FluxLayerDiffuseDecoderSimple
β SaveTransparentImage / PreviewTransparentImage
Note the loader connection: the vae output of the standalone loader feeds the decoder's transparent_vae input. The old workflows used to pass a VAE straight in - the code accepts it for backward compatibility but prints a warning telling you to route it through the loader instead.
Inputs and outputs
transparent_vae(TRANSPARENT_VAE, required) - fromFluxLayerDiffuseStandaloneLoader.samples(LATENT, required) - your KSampler output.use_augmentation(BOOLEAN, default true).
Output: transparent_image (IMAGE) β Save Transparent Image (the standard Save Image node will flatten the alpha and you'll lose your transparency - that's the classic trap), or Preview Transparent Image.
The honest caveats
The whole LayerDiffusion story is "great quality, fragile tooling." Upstream maintained tooling stalled at SDXL in 2024β2025, and this Flux port is a small author's own integration - expect to debug. The README names the two classic failure modes: tensor/CLIP errors (fix with type="flux" CLIP and the Conditioning Inspector or Conditioning Fix node) and the "glass" look where everything comes out translucent (drop the LoRA strength to 0.5β0.8). And you need the models before any of this runs: flux1-dev-fp8.safetensors, layerlora.safetensors, TransparentVAE.pth, plus CLIP and VAE files. The pack's FluxLayerDiffuseInfo node's setup guide lists them.
Install
ComfyUI Manager β "DenRakEiw Nodes", or git clone https://github.com/DenRakEiw/DenRakEiw_Nodes, then pip install -r requirements.txt (brings diffusers, transformers, peft) and restart.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| transparent_vae | TRANSPARENT_VAE | β | |
| samples | LATENT | β | |
| use_augmentation | BOOLEAN | true | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| transparent_image | IMAGE | β |