fix(api): launch with included extras if user does not provide their own
This commit is contained in:
parent
9f202486c2
commit
2cc604823b
|
@ -1,4 +1,5 @@
|
||||||
echo "Downloading and converting models to ONNX format..."
|
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 --diffusion --upscaling --correction --extras=extras.json --token=%HF_TOKEN%
|
python -m onnx_web.convert --diffusion --upscaling --correction --extras=extras.json --token=%HF_TOKEN%
|
||||||
|
|
||||||
echo "Launching API server..."
|
echo "Launching API server..."
|
||||||
|
|
|
@ -16,7 +16,12 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Downloading and converting models to ONNX format..."
|
echo "Downloading and converting models to ONNX format..."
|
||||||
python3 -m onnx_web.convert --diffusion --upscaling --correction --extras=extras.json --token=${HF_TOKEN:-}
|
python3 -m onnx_web.convert \
|
||||||
|
--diffusion \
|
||||||
|
--upscaling \
|
||||||
|
--correction \
|
||||||
|
--extras=${ONNX_WEB_EXTRA_MODELS:-extras.json} \
|
||||||
|
--token=${HF_TOKEN:-}
|
||||||
|
|
||||||
echo "Launching API server..."
|
echo "Launching API server..."
|
||||||
flask --app=onnx_web.serve run --host=0.0.0.0
|
flask --app=onnx_web.serve run --host=0.0.0.0
|
||||||
|
|
|
@ -45,19 +45,19 @@ base_models: Models = {
|
||||||
"stable-diffusion-onnx-v1-5",
|
"stable-diffusion-onnx-v1-5",
|
||||||
model_source_huggingface + "runwayml/stable-diffusion-v1-5",
|
model_source_huggingface + "runwayml/stable-diffusion-v1-5",
|
||||||
),
|
),
|
||||||
# (
|
(
|
||||||
# "stable-diffusion-onnx-v1-inpainting",
|
"stable-diffusion-onnx-v1-inpainting",
|
||||||
# model_source_huggingface + "runwayml/stable-diffusion-inpainting",
|
model_source_huggingface + "runwayml/stable-diffusion-inpainting",
|
||||||
# ),
|
),
|
||||||
# v2.x
|
# v2.x
|
||||||
# (
|
(
|
||||||
# "stable-diffusion-onnx-v2-1",
|
"stable-diffusion-onnx-v2-1",
|
||||||
# model_source_huggingface + "stabilityai/stable-diffusion-2-1",
|
model_source_huggingface + "stabilityai/stable-diffusion-2-1",
|
||||||
# ),
|
),
|
||||||
# (
|
(
|
||||||
# "stable-diffusion-onnx-v2-inpainting",
|
"stable-diffusion-onnx-v2-inpainting",
|
||||||
# model_source_huggingface + "stabilityai/stable-diffusion-2-inpainting",
|
model_source_huggingface + "stabilityai/stable-diffusion-2-inpainting",
|
||||||
# ),
|
),
|
||||||
# TODO: should have its own converter
|
# TODO: should have its own converter
|
||||||
(
|
(
|
||||||
"upscaling-stable-diffusion-x4",
|
"upscaling-stable-diffusion-x4",
|
||||||
|
|
|
@ -6,8 +6,9 @@ $defs:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
oneOf:
|
oneOf:
|
||||||
- type: string
|
- type: boolean
|
||||||
- type: number
|
- type: number
|
||||||
|
- type: string
|
||||||
|
|
||||||
base_model:
|
base_model:
|
||||||
type: object
|
type: object
|
||||||
|
|
Loading…
Reference in New Issue