Fibo-Edit-RMBG:由 Fibo-Edit 驱动的专业背景移除工具
这是 Fibo-Edit 的一个微调版本,专门用于高质量的背景移除。基于 Fibo 的基础构建,Fibo-Edit-RMBG 在处理复杂前景、保留精细细节以及应对具有挑战性的图像类型方面表现出色。
Fibo-Edit-RMBG 是 Fibo-Edit 模型的一个专门微调版本,专门针对背景移除任务进行了优化。Fibo-Edit-RMBG 利用强大的 Fibo-Edit 架构,提供了最先进的结果。
📄 技术报告即将发布。 有关架构详情,请参见 FIBO 和 Fibo-Edit。
源代码与权重
安装所需的依赖项:
pip install diffusers transformers accelerate torch pillowimport 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")推荐的推理参数:
如果您对本仓库有任何疑问、想分享反馈或直接参与贡献,欢迎在 GitHub 上提交 issue 和 pull request。您的贡献将帮助 Fibo-Edit-RMBG 不断完善,造福更多用户。
如果您热衷于基础研究,我们正在招聘全职员工(FTE)和研究实习生。请随时通过 hr@bria.ai 与我们联系。
@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}
}❤️ 请在 Hugging Face 上为 Fibo-Edit-RMBG 点亮星标,并在 GitHub 上为 Bria AI 点亮星标,共同加入负责任的生成式 AI 行动!