• Verify model integrity by checking SHA256 hash

    Parameters

    • modelName: string

      Name of the model file

    • modelData: ArrayBuffer

      Model data as ArrayBuffer

    Returns Promise<boolean>

    Promise - True if hash matches, false otherwise

    Example

    const isValid = await verifyModelIntegrity('u2net.onnx', modelData);
    if (!isValid) {
    console.warn('Model integrity check failed');
    }