---
title: flux-2-klein-4B-background-remove-lora
canonical_url: "https://www.modelscope.cn/models/fal/flux-2-klein-4B-background-remove-lora"
md_url: "https://www.modelscope.cn/models/fal/flux-2-klein-4B-background-remove-lora.md"
repository: fal/flux-2-klein-4B-background-remove-lora
last_updated: 2026-06-16
license: apache-2.0
pipeline_tag: image-to-image
tasks:
  - image-to-image
base_model:
  - black-forest-labs/FLUX.2-klein-4B
base_model_relation: adapter
parameters: 38.0M
tensor_type:
  - F32
library_name:
  - lora
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - en
supports_inference: img2img
downloads: 212
stars: 3
tags:
  - flux
  - flux-2-klein
  - flux-lora
  - lora
  - background-removal
  - subject-isolation
  - image-editing
  - image-to-image
  - fal-ai
  - "template:diffusion-lora"
---

# flux-2-klein-4B-background-remove-lora

> flux-2-klein-4B-background-remove-lora - fal 在 ModelScope 开源的模型。✂️ Flux Background Remove LoRA

fal/flux-2-klein-4B-background-remove-lora 是 ModelScope 魔搭社区上的 38.0M 参数image-to-image模型，采用 apache-2.0 许可，基于 black-forest-labs/FLUX.2-klein-4B 构建，并支持在线推理（img2img）。

- **Repository**: fal/flux-2-klein-4B-background-remove-lora
- **License**: apache-2.0
- **Tasks**: image-to-image
- **Parameters**: 38.0M
- **Base model**: black-forest-labs/FLUX.2-klein-4B
- **Online inference**: img2img
- **Tags**: flux, flux-2-klein, flux-lora, lora, background-removal, subject-isolation, image-editing, image-to-image, fal-ai, template:diffusion-lora
- **Downloads**: 212
- **Stars**: 3
- **Last updated**: 2026-06-16

Source: https://www.modelscope.cn/models/fal/flux-2-klein-4B-background-remove-lora

---

<Gallery />

<div align="center">

# ✂️ Flux Background Remove LoRA

### Remove backgrounds and isolate subjects with AI

[![Try on fal.ai](https://img.shields.io/badge/🚀_Try_it_Live-fal.ai-FF6B35?style=for-the-badge)](https://fal.ai/models/fal-ai/flux-2/klein/4b/base/edit/lora)
[![License](https://img.shields.io/badge/License-Apache_2.0-green?style=for-the-badge)](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/example1_input.jpg" width="300"></td>
<td><img src="examples/example1_output.jpg" width="300"></td>
</tr>
<tr>
<td><img src="examples/example2_input.jpg" width="300"></td>
<td><img src="examples/example2_output.jpg" width="300"></td>
</tr>
<tr>
<td><img src="examples/example3_input.jpg" width="300"></td>
<td><img src="examples/example3_output.jpg" width="300"></td>
</tr>
<tr>
<td><img src="examples/example4_input.jpg" width="300"></td>
<td><img src="examples/example4_output.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

| File | Use Case |
|------|----------|
| `flux-background-remove-lora.safetensors` | fal.ai |
| `sQn8ANj2lbtrfeemXQta0_pytorch_lora_weights_comfy_converted.safetensors` | ComfyUI |

---

## 🎓 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](https://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](https://opensource.org/licenses/Apache-2.0)

---

<div align="center">

### Created by [@ilkerzgi](https://huggingface.co/ilkerzgi) • Trained with [fal.ai](https://fal.ai)


[![Try on fal.ai](https://img.shields.io/badge/🚀_Try_it_Live-fal.ai-FF6B35?style=for-the-badge)](https://fal.ai/models/fal-ai/flux-2/klein/4b/base/edit/lora)

</div>
