1
0
Fork 0

fix(docs): note launch-extras script

This commit is contained in:
Sean Sube 2023-02-13 23:21:56 -06:00
parent 4b1857883f
commit cc7cafabfd
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 16 additions and 6 deletions

View File

@ -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

View File

@ -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