✨ FLUX 3 Image Klein – Native 4-Channel RGBA Transparency Suite (Text-to-RGBA & Foreground Extraction LoRAs)

Text-to-RGBA Showcase Banner Foreground Extraction Showcase Banner

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:

  1. 🎨 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).
  2. βœ‚οΈ 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!

πŸ“¦ Files Included in This Repository

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

πŸ”§ Required ComfyUI Custom Nodes

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

Included Nodes:

  • πŸ”§ 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.

🎨 LoRA 1: Text-to-Transparent-Image (flux3_klein_transparent_lora.safetensors)

Elven Sorceress (Translucent Silk) Steampunk Mechanical Owl Cute Astronaut Red Panda 3D Glossy Toy Robot
Elven Sorceress Steampunk Owl Red Panda Toy Robot

⚑ Trigger Words & Prompting (Text-to-RGBA)

Include the trigger phrase at the start or end of your prompt:

  • RGBA transparent background, isolated foreground object (recommended)
  • transparent background
RGBA 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.

βœ‚οΈ LoRA 2: Foreground Extraction & Matting (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).

πŸ’¬ Prompting Guide (Foreground Extraction)

  1. Automatic Main Subject Extraction (Generic):
    Extract the main foreground subject, RGBA transparent background, isolated foreground object
    
  2. Targeted Subject Isolation from Multi-Object Scenes (Prompt-Guided):
    Extract foreground object, RGBA transparent background: a steampunk mechanical owl with brass clockwork wings
    

βš™οΈ Recommended ComfyUI Settings

Works with both the fast 8-step distilled/quantized FLUX 3 Image Klein models and the undistilled Base model:

1. Fast Distilled / Quantized (flux3-image-klein-bf16 / flux3-image-klein-int8-convrot)

  • LoRA Strength: 0.95 – 1.00
  • Steps: 8
  • CFG: 1.0
  • Sampler / Scheduler: euler / simple

2. Undistilled Base Model (flux3-image-klein-base-bf16)

  • LoRA Strength: 1.00
  • Steps: 20
  • CFG: 3.5
  • Sampler / Scheduler: euler / simple

πŸ§ͺ Included VAEs & Experimental Post-Training Notes

Ultra RGBA & RGB VAE Suite Banner

  1. vae/flux3_ultra_rgba_vae.safetensors (Recommended for 4-Channel RGBA Generation & Extraction):
    • Post-trained on top of 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.
    • Reduces hidden-background color bleed by -55% and improves foreground RGB PSNR from 32.74 dB to 39.29 dB while keeping the encoder 100% frozen (drop-in compatible with both RGBA LoRAs).
  2. vae/flux3_ultra_rgb_vae.safetensors (Experimental 3-Channel RGB Decoder Fine-Tune):
    • An experimental 3-channel decoder post-training study inspired by UltraFlux (arXiv:2511.18050), initialized 100% from native 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.
    • What to expect realistically: Because FLUX 2/3's native 32-channel (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.

πŸ™ Credits, Attribution & License

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Papers for DenRakEiw/FLUX3-Image-Klein-Native-RGBA-Transparent-LoRA