From e60ee8ce1ca7107f93d2171cf578902220e04c0d Mon Sep 17 00:00:00 2001 From: Mirko Budszuhn Date: Wed, 12 Jun 2024 14:08:52 +0200 Subject: [PATCH] Readme: Reflect new way to download the models for self-hosting --- packages/web/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/web/README.md b/packages/web/README.md index 57aa679..61f6eac 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -117,12 +117,12 @@ The performance is largely dependent on the feature set available. Most prominen ### Custom Asset Serving -The wasm and onnx neural networks are hosted by IMG.LY by default. For production use, we advise you to host them yourself. Therefore, copy all .wasm and .onnx files to your public path `$PUBLIC_PATH` and reconfigure the library. +The wasm and onnx neural networks are hosted by IMG.LY by default. For production use, we advise you to host them yourself. +To do that: -```shell -npm i @imgly/background-removal-data -cp node_modules/@imgly/background-removal-data/dist/* $PUBLIC_PATH -``` +- Download the following package with the package version that matches your `@imgly/background-removal` version from the IMG.LY CDN and uncompress it. Note that you need to replace `YOUR_PACKAGE_VERSION` with the actual version of the package you are using. The URL is + `https://staticimgly.com/@imgly/background-removal-data/YOUR_PACKAGE_VERSION/package.tgz`. +- Move the content of the `package/dist` folder to be served by your web server. This often is the `/public` folder. ```typescript import imglyRemoveBackground, {Config} from "@imgly/background-removal"