Skip to content

Unload ONNX Model ​

Unload the specified ONNX model, terminate related processes and release system resources.

API Description ​

API Type ​

unloadOnnxModel

Parameters ​

ParameterTypeRequiredDescription
onnxidstringYesModel ID returned by loadOnnxModel

Return Value ​

No return value (void)

Basic Usage ​

javascript
// Load model first
const onnxid = await apiInvoke('loadOnnxModel', {
    file: 'C:\\models\\yolov8s.onnx'
});

// Use model for inference...
...

// Unload model after use
await apiInvoke('unloadOnnxModel', {
    onnxid: onnxid
});

console.log('Model unloaded');

Cooperation: try.catch@foxmail.com