ISNet General Use β€” Weight-only QDQ (INT8)

INT8 quantized version of imgly/isnet-general-onnx using weight-only QDQ format.

Model Details

Variant Size Dtype WebGPU
Original (fp32) 168 MB fp32 βœ…
This version (QDQ) 42 MB int8 (weight-only) βœ…

Why weight-only QDQ?

Standard QDQ quantization quantizes both weights and activations, causing accuracy loss (faded colors). Weight-only QDQ only quantizes Conv weights while keeping activations in fp32 β€” preserving output quality identical to the fp32 model while achieving 75% size reduction and full WebGPU support.

Usage with Transformers.js

import { pipeline } from '@huggingface/transformers';

const segmenter = await pipeline('background-removal', 'xrds/isnet-general-onnx-int8', {
    device: 'webgpu',
    dtype: 'q8',
});
const result = await segmenter('image.jpg');

Convert your own model

Use the included convert_weight_only_qdq.py to convert any Conv-based ONNX model to weight-only QDQ:

pip install onnx onnxruntime numpy

# Convert fp32 model β†’ weight-only QDQ
python convert_weight_only_qdq.py --input model.onnx --output model-qdq.onnx

# Or with defaults (uses isnet-general-use.onnx β†’ isnet-general-use-weight-only-qdq.onnx)
python convert_weight_only_qdq.py

The script quantizes only Conv weights to int8 (per-tensor symmetric), leaving activations in fp32. Output is a standard QDQ-format ONNX model compatible with WebGPU execution providers.

License

MIT β€” same as the original imgly/isnet-general-onnx model.

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

Model tree for xrds/isnet-general-onnx-int8

Quantized
(1)
this model