Image-to-Image
Diffusers
Safetensors
English
BriaFiboEditPipeline
art
background-removal
image-segmentation
Instructions to use briaai/Fibo-Edit-RMBG with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use briaai/Fibo-Edit-RMBG with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("briaai/Fibo-Edit-RMBG", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| language: | |
| - en | |
| base_model: | |
| - briaai/Fibo-Edit | |
| pipeline_tag: image-to-image | |
| library_name: diffusers | |
| extra_gated_description: >- | |
| Bria AI Model weights are open source for non commercial use only, per the | |
| provided [license](https://creativecommons.org/licenses/by-nc/4.0/deed.en). | |
| extra_gated_heading: Fill in this form to immediately access the model for non commercial use | |
| extra_gated_fields: | |
| Name: text | |
| Email: text | |
| Company/Org name: text | |
| Company Website URL: text | |
| Discord user: text | |
| I agree to BRIA's Privacy policy, Terms & conditions, and acknowledge Non commercial use to be Personal use / Academy / Non profit (direct or indirect): checkbox | |
| license: other | |
| license_name: bria-fibo-edit | |
| license_link: https://creativecommons.org/licenses/by-nc/4.0/deed.en | |
| tags: | |
| - art | |
| - image-to-image | |
| - background-removal | |
| - image-segmentation | |
| <p align="center"> | |
| <img src="https://bria-public.s3.us-east-1.amazonaws.com/Bria-logo.svg" width="200"/> | |
| </p> | |
| <p align="center"> | |
| <a href="https://github.com/Bria-AI/" target="_blank"> | |
| <img | |
| alt="GitHub Repo" | |
| src="https://img.shields.io/badge/GitHub-Repo-181717?logo=github&logoColor=white&style=for-the-badge" | |
| /> | |
| </a> | |
| | |
| <a href="https://huggingface.co/spaces/briaai/Fibo-Edit" target="_blank"> | |
| <img | |
| alt="Hugging Face Demo" | |
| src="https://img.shields.io/badge/Hugging%20Face-Demo-FFD21E?logo=huggingface&logoColor=black&style=for-the-badge" | |
| /> | |
| </a> | |
| | |
| <a href="https://platform.bria.ai" target="_blank"> | |
| <img | |
| alt="Bria Platform" | |
| src="https://img.shields.io/badge/Bria-Platform-0EA5E9?style=for-the-badge" | |
| /> | |
| </a> | |
| | |
| <a href="https://discord.com/invite/Nxe9YW9zHS" target="_blank"> | |
| <img | |
| alt="Bria Discord" | |
| src="https://img.shields.io/badge/Discord-Join-5865F2?logo=discord&logoColor=white&style=for-the-badge" | |
| /> | |
| </a> | |
| </p> | |
| <p align="center"> | |
| <b>Fibo-Edit-RMBG: Professional Background Removal Powered by Fibo-Edit</b><br> | |
| A fine-tuned version of Fibo-Edit specialized for high-quality background removal. Built on Fibo's foundation, Fibo-Edit-RMBG excels at complex foregrounds, fine detail preservation, and challenging image types. | |
| <b></b> | |
| <br><br> | |
| </p> | |
| <h2>🌍 What's Fibo-Edit-RMBG?</h2> | |
| <p>Fibo-Edit-RMBG is a specialized fine-tuning of the Fibo-Edit model, optimized specifically for background removal tasks. Fibo-Edit-RMBG leverages the powerful Fibo-Edit architecture to deliver state-of-the-art results.</p> | |
| <p>📄 <i>Technical report coming soon.</i> For architecture details, see <a href="https://huggingface.co/briaai/FIBO">FIBO</a> and <a href="https://huggingface.co/briaai/Fibo-Edit">Fibo-Edit</a>.</p> | |
| <h2>🖼️ Visual Examples</h2> | |
| <div style="display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px;"> | |
| <img src="faucet_input.png" style="width: 100%;"/> | |
| <img src="faucet_output.png" style="width: 100%;"/> | |
| <img src="flowers_input.png" style="width: 100%;"/> | |
| <img src="flowers_output.png" style="width: 100%;"/> | |
| <img src="tennis_input.png" style="width: 100%;"/> | |
| <img src="tennis_output.png" style="width: 100%;"/> | |
| <img src="portrait_input.png" style="width: 100%;"/> | |
| <img src="portrait_output.png" style="width: 100%;"/> | |
| <img src="tools_input.png" style="width: 100%;"/> | |
| <img src="tools_output.png" style="width: 100%;"/> | |
| <img src="illustration_input.png" style="width: 100%;"/> | |
| <img src="illustration_output.png" style="width: 100%;"/> | |
| <img src="fathersday_input.png" style="width: 100%;"/> | |
| <img src="fathersday_output.png" style="width: 100%;"/> | |
| <img src="graphicdesign_input.png" style="width: 100%;"/> | |
| <img src="graphicdesign_output.png" style="width: 100%;"/> | |
| </div> | |
| <h2>🔑 Key Features</h2> | |
| <ul> | |
| <li><b>Fine-Structure Alpha Matting</b>: Produces clean, precise alpha mattes | |
| with accurate opacity estimation along high-frequency edge regions — including | |
| hair strands, netting, wire structures, and similarly intricate boundaries.</li> | |
| <li><b>Consistent Subject Masking</b>: Produces more complete and decisive | |
| masks across the full extent of the foreground subject, with fewer cases | |
| of regions being incorrectly split between foreground and background.</li> | |
| <li><b>Foreground-Background Separation in Low-Depth-Cue Scenes</b>: | |
| Better handles images where foreground boundaries are not well-defined by | |
| depth — such as flat illustrations, graphic compositions, | |
| and images with overlaid text.</li> | |
| </ul> | |
| <h2>⚡ Quick Start</h2> | |
| <p><b>Source-Code & Weights</b></p> | |
| <ul> | |
| <li>The model is open source for non-commercial use with <a href="https://creativecommons.org/licenses/by-nc/4.0/deed.en">this license</a> </li> | |
| <li>For commercial use <a href="https://bria.ai/contact-us?hsCtaAttrib=114250296256">Click here</a>.</li> | |
| </ul> | |
| <h2>Installation</h2> | |
| <p>Install the required dependencies:</p> | |
| <pre><code class="language-bash">pip install diffusers transformers accelerate torch pillow | |
| </code></pre> | |
| <h2>Usage</h2> | |
| <h3>Basic Background Removal</h3> | |
| ```python | |
| import torch | |
| from diffusers import BriaFiboEditPipeline | |
| from PIL import Image | |
| # Load the Fibo-Edit-RMBG model | |
| pipe = BriaFiboEditPipeline.from_pretrained( | |
| "briaai/Fibo-Edit-RMBG", | |
| torch_dtype=torch.bfloat16, | |
| ) | |
| pipe.to("cuda") | |
| # Load your image | |
| image = Image.open("photo.jpg").convert("RGB") | |
| # Generate foreground mask - no mask needed! | |
| mask = pipe( | |
| image=image, | |
| prompt = {'edit_instruction':'Generate a detailed grayscale alpha matte. Map the opaque foreground to white and the background to black. Produce soft, anti-aliased grayscale gradients at the edges of the subject to represent fine details and transparency.'}, | |
| num_inference_steps=10, | |
| guidance_scale=1.0 | |
| ).images[0] | |
| # Convert mask to grayscale and use as alpha channel | |
| alpha = mask.convert("L").resize(image.size) | |
| image.putalpha(alpha) | |
| # Save the result as RGBA image with transparent background | |
| image.save("output.png") | |
| ``` | |
| <h2>🎯 Use Cases</h2> | |
| <ul> | |
| <li><b>Hair & Fine-Structure Subjects</b>: Well-suited for images where | |
| accurate alpha matting along hair strands, fur, or similarly complex edges | |
| is critical to output quality.</li> | |
| <li><b>Illustrations & Graphic Compositions</b>: Handles non-photorealistic | |
| content where foreground-background boundaries are not clearly defined by depth.</li> | |
| <li><b>Graphic Design & Text Cutouts</b>: Produces strong foreground | |
| separation where text or typographic elements are the subject.</li> | |
| </ul> | |
| <h2>⚙️ Model Parameters</h2> | |
| <p>Recommended inference parameters:</p> | |
| <ul> | |
| <li><b>num_inference_steps</b>: 10 (balance between quality and speed)</li> | |
| <li><b>guidance_scale</b>: 1 (recommended for fast results)</li> | |
| <li><b>torch_dtype</b>: bfloat16 (for optimal memory usage and speed)</li> | |
| <li><b>seed</b>: Results vary across different seed values — we recommend experimenting with a few seeds to find the best output for your specific input.</li> | |
| </ul> | |
| <h2>🤝 Contributing</h2> | |
| <p>If you have questions about this repository, feedback to share, or want to contribute directly, we welcome your issues and pull requests on GitHub. Your contributions help make Fibo-Edit-RMBG better for everyone.</p> | |
| <p>If you're passionate about fundamental research, we're hiring full-time employees (FTEs) and research interns. Don't wait - reach out to us at [email protected]</p> | |
| ## Citation | |
| ```bibtex | |
| @article{gutflaish2025generating, | |
| title={Generating an Image From 1,000 Words: Enhancing Text-to-Image With Structured Captions}, | |
| author={Gutflaish, Eyal and Kachlon, Eliran and Zisman, Hezi and Hacham, Tal and Sarid, Nimrod and Visheratin, Alexander and Huberman, Saar and Davidi, Gal and Bukchin, Guy and Goldberg, Kfir and others}, | |
| journal={arXiv preprint arXiv:2511.06876}, | |
| year={2025} | |
| } | |
| ``` | |
| <p align="center"><b>❤️ Star Fibo-Edit-RMBG on Hugging Face and ⭐ Star Bria AI on GitHub to join the movement for responsible generative AI!</b></p> |