1
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
Sean Sube e5fdcff973
add script for converting models only 2024-03-03 15:39:12 -06:00
Sean Sube f80a7bbb83
feat(build): add additional launch configs for vscode 2024-03-03 15:38:51 -06:00
Sean Sube cdf6f46f04
fix tests 2024-03-03 15:38:26 -06:00
3 changed files with 48 additions and 2 deletions

18
.vscode/launch.json vendored
View File

@ -1,6 +1,14 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"args": ["--name", "outpaint"],
"console": "integratedTerminal"
},
{
"name": "Python: Remote Attach",
"type": "python",
@ -16,6 +24,16 @@
}
],
"justMyCode": false
},
{
"name": "Python: Local Attach",
"type": "python",
"request": "attach",
"connect": {
"host": "127.0.0.1",
"port": 5679
},
"justMyCode": false
}
]
}

28
api/convert.sh Executable file
View File

@ -0,0 +1,28 @@
#! /bin/sh
set -eu
if [ -n "${VIRTUAL_ENV+set}" ]; then
echo "Using current virtual env..."
else
if [ -d "onnx_env" ]; then
echo "Loading existing virtual env..."
. onnx_env/bin/activate
else
echo "Creating new virtual env..."
python -m venv onnx_env
. onnx_env/bin/activate
fi
fi
echo "Downloading and converting models to ONNX format..."
python3 -m onnx_web.convert \
--correction \
--diffusion \
--networks \
--sources \
--upscaling \
--extras=${ONNX_WEB_EXTRA_MODELS:-../models/extras.json} \
--token=${HF_TOKEN:-} \
${ONNX_WEB_EXTRA_ARGS:-}

View File

@ -328,6 +328,7 @@ class TestInpaintPipeline(unittest.TestCase):
1,
unet_tile=64,
),
border=Border.even(0),
size=Size(*source.size),
upscale=UpscaleParams("test"),
highres=HighresParams(False, 1, 0, 0),
@ -339,7 +340,6 @@ class TestInpaintPipeline(unittest.TestCase):
params,
source,
mask,
Border.even(0),
noise_source_uniform,
mask_filter_none,
"white",
@ -373,6 +373,7 @@ class TestInpaintPipeline(unittest.TestCase):
1,
unet_tile=64,
),
border=Border.even(0),
size=Size(*source.size),
upscale=UpscaleParams("test"),
highres=HighresParams(False, 1, 0, 0),
@ -384,7 +385,6 @@ class TestInpaintPipeline(unittest.TestCase):
params,
source,
mask,
Border.even(0),
noise_source_uniform,
mask_filter_none,
"black",