--- 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 ---
# 🗑️ 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) Object Removal LoRA Banner
--- ## 🎯 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
Input (with highlighted object) Output (object removed)
--- ## 🚀 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
Click to expand ### 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
--- ## 🎮 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) ---
### 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)