diff --git a/README.md b/README.md index ddf4dd1b..ef3da7cd 100644 --- a/README.md +++ b/README.md @@ -286,17 +286,21 @@ Log into the HuggingFace CLI: # on linux: > huggingface-cli login -# on windows: +# on Windows: > huggingface-cli.exe login ``` Issue an API token from https://huggingface.co/settings/tokens, naming it something memorable like `onnx-web`, and then paste it into the prompt. -Run the provided conversion script from the `api/` directory: +Running the launch script from the `api/` directory will convert the base models before starting the API server: ```shell -> python -m onnx_web.convert --diffusion --correction --upscaling +# on Linux: +> ./launch.sh + +# on Windows: +> launch.bat ``` Models that have already been downloaded and converted will be skipped, so it should be safe to run this script after @@ -336,13 +340,16 @@ launch script: ```shell # on Linux: > export ONNX_WEB_EXTRA_MODELS="/home/ssube/onnx-web-extras.json" -> ./launch.sh +> ./launch-extras.sh # on Windows: > set ONNX_WEB_EXTRA_MODELS=C:\Users\ssube\onnx-web-extras.json -> launch.bat +> launch-extras.bat ``` +Make sure to use the `launch-extras.sh` or `.bat` script if you want to convert the extra models, especially if you +have added your own. + ### Test the models You should verify that all of the steps up to this point have worked correctly by attempting to run the diff --git a/docs/user-guide.md b/docs/user-guide.md index ff4ea431..86518d01 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -207,14 +207,17 @@ Models can be added from the directories used by `diffusers` as well as SafeTens loading PickleTensors, as they may contain unsafe code which can be executed on your machine, and use SafeTensor instead whenever possible. -Set the `ONNX_WEB_EXTRA_MODELS` environment variable to the path to your file. For example: +Set the `ONNX_WEB_EXTRA_MODELS` environment variable to the path to your file and make sure to use the `launch-extras` +script. For example: ```shell # on Linux: > export ONNX_WEB_EXTRA_MODELS=~/onnx-web-extras.json +> ./launch-extras.sh # on Windows: > set ONNX_WEB_EXTRA_MODELS=C:\Users\ssube\onnx-web-extras.json +> launch-extras.bat ``` Extras using the older file format with nested arrays (`"diffusion": [[]]`) can be mixed with the newer format. You