CoolFace
Modelpublic

fal/flux-2-klein-4B-background-remove-lora

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
27likes
Model Card

<Gallery />

<div align="center">

✂️ Flux Background Remove LoRA

Remove backgrounds and isolate subjects with AI

![Try on fal.ai](https://fal.ai/models/fal-ai/flux-2/klein/4b/base/edit/lora) ![License](https://opensource.org/licenses/Apache-2.0)

<img src="images/banner.jpg" alt="Background Remove LoRA Banner" width="100%">

</div>


🎯 What does this model do?

This LoRA removes the background from images and isolates the main subject. Simply provide an image, and the model will extract the subject with a clean background removal.

┌─────────────────────────────────────┐
│  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  │
│  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  │  Background
│  ░░░░░░░░░ [Subject] ░░░░░░░░░░░░░  │  gets removed
│  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  │  cleanly
│  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░  │
└─────────────────────────────────────┘

Perfect for product photography, subject isolation, and creative compositions.


🖼️ Examples

<table> <tr> <th>Input</th> <th>Output (background removed)</th> </tr> <tr> <td><img src="examples/example1input.jpg" width="300"></td> <td><img src="examples/example1output.jpg" width="300"></td> </tr> <tr> <td><img src="examples/example2input.jpg" width="300"></td> <td><img src="examples/example2output.jpg" width="300"></td> </tr> <tr> <td><img src="examples/example3input.jpg" width="300"></td> <td><img src="examples/example3output.jpg" width="300"></td> </tr> <tr> <td><img src="examples/example4input.jpg" width="300"></td> <td><img src="examples/example4output.jpg" width="300"></td> </tr> </table>


🚀 Quick Start

Prompt

Remove the background from the image

💻 Usage

Try it Live on fal.ai

▶️ [Open Playground](https://fal.ai/models/fal-ai/flux-2/klein/4b/base/edit/lora)

With fal.ai SDK

python
import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/flux-2/klein/4b/base/edit/lora",
    arguments={
        "prompt": "Remove the background from the image",
        "model_name": None,
        "loras": [{
            "path": "https://huggingface.co/fal/flux-2-klein-4B-background-remove-lora/resolve/main/flux-background-remove-lora.safetensors",
            "scale": 1.1
        }],
        "embeddings": [],
        "image_urls": ["https://your-image.png"]
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

📦 Model Files

FileUse Case
flux-background-remove-lora.safetensorsfal.ai
sQn8ANj2lbtrfeemXQta0_pytorch_lora_weights_comfy_converted.safetensorsComfyUI

🎓 Training Details

<details> <summary>Click to expand</summary>

Dataset

  • Size: 100 image pairs
  • Content: Diverse subjects with background removal including:
  • People: portraits, full body shots
  • Products: electronics, furniture, accessories
  • Animals: pets, wildlife
  • Objects: vehicles, art pieces, everyday items
  • Output: Clean subject isolation
  • Aspect ratios: Various (1:1, 16:9, 9:16, 4:3, 3:4, etc.)

Training

  • Base Model: FLUX.2-Klein 4B
  • Platform: fal.ai
  • Method: LoRA training
  • Steps: 4000
  • Learning Rate: 0.00005

</details>


🎮 Use Cases

  • Product Photography: Isolate products for e-commerce listings
  • Portrait Editing: Remove backgrounds from portraits
  • Creative Compositing: Extract subjects for new compositions
  • Marketing Materials: Create clean cutouts for designs

⚠️ Limitations

  • Works best with clear subject-background separation
  • Complex subjects with fine details (hair, fur) may have artifacts at edges
  • Semi-transparent objects may not be perfectly isolated

📄 License

Apache 2.0


<div align="center">

Created by @ilkerzgi • Trained with fal.ai

![Try on fal.ai](https://fal.ai/models/fal-ai/flux-2/klein/4b/base/edit/lora)

</div>