ilkerzgi commited on
Commit
cffc7d8
·
verified ·
1 Parent(s): ac5ede9

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,14 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ examples/example1_input.jpg filter=lfs diff=lfs merge=lfs -text
37
+ examples/example1_output.jpg filter=lfs diff=lfs merge=lfs -text
38
+ examples/example2_input.jpg filter=lfs diff=lfs merge=lfs -text
39
+ examples/example2_output.jpg filter=lfs diff=lfs merge=lfs -text
40
+ examples/example3_input.jpg filter=lfs diff=lfs merge=lfs -text
41
+ examples/example3_output.jpg filter=lfs diff=lfs merge=lfs -text
42
+ examples/example4_input.jpg filter=lfs diff=lfs merge=lfs -text
43
+ examples/example4_output.jpg filter=lfs diff=lfs merge=lfs -text
44
+ images/banner.jpg filter=lfs diff=lfs merge=lfs -text
45
+ images/example_input.jpg filter=lfs diff=lfs merge=lfs -text
46
+ images/example_output.jpg filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,229 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - flux
7
+ - flux-2-klein
8
+ - flux-lora
9
+ - lora
10
+ - object-removal
11
+ - inpainting
12
+ - image-editing
13
+ - image-to-image
14
+ - fal-ai
15
+ - template:diffusion-lora
16
+ pipeline_tag: image-to-image
17
+ widget:
18
+ - text: Remove the highlighted object from the scene
19
+ output:
20
+ url: examples/example1_output.jpg
21
+ - src: examples/example1_input.jpg
22
+ prompt: Remove the highlighted object from the scene
23
+ output:
24
+ url: examples/example1_output.jpg
25
+ - text: Remove the highlighted object from the scene
26
+ output:
27
+ url: examples/example2_output.jpg
28
+ - src: examples/example2_input.jpg
29
+ prompt: Remove the highlighted object from the scene
30
+ output:
31
+ url: examples/example2_output.jpg
32
+ - text: Remove the highlighted object from the scene
33
+ output:
34
+ url: examples/example3_output.jpg
35
+ - src: examples/example3_input.jpg
36
+ prompt: Remove the highlighted object from the scene
37
+ output:
38
+ url: examples/example3_output.jpg
39
+ - text: Remove the highlighted object from the scene
40
+ output:
41
+ url: examples/example4_output.jpg
42
+ - src: examples/example4_input.jpg
43
+ prompt: Remove the highlighted object from the scene
44
+ output:
45
+ url: examples/example4_output.jpg
46
+ base_model: black-forest-labs/FLUX.2-klein-4B
47
+ instance_prompt: Remove the highlighted object from the scene
48
+ ---
49
+
50
+ <Gallery />
51
+
52
+ <div align="center">
53
+
54
+ # 🗑️ Flux Object Removal LoRA
55
+
56
+ ### Remove unwanted objects from images with AI-powered inpainting
57
+
58
+ [![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)
59
+ [![License](https://img.shields.io/badge/License-Apache_2.0-green?style=for-the-badge)](https://opensource.org/licenses/Apache-2.0)
60
+
61
+ <img src="images/banner.jpg" alt="Object Removal LoRA Banner" width="100%">
62
+
63
+ </div>
64
+
65
+ ---
66
+
67
+ ## 🎯 What does this model do?
68
+
69
+ 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.
70
+
71
+ ```
72
+ ┌─────────────────────────────────────┐
73
+ │ │
74
+ │ 🏠 🌳 [🚗] 🌳 🏠 │ Highlighted object
75
+ │ ↓ │ gets removed
76
+ │ 🏠 🌳 ~~~~ 🌳 🏠 │ and filled naturally
77
+ │ │
78
+ └─────────────────────────────────────┘
79
+ ```
80
+
81
+ Perfect for **cleaning up photos**, **removing distractions**, and **creating seamless backgrounds**.
82
+
83
+ ---
84
+
85
+ ## 🖼️ Examples
86
+
87
+ <table>
88
+ <tr>
89
+ <th>Input (with highlighted object)</th>
90
+ <th>Output (object removed)</th>
91
+ </tr>
92
+ <tr>
93
+ <td><img src="examples/example1_input.jpg" width="300"></td>
94
+ <td><img src="examples/example1_output.jpg" width="300"></td>
95
+ </tr>
96
+ <tr>
97
+ <td><img src="examples/example2_input.jpg" width="300"></td>
98
+ <td><img src="examples/example2_output.jpg" width="300"></td>
99
+ </tr>
100
+ <tr>
101
+ <td><img src="examples/example3_input.jpg" width="300"></td>
102
+ <td><img src="examples/example3_output.jpg" width="300"></td>
103
+ </tr>
104
+ <tr>
105
+ <td><img src="examples/example4_input.jpg" width="300"></td>
106
+ <td><img src="examples/example4_output.jpg" width="300"></td>
107
+ </tr>
108
+ </table>
109
+
110
+ ---
111
+
112
+ ## 🚀 Quick Start
113
+
114
+ ### Prompt
115
+
116
+ ```
117
+ Remove the highlighted object from the scene
118
+ ```
119
+
120
+ ### Highlighting Requirements
121
+ - Mark the object to remove with a visible highlight/mask
122
+ - The highlight should clearly cover the object boundaries
123
+ - Works best with distinct, isolated objects
124
+
125
+ ---
126
+
127
+ ## 💻 Usage
128
+
129
+ ### Try it Live on fal.ai
130
+
131
+ ▶️ **[Open Playground](https://fal.ai/models/fal-ai/flux-2-klein/4b/base/edit/lora)**
132
+
133
+ ### With fal.ai SDK
134
+
135
+ ```python
136
+ import fal_client
137
+
138
+ def on_queue_update(update):
139
+ if isinstance(update, fal_client.InProgress):
140
+ for log in update.logs:
141
+ print(log["message"])
142
+
143
+ result = fal_client.subscribe(
144
+ "fal-ai/flux-2-klein/4b/base/edit/lora",
145
+ arguments={
146
+ "prompt": "Remove the highlighted object from the scene",
147
+ "model_name": None,
148
+ "loras": [{
149
+ "path": "https://huggingface.co/ilkerzgi/flux-object-remove-lora/resolve/main/flux-object-remove-lora.safetensors",
150
+ "scale": 1.1
151
+ }],
152
+ "embeddings": [],
153
+ "image_urls": ["https://your-image-with-highlighted-object.png"]
154
+ },
155
+ with_logs=True,
156
+ on_queue_update=on_queue_update,
157
+ )
158
+ print(result)
159
+ ```
160
+
161
+ ---
162
+
163
+ ## 📦 Model Files
164
+
165
+ | File | Use Case |
166
+ |------|----------|
167
+ | `flux-object-remove-lora.safetensors` | fal.ai |
168
+
169
+ ---
170
+
171
+ ## 🎓 Training Details
172
+
173
+ <details>
174
+ <summary>Click to expand</summary>
175
+
176
+ ### Dataset
177
+ - **Size**: 100 image pairs
178
+ - **Content**: Diverse scenes with objects to remove including:
179
+ - **People**: individuals, groups in various settings
180
+ - **Objects**: furniture, vehicles, electronics
181
+ - **Animals**: pets, wildlife
182
+ - **Text**: signs, watermarks, logos
183
+ - **Nature**: plants, debris, unwanted elements
184
+ - **Highlighting**: Objects marked for removal
185
+ - **Aspect ratios**: Various (1:1, 16:9, 9:16, 4:3, 3:4, etc.)
186
+
187
+ ### Training
188
+ - **Base Model**: FLUX.2-Klein 4B
189
+ - **Platform**: [fal.ai](https://fal.ai)
190
+ - **Method**: LoRA training
191
+ - **Steps**: 4000
192
+ - **Learning Rate**: 0.00005
193
+
194
+ </details>
195
+
196
+ ---
197
+
198
+ ## 🎮 Use Cases
199
+
200
+ - **Photo Cleanup**: Remove photobombers, trash, or unwanted objects
201
+ - **Product Photography**: Clean backgrounds for e-commerce
202
+ - **Real Estate**: Remove furniture or personal items from property photos
203
+ - **Social Media**: Create cleaner, more focused compositions
204
+
205
+ ---
206
+
207
+ ## ⚠️ Limitations
208
+
209
+ - Works best with clearly highlighted/masked objects
210
+ - Very large objects may leave visible artifacts
211
+ - Complex backgrounds may require multiple passes
212
+ - Reflections and shadows of removed objects may persist
213
+
214
+ ---
215
+
216
+ ## 📄 License
217
+
218
+ [Apache 2.0](https://opensource.org/licenses/Apache-2.0)
219
+
220
+ ---
221
+
222
+ <div align="center">
223
+
224
+ ### Created by [@ilkerzgi](https://huggingface.co/ilkerzgi) • Trained with [fal.ai](https://fal.ai)
225
+
226
+
227
+ [![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)
228
+
229
+ </div>
examples/example1_input.jpg ADDED

Git LFS Details

  • SHA256: 025be226c7b37cdc27495e0f3f2cfdd26bb6024dbb4b414ffb3f35b11b07c4ea
  • Pointer size: 131 Bytes
  • Size of remote file: 239 kB
examples/example1_output.jpg ADDED

Git LFS Details

  • SHA256: ef2f130d107b3b0d2fd886eab9863fbfc6959a6d23db09c998aef4c176d4af4b
  • Pointer size: 131 Bytes
  • Size of remote file: 257 kB
examples/example2_input.jpg ADDED

Git LFS Details

  • SHA256: e3b00530bdfa29ffe4b682f79ed0b535f2e187a915cae3f3e466406ea9017f27
  • Pointer size: 131 Bytes
  • Size of remote file: 224 kB
examples/example2_output.jpg ADDED

Git LFS Details

  • SHA256: eae98fc8de14da2d2129ca28c8ba5af71eacd553d2208e5ab1c184d5b19a27d9
  • Pointer size: 131 Bytes
  • Size of remote file: 201 kB
examples/example3_input.jpg ADDED

Git LFS Details

  • SHA256: 00df13204e49fd349cdeed9a6454d2c0b733ea2e89af3f7352365c0a36fd68e2
  • Pointer size: 131 Bytes
  • Size of remote file: 200 kB
examples/example3_output.jpg ADDED

Git LFS Details

  • SHA256: e05758674b61fdc530d0369706d9e14fd8d74e622993cf94803adec27bfbfb8e
  • Pointer size: 131 Bytes
  • Size of remote file: 191 kB
examples/example4_input.jpg ADDED

Git LFS Details

  • SHA256: 11b3b46e5f1f534c82360c89d6566d32e3081605cbe49e5f9ecbf9ecff71a5a5
  • Pointer size: 131 Bytes
  • Size of remote file: 221 kB
examples/example4_output.jpg ADDED

Git LFS Details

  • SHA256: afcf5374d1b12907877653a08c1a2489efbc13371caa9a9577017f2b97c35f90
  • Pointer size: 131 Bytes
  • Size of remote file: 154 kB
flux-object-remove-lora.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70ceea34a8bcd6e7d0249ba26bb59a3cd8b8c38745fab65a3eb112a5c13e3c69
3
+ size 58441728
images/banner.jpg ADDED

Git LFS Details

  • SHA256: ef2f130d107b3b0d2fd886eab9863fbfc6959a6d23db09c998aef4c176d4af4b
  • Pointer size: 131 Bytes
  • Size of remote file: 257 kB
images/example_input.jpg ADDED

Git LFS Details

  • SHA256: 025be226c7b37cdc27495e0f3f2cfdd26bb6024dbb4b414ffb3f35b11b07c4ea
  • Pointer size: 131 Bytes
  • Size of remote file: 239 kB
images/example_output.jpg ADDED

Git LFS Details

  • SHA256: ef2f130d107b3b0d2fd886eab9863fbfc6959a6d23db09c998aef4c176d4af4b
  • Pointer size: 131 Bytes
  • Size of remote file: 257 kB