UltraFlux: Data-Model Co-Design for High-quality Native 4K Text-to-Image Generation across Diverse Aspect Ratios
Paper β’ 2511.18050 β’ Published β’ 38
flux3_klein_transparent_lora.safetensors) flux3_klein_extract_lora.safetensors) Complete native 4-channel RGBA transparency suite for FLUX 3 Image Klein (5.6B) in ComfyUI β featuring two specialized LoRAs and a 4-channel RGBA AutoencoderKLFlux2 VAE:
flux3_klein_transparent_lora.safetensors (Text-to-Transparent-Image LoRA): Generate brand-new 32-bit RGBA PNG assets directly from text prompts with native alpha transparency (0.000 background alpha).flux3_klein_extract_lora.safetensors (Foreground-Extraction & Matting LoRA): Extract subjects from existing RGB images directly into clean 4-channel RGBA cutouts using FLUX 3's native ReferenceLatent (image_cond) conditioning β either automatically or guided by your text prompt!| File | Target Folder in ComfyUI | Description |
|---|---|---|
flux3_klein_transparent_lora.safetensors |
ComfyUI/models/loras/ |
Part 1: Rank-32 Text-to-Transparent-RGBA LoRA for FLUX 3 Image Klein (240 MB) |
flux3_klein_extract_lora.safetensors |
ComfyUI/models/loras/ |
Part 2: Foreground-Extraction & Matting RGBA LoRA using ReferenceLatent (87 MB) |
vae/flux2_3_rgba_vae.safetensors |
ComfyUI/models/vae/ |
Original 4-Channel RGBA AutoencoderKLFlux2 VAE by trmz/flux2-klein-alpha (320 MB) |
vae/flux3_ultra_rgba_vae.safetensors |
ComfyUI/models/vae/ |
Post-Trained 4-Channel RGBA VAE: Decoder fine-tuned for cleaner transparent edges, reduced hidden-background color bleed (-55%), and higher foreground PSNR (32.7 dB -> 39.3 dB) |
vae/flux3_ultra_rgb_vae.safetensors |
ComfyUI/models/vae/ |
Experimental 3-Channel RGB Photo VAE: Pure 3-channel ae_flux_3 decoder post-trained on 2K DSLR (DIV2K) & editorial (Vogue Runway) photography with phase-coherent YCbCr luminance-wavelet distillation (~+18% subtle micro-contrast on pores/hair, 0.00% color shift) |
workflows/Flux3_Klein_Transparent_RGBA.json |
Drag & drop into ComfyUI | Ready-to-run ComfyUI workflow for Text-to-RGBA Generation |
workflows/Flux3_Klein_Extract_RGBA.json |
Drag & drop into ComfyUI | Ready-to-run ComfyUI workflow for RGBA Foreground Extraction & Matting |
Because standard ComfyUI VAE nodes only encode/decode 3 channels (RGB), install DenRakEiw_Nodes to load, encode, and decode all 4 channels (RGBA):
cd ComfyUI/custom_nodes
git clone https://github.com/DenRakEiw/DenRakEiw_Nodes.git
π§ Flux 2/3 RGBA VAE Loader *DRE β Loads flux2_3_rgba_vae.safetensors with dropdown selection and optional auto-download.π Flux 2/3 RGBA VAE Decode *DRE β Decodes FLUX 2 / FLUX 3 128-channel latents into rgba_image ([B, H, W, 4]), rgb_image ([B, H, W, 3]), and alpha_mask (MASK).π₯ Flux 2/3 RGBA VAE Encode *DRE β Encodes RGB/RGBA images into 128-channel latents (used with ReferenceLatent for Foreground Extraction).ποΈ Preview Transparent Image β Live Checkerboard / White / Black background preview in ComfyUI.πΎ Save Transparent Image β Saves true 32-bit RGBA PNGs with intact alpha channel.π Transparent Image Info β Alpha statistics & grayscale alpha_preview output.flux3_klein_transparent_lora.safetensors)
| Elven Sorceress (Translucent Silk) | Steampunk Mechanical Owl | Cute Astronaut Red Panda | 3D Glossy Toy Robot |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Include the trigger phrase at the start or end of your prompt:
RGBA transparent background, isolated foreground object (recommended)transparent backgroundRGBA transparent background, isolated foreground object, an enchanting cute elven sorceress with pointed ears and emerald eyes, wearing a fitted white and gold silk dress with sheer translucent sleeves, glowing magical butterflies around her hands, long platinum hair, soft rim light, masterpiece character art, transparent background.
flux3_klein_extract_lora.safetensors)
Leverages FLUX 3's native ReferenceLatent (image_cond) stream to extract subjects from any input RGB image into a clean 4-channel RGBA PNG (workflows/Flux3_Klein_Extract_RGBA.json).
Extract the main foreground subject, RGBA transparent background, isolated foreground object
Extract foreground object, RGBA transparent background: a steampunk mechanical owl with brass clockwork wings
Works with both the fast 8-step distilled/quantized FLUX 3 Image Klein models and the undistilled Base model:
flux3-image-klein-bf16 / flux3-image-klein-int8-convrot)
0.95 β 1.0081.0euler / simpleflux3-image-klein-base-bf16)
1.00203.5euler / simplevae/flux3_ultra_rgba_vae.safetensors (Recommended for 4-Channel RGBA Generation & Extraction):trmz/flux2-klein-alpha using 1,500 multi-layer RGBA matting samples (MULAN + LayerDecomp) with visibility-weighted premultiplied reconstruction, hidden-background suppression ($\alpha < 0.01 \rightarrow \text{RGB}=0$), and 2D Haar wavelet alpha-edge refinement.vae/flux3_ultra_rgb_vae.safetensors (Experimental 3-Channel RGB Decoder Fine-Tune):ae_flux_3.safetensors (flux2-vae) and trained on uncompressed 2K DSLR (DIV2K) and editorial (Vogue Runway) photography using Phase-Coherent YCbCr Luminance-Wavelet distillation.128 packed) ae_flux_3 VAE is already very strong and the encoder/latent space remains 100% frozen, visual differences compared to ae_flux_3.safetensors are subtle / minimal at normal viewing distance (~+16β20% higher Laplacian micro-contrast on 1β2 px details like skin pores, fine hair, and fabric weave when zoomed in at 100β200% in 2K/4K renders, with 0.00% color shift). Provided as an open experiment for side-by-side testing in standard ComfyUI Load VAE workflows.vae/flux2_3_rgba_vae.safetensors):trmz) β trmz/flux2-klein-alpha (Hugging Face)vae/flux2_3_rgba_vae.safetensors is an unmodified mirror of trmz/flux2-klein-alpha/vae/diffusion_pytorch_model.safetensors renamed for one-click ComfyUI models/vae/ compatibility. Full credit for training the 4-channel RGBA VAE goes to trmz.flux3_klein_transparent_lora.safetensors & flux3_klein_extract_lora.safetensors) + ComfyUI custom nodes by DenRakEiw (DenRakEiw_Nodes).Apache-2.0