ORMBG β€” compact web build (44 MB)

A compact build of ORMBG (Open Remove Background Model, by schirrmacher) for fast in-browser background removal with Transformers.js / onnxruntime-web.

Used by the free Doetra Background Remover.

What changed vs. onnx-community/ormbg-ONNX

  • Graph upgraded from opset 11 to opset 17.
  • int8 per-channel weights (DequantizeLinear) for convolutions, fp16 for the remaining large tensors, fp32 compute β€” 44 MB instead of 176 MB. Mask difference vs. fp32: mean 0.2/255, 99.93%+ identical after thresholding.
  • Runs on WebGPU without shader-f16 support.

Usage

import { AutoModel, AutoProcessor } from '@huggingface/transformers'
const model = await AutoModel.from_pretrained('Saimon8420/ormbg-web', { dtype: 'fp32', device: 'webgpu' })
const processor = await AutoProcessor.from_pretrained('Saimon8420/ormbg-web')

Input pixel_values [1, 3, 1024, 1024] in [0, 1]; output alphas [1, 1, 1024, 1024] in [0, 1].

Credits & license

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Saimon8420/ormbg-web

Quantized
(1)
this model