1
0
Fork 0

feat(api): add a way to pass extra args to the conversion script

This commit is contained in:
Sean Sube 2023-03-08 21:38:51 -06:00
parent 25c41c8d66
commit 35303c7d20
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
4 changed files with 19 additions and 4 deletions

View File

@ -1,6 +1,13 @@
echo "Downloading and converting models to ONNX format..."
IF "%ONNX_WEB_EXTRA_MODELS%"=="" (set ONNX_WEB_EXTRA_MODELS=extras.json)
python -m onnx_web.convert --sources --diffusion --upscaling --correction --extras=%ONNX_WEB_EXTRA_MODELS% --token=%HF_TOKEN%
python -m onnx_web.convert ^
--sources ^
--diffusion ^
--upscaling ^
--correction ^
--extras=%ONNX_WEB_EXTRA_MODELS% ^
--token=%HF_TOKEN% ^
%ONNX_WEB_EXTRA_ARGS%
echo "Launching API server..."
flask --app="onnx_web.main:run" run --host=0.0.0.0

View File

@ -22,7 +22,8 @@ python3 -m onnx_web.convert \
--upscaling \
--correction \
--extras=${ONNX_WEB_EXTRA_MODELS:-extras.json} \
--token=${HF_TOKEN:-}
--token=${HF_TOKEN:-} \
${ONNX_WEB_EXTRA_ARGS:-}
echo "Launching API server..."
flask --app='onnx_web.main:run' run --host=0.0.0.0

View File

@ -1,5 +1,11 @@
echo "Downloading and converting models to ONNX format..."
python -m onnx_web.convert --sources --diffusion --upscaling --correction --token=%HF_TOKEN%
python -m onnx_web.convert ^
--sources ^
--diffusion ^
--upscaling ^
--correction ^
--token=%HF_TOKEN% ^
%ONNX_WEB_EXTRA_ARGS%
echo "Launching API server..."
flask --app="onnx_web.main:run" run --host=0.0.0.0

View File

@ -21,7 +21,8 @@ python3 -m onnx_web.convert \
--diffusion \
--upscaling \
--correction \
--token=${HF_TOKEN:-}
--token=${HF_TOKEN:-} \
${ONNX_WEB_EXTRA_ARGS:-}
echo "Launching API server..."
flask --app='onnx_web.main:run' run --host=0.0.0.0