Extract subjects from existing RGB images directly into **true 4-channel RGBA PNGs with native alpha transparency** using **FLUX 3 Image Klein (5.6B)**!
Unlike traditional segmentation masks rembg, BiRefNet) that only slice an existing image with a 2D mask, this LoRA leverages FLUX 3's native ReferenceLatent image_cond) conditioning together with a **4-channel RGBA VAE flux2-klein-alpha-vae)** to reconstruct clean, uncontaminated foreground edges, hair strands, glass, and semi-transparent details directly in latent space.
---
### ✨ Key Features
- **Native 4-Channel RGBA Extraction:** Generates premultiplied RGBA latents decoded directly into 4-channel RGBA images [B, H, W, 4]).
- **Prompt-Guided or Automatic Matting:** Extract the main subject automatically or specify via text prompt which exact object/character in the scene you want isolated.
- **Clean Edges & Semi-Transparency:** Eliminates background color spill/halos on hair, fur, glowing effects, and translucent surfaces.
- **Native ComfyUI Integration:** Works seamlessly with ComfyUI's built-in ReferenceLatent node and DenRakEiw_Nodes](https://github.com/DenRakEiw/DenRakEiw_Nodes).
---
### ⚙️ Recommended Settings
- **Base Model:** flux-3-image-klein.safetensors (FLUX 3 Image Klein 5.6B)
- **Text Encoder:** qwen_3_5_4b.safetensors (CLIPLoader type: flux3)
- **LoRA File:** flux3_klein_extract_lora.safetensors
- **LoRA Strength:** 1.0
- **Conditioning Setup:** Encode your input image with Flux 2/3 RGBA VAE Encode and attach it to the positive conditioning via ComfyUI's ReferenceLatent node.
- **Sampler / Scheduler:** euler / simple
- **Steps:** 20
- **CFG:** 3.5 (via FluxGuidance)
- **Resolution:** 1024x1024 (or matching your input aspect ratio)
---
### 💬 Prompting Guide
**1. Automatic Main Subject Extraction (Generic):**
> Extract the main foreground subject, RGBA transparent background, isolated foreground object
**2. Targeted Subject Extraction (Specific):**
> Extract foreground object, RGBA transparent background: a cute anime girl with silver hair and headphones
> Extract foreground object, RGBA transparent background: a glowing crystal potion bottle with golden Cork
---
### 🧩 Required Custom Nodes & RGBA VAE
1. **Custom Nodes ([DenRakEiw_Nodes](https://github.com/DenRakEiw/DenRakEiw_Nodes)):**
- Load Flux 2/3 RGBA VAE (4-Ch Alpha)
- Flux 2/3 RGBA VAE Encode (4-Ch Alpha)
- Flux 2/3 RGBA VAE Decode (4-Ch Alpha)
- Save Transparent PNG (RGBA)
- Ready-to-run workflow included in the repo: workflows/Flux3_Klein_Extract_RGBA.json
2. **4-Channel RGBA VAE flux2_klein_alpha_vae.safetensors):**
- Place in ComfyUI/models/vae/
- Available on Hugging Face: [DenRakEiw/FLUX3-Image-Klein-Native-RGBA-Transparent-LoRA](https://huggingface.co/DenRakEiw/FLUX3-Image-Klein-Native-RGBA-Transparent-LoRA) or [trmz/flux2-klein-alpha](https://huggingface.co/trmz/flux2-klein-alpha)
---
### 🔗 Related Models & Credits
- **Text-to-RGBA Generation LoRA:** Check out the companion **FLUX 3 Image Klein Native RGBA Text-to-Transparent LoRA** for generating brand-new transparent assets from scratch!
- **Credits:** Inspired by the research [Teaching a FLUX.2 VAE to See Transparency](https://tr-mz.github.io/papers/flux2-klein-alpha/) by trmz. Adapted and trained for **FLUX 3 Image Klein (5.6B)** by **DenRakEiw**.

