Get the expected SHA256 hash for a model.
Returns the pre-configured hash for a model if available, or null if no hash has been set for the model.
Name of the model file
Expected SHA256 hash or null if not available
const hash = getModelHash('u2net.onnx');if (hash) { console.log(`Expected hash for u2net: ${hash}`);} else { console.log('No hash configured for this model');} Copy
const hash = getModelHash('u2net.onnx');if (hash) { console.log(`Expected hash for u2net: ${hash}`);} else { console.log('No hash configured for this model');}
Get the expected SHA256 hash for a model.
Returns the pre-configured hash for a model if available, or null if no hash has been set for the model.