This release provides **two specialized, post-trained AutoencoderKLFlux2 VAEs** for **FLUX 3 Image Klein (5.6B)** and **FLUX.2** in ComfyUI, inspired by [Teaching a FLUX.2 VAE to See Transparency trmz/flux2-klein-alpha)](https://tr-mz.github.io/papers/flux2-klein-alpha/) and [UltraFlux arXiv:2511.18050)](https://arxiv.org/abs/2511.18050).
Both VAEs keep their **Encoder and 128-channel packed latent space 100% frozen**, making them **100% drop-in compatible** with existing models, LoRAs, and seeds without altering composition.
---
## 📦 Which Version Should I Download?
| Version / File | Channels | Best Used For | Key Characteristics |
| :--- | :---: | :--- | :--- |
| *flux3_ultra_rgba_vae.safetensors** (Recommended for RGBA) | **4-Channel RGBA)** | Native transparent PNG generation & foreground extraction with the **FLUX 3 RGBA Transparent & Extract LoRAs** | **+6.55 dB** Foreground RGB PSNR 32.74 $\rightarrow$ 39.29 dB), **+3.42 dB** Alpha PSNR, and **-55% less hidden background color bleed** on fine hair, fur, and semi-transparent glass/wings. |
| *flux3_ultra_rgb_vae.safetensors** (Experimental Study) | **3-Channel RGB)** | Standard **FLUX 3 Image Klein** photography workflows (via vanilla ComfyUI Load VAE) | **Experimental decoder fine-tune** initialized 100% from native ae_flux_3.safetensors. Uses Phase-Coherent YCbCr Luminance-Wavelet distillation on 2K DSLR DIV2K) & editorial Vogue Runway) photos. Delivers **subtle micro-detail refinement** ~+16–20% Laplacian micro-contrast on 1–2 px pores/hair at 100–200% zoom) with **0.00% color shift**. |
---
## 🧪 Honest Technical Notes & What to Expect
### 1. flux3_ultra_rgba_vae.safetensors (4-Channel RGBA Transparency VAE)
Built on top of **[trmz/flux2-klein-alpha](https://huggingface.co/trmz/flux2-klein-alpha/tree/main/vae)** and post-trained on **1,500 multi-layer RGBA matting assets** MULAN + LayerDecomp + high-res photography) using:
* **Visibility-Weighted Premultiplied Reconstruction:** Prioritizes color accuracy on visible and semi-transparent foreground pixels ($\alpha > 0$) so foreground colors never look washed out.
* **Hidden-Background Suppression ($\alpha < 0.01 \rightarrow \text{RGB}=0$):** Cuts invisible background RGB residue in half -55%), preventing dark/colored halos around fine hair strands and translucent edges.
* **2D Haar Wavelet & Sobel Alpha-Edge Loss:** Sharpens high-frequency alpha transitions 39.95 dB $\rightarrow$ 43.37 dB Alpha PSNR).
### 2. flux3_ultra_rgb_vae.safetensors (Experimental 3-Channel RGB Photo VAE)
> **⚠️ Realistic Expectations (No Hype):**
> Unlike older 4-channel SD1.5/SDXL VAEs, Black Forest Labs' native 32-channel 128 packed) ae_flux_3.safetensors flux2-vae) is already near the theoretical reconstruction limit. Because the encoder must remain frozen to stay compatible with the diffusion model, **the visual difference between ae_flux_3.safetensors and flux3_ultra_rgb_vae.safetensors is very subtle at normal viewing distance.**
* **Why separated it from the RGBA VAE:** In trmz's 4-channel RGBA VAE, the encoder's quant_conv weights were shifted by +16% to accommodate the alpha channel. Using an RGBA-derived decoder on standard FLUX 3 latents causes a slight magenta shadow cast. Therefore, flux3_ultra_rgb_vae.safetensors was initialized **100% from native ae_flux_3.safetensors** 0.00% color shift).
* **How it was trained:** Only the final full-resolution decoding stage decoder.up.3, norm_out, conv_out) was fine-tuned on uncompressed 2K/4k DSLR reference photos DIV2K_train_HR) and fashion photography Vogue Runway — zero cartoons/illustrations) using **Phase-Coherent YCbCr Luminance-Wavelet Distillation**.
* **Where you can spot the difference:** When comparing 2K–4K 2736×1536 / 3856×2176) portrait renders at **100%–200% zoom** in an Image Compare slider, 1–2 px luminance micro-textures (skin pores, peach fuzz, beard hairs, eyelashes, glitter) show ~+16–20% higher Laplacian acutance while colors, skin tones, and shadows remain 100% identical to ae_flux_3.
---
## 🛠️ Installation & Usage in ComfyUI
1. Place the .safetensors file(s) into:
```text
ComfyUI/models/vae/
