File size: 6,340 Bytes
cffc7d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7ade5b0
cffc7d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0e3f587
cffc7d8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7ade5b0
cffc7d8
0e3f587
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
---
license: apache-2.0
language:
- en
tags:
- flux
- flux-2-klein
- flux-lora
- lora
- object-removal
- inpainting
- image-editing
- image-to-image
- fal-ai
- template:diffusion-lora
pipeline_tag: image-to-image
widget:
- text: Remove the highlighted object from the scene
  output:
    url: examples/example1_output.jpg
- src: examples/example1_input.jpg
  prompt: Remove the highlighted object from the scene
  output:
    url: examples/example1_output.jpg
- text: Remove the highlighted object from the scene
  output:
    url: examples/example2_output.jpg
- src: examples/example2_input.jpg
  prompt: Remove the highlighted object from the scene
  output:
    url: examples/example2_output.jpg
- text: Remove the highlighted object from the scene
  output:
    url: examples/example3_output.jpg
- src: examples/example3_input.jpg
  prompt: Remove the highlighted object from the scene
  output:
    url: examples/example3_output.jpg
- text: Remove the highlighted object from the scene
  output:
    url: examples/example4_output.jpg
- src: examples/example4_input.jpg
  prompt: Remove the highlighted object from the scene
  output:
    url: examples/example4_output.jpg
base_model: black-forest-labs/FLUX.2-klein-4B
instance_prompt: Remove the highlighted object from the scene
---

<Gallery />

<div align="center">

# ๐Ÿ—‘๏ธ Flux Object Removal LoRA

### Remove unwanted objects from images with AI-powered inpainting

[![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="Object Removal LoRA Banner" width="100%">

</div>

---

## ๐ŸŽฏ What does this model do?

This LoRA removes **highlighted objects** from images and fills the area naturally with contextually appropriate content. Simply mark the object you want to remove, and the model will erase it seamlessly.
```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                     โ”‚
โ”‚     ๐Ÿ   ๐ŸŒณ  [๐Ÿš—]  ๐ŸŒณ  ๐Ÿ             โ”‚  Highlighted object
โ”‚         โ†“                           โ”‚  gets removed
โ”‚     ๐Ÿ   ๐ŸŒณ  ~~~~  ๐ŸŒณ  ๐Ÿ             โ”‚  and filled naturally
โ”‚                                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

Perfect for **cleaning up photos**, **removing distractions**, and **creating seamless backgrounds**.

---

## ๐Ÿ–ผ๏ธ Examples

<table>
<tr>
<th>Input (with highlighted object)</th>
<th>Output (object 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 highlighted object from the scene
```

### Highlighting Requirements
- Mark the object to remove with a visible highlight/mask
- The highlight should clearly cover the object boundaries
- Works best with distinct, isolated objects

---

## ๐Ÿ’ป 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 highlighted object from the scene",
        "model_name": None,
        "loras": [{
            "path": "https://huggingface.co/ilkerzgi/flux-object-remove-lora/resolve/main/flux-object-remove-lora.safetensors",
            "scale": 1.1
        }],
        "embeddings": [],
        "image_urls": ["https://your-image-with-highlighted-object.png"]
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)
```

---

## ๐Ÿ“ฆ Model Files

| File | Use Case |
|------|----------|
| `flux-object-remove-lora.safetensors` | fal.ai |
| `kDEkt5q7tDLKOpQJIVMPx_pytorch_lora_weights_comfy_converted.safetensors` | ComfyUI |

---

## ๐ŸŽ“ Training Details

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

### Dataset
- **Size**: 100 image pairs
- **Content**: Diverse scenes with objects to remove including:
  - **People**: individuals, groups in various settings
  - **Objects**: furniture, vehicles, electronics
  - **Animals**: pets, wildlife
  - **Text**: signs, watermarks, logos
  - **Nature**: plants, debris, unwanted elements
- **Highlighting**: Objects marked for removal
- **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

- **Photo Cleanup**: Remove photobombers, trash, or unwanted objects
- **Product Photography**: Clean backgrounds for e-commerce
- **Real Estate**: Remove furniture or personal items from property photos
- **Social Media**: Create cleaner, more focused compositions

---

## โš ๏ธ Limitations

- Works best with clearly highlighted/masked objects
- Very large objects may leave visible artifacts
- Complex backgrounds may require multiple passes
- Reflections and shadows of removed objects may persist

---

## ๐Ÿ“„ 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>