feat(api): add a way to pass extra args to the conversion script
This commit is contained in:
parent
25c41c8d66
commit
35303c7d20
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue