• 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.

    Parameters

    • modelName: string

      Name of the model file

    Returns string | null

    Expected SHA256 hash or null if not available

    Example

    const hash = getModelHash('u2net.onnx');
    if (hash) {
    console.log(`Expected hash for u2net: ${hash}`);
    } else {
    console.log('No hash configured for this model');
    }