Instructions to use square-zero-labs/modnet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use square-zero-labs/modnet with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-segmentation', 'square-zero-labs/modnet');
Download quantize_config.json from square-zero-labs/modnet: direct link, hf CLI and curl.
- Browser
- Download file 718 Bytes
-
https://huggingface.co/square-zero-labs/modnet/resolve/main/quantize_config.json
- Command line
-
hf download hf://square-zero-labs/modnet/quantize_config.json
-
curl -L -o quantize_config.json https://huggingface.co/square-zero-labs/modnet/resolve/main/quantize_config.json
718 Bytes
| { | |
| "per_channel": false, | |
| "reduce_range": false, | |
| "per_model_config": { | |
| "model": { | |
| "op_types": [ | |
| "Sigmoid", | |
| "Constant", | |
| "Resize", | |
| "Gather", | |
| "MatMul", | |
| "Clip", | |
| "BatchNormalization", | |
| "Concat", | |
| "Conv", | |
| "GlobalAveragePool", | |
| "Expand", | |
| "Add", | |
| "Slice", | |
| "Shape", | |
| "Unsqueeze", | |
| "Reshape", | |
| "InstanceNormalization", | |
| "Relu", | |
| "Mul" | |
| ], | |
| "weight_type": "QUInt8" | |
| } | |
| } | |
| } |