Download scripts/build.sh from swiftail/BiRefNet_lite-onnx-coreml: direct link, hf CLI and curl.
- Browser
- Download file 638 Bytes
-
https://huggingface.co/swiftail/BiRefNet_lite-onnx-coreml/resolve/main/scripts/build.sh
- Command line
-
hf download hf://swiftail/BiRefNet_lite-onnx-coreml/scripts/build.sh
-
curl -L -o build.sh https://huggingface.co/swiftail/BiRefNet_lite-onnx-coreml/resolve/main/scripts/build.sh
638 Bytes
| # build.sh <hf_repo> <name> [size]: export dynamic at 512 -> fix to size -> ORT basic fold | |
| set -e; cd /tmp/mixer-bg-spike; S=${3:-1024} | |
| .venv/bin/python watchdog.py .venv/bin/python reexport/export.py "$1" models/$2_dyn.onnx ${TRACE:-512} 2>&1 | grep -E "exported|PEAK|Error|WATCHDOG" | |
| .venv/bin/python -m onnxruntime.tools.make_dynamic_shape_fixed --input_name input_image --input_shape 1,3,$S,$S models/$2_dyn.onnx models/$2_fixed.onnx | |
| .venv/bin/python watchdog.py .venv/bin/python ort_fold.py models/$2_fixed.onnx models/$2.onnx 2>&1 | tail -2 | |
| rm -f models/$2_fixed.onnx; ls -la models/$2.onnx; shasum -a 256 models/$2.onnx | |