Instructions to use GeorgeGaoXY/RMBG-3.0-int8-turing with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use GeorgeGaoXY/RMBG-3.0-int8-turing 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("GeorgeGaoXY/RMBG-3.0-int8-turing", 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
Unofficial RMBG-3.0 INT8 (Turing / bitsandbytes)
Not an official Bria release. Community bitsandbytes INT8 dump of the Hugging Face / diffusers stack so RTX 20-series (Turing) can actually load RMBG-3.0.
This is not the same as ComfyUI int8_convrot (briaai/RMBG-3.0-Comfy) or FP8/NVFP4 (1038lab/RMBG-3.0). Those are Comfy single-file formats. This repo is transformers + diffusers + bitsandbytes (load_in_8bit saved with quantization_config).
License
- Upstream: briaai/RMBG-3.0, briaai/Fibo-2.0-edit-turbo
- Bria FIBO / CC-BY-NC-4.0 — non-commercial only. Accept Bria’s gated terms on the original repos.
- Credit: Bria AI. This dump is encoder+DiT INT8 plus original FP16 VAE / processor / scheduler / fonts.
- Do not use commercially.
Layout
| Path | Notes | Size |
|---|---|---|
transformer/ |
bitsandbytes INT8 DiT | 7.58 GB |
text_encoder/ |
INT8 Qwen3-VL | 4.50 GB |
vae/ |
FP16 FLUX.2 VAE | 0.31 GB |
processor/ scheduler/ fonts/ |
original Fibo 2.0 turbo | ~12 MB |
examples/ |
local test photo + mattes | |
staged_infer_int8.py |
encode → unload → 4-step |
Original 4-shard BF16 DiT (~15 GB) is not included.
Hardware that was actually used
- GPU: NVIDIA RTX 2080 Ti 22 GB (Turing, no BF16 tensor cores)
- System RAM: ~16 GB (live BF16 load pages heavily; saved INT8 is required)
- Torch: 2.6.0+cu118 in a dedicated venv (do not mix with older iopaint stacks)
Local test (cosplay, 682×1024)
Input: examples/input_cosplay.jpg. Instruction is the official RMBG-3.0 matte prompt. Seed 0, 4 steps, guidance_scale=1.0. Compare against site matting BiRefNet_dynamic-general-epoch_174.
| Setting | Internal size | 4-step time | Peak VRAM |
|---|---|---|---|
| Default ~1024² (1 MP) | 832×1248 | 21.6 s | 10.4 GiB |
| 1536² class | 1248×1872 | 71.9 s | 13.5 GiB |
Staged timings at 1024 class (cold load from saved INT8):
| Stage | Time | VRAM |
|---|---|---|
| Load INT8 encoder | 47.7 s | 4.6 GiB |
| Encode | 30.3 s | peak 5.1 GiB |
| Unload encoder | — | 8 MiB |
| Load INT8 DiT | 66.6 s | 7.9 GiB |
| 4-step + VAE | 21.6 s | peak 10.4 GiB |
JSON logs: examples/staged_infer_int8_1024.json, examples/staged_infer_int8_1536.json.
Input
BiRefNet (current production matting)
RMBG-3.0 INT8 @ 832×1248
RMBG-3.0 INT8 @ 1248×1872
On this photo INT8 RMBG keeps softer hair/fur than BiRefNet. The large prop still shows some holes; 1536 helps a bit, not a full fix. INT8 + 4-step turbo is not BF16-reference quality.
Load
quantization_config is already in the saved configs. Do not pass a second BitsAndBytesConfig.
import torch
from transformers import AutoModel as HFAutoModel, AutoProcessor
from diffusers import AutoModel, AutoencoderKLFlux2, FlowMatchEulerDiscreteScheduler
repo = "GeorgeGaoXY/RMBG-3.0-int8-turing"
processor = AutoProcessor.from_pretrained(repo, subfolder="processor")
text_encoder = HFAutoModel.from_pretrained(repo, subfolder="text_encoder", device_map="cuda").eval()
transformer = AutoModel.from_pretrained(repo, subfolder="transformer", device_map="cuda").eval()
vae = AutoencoderKLFlux2.from_pretrained(repo, subfolder="vae", torch_dtype=torch.float16)
scheduler = FlowMatchEulerDiscreteScheduler.from_pretrained(repo, subfolder="scheduler")
Weights are safetensors shards (*-00001-of-0000N.safetensors + *.safetensors.index.json). from_pretrained concatenates them; do not look for a single 8 GB file.
Wire into diffusers.BriaFibo2Pipeline. On Turing, cast K/V to query dtype before SDPA (see staged_infer_int8.py). Encoder INT8 ~4.6 GiB + DiT INT8 ~7.9 GiB can stay resident on 22 GB; 4-step activations were ~2.5 GiB extra at 1 MP.
中文摘要
面向 Turing(2080 Ti 22GB)的非官方 bitsandbytes INT8 整包:文本塔 + DiT 已量化落盘,VAE 仍为 FP16。官方 BF16 峰值约 28.5GB,本机分阶段 4 步约 10.4GB(832×1248)/ 13.5GB(1248×1872)。测试图为仓库 examples/ 中的 cosplay,发丝比 BiRefNet 软,大武器仍有破洞。许可证为 Bria 非商用 CC-BY-NC-4.0。
- Downloads last month
- -



