Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.13.0 #459

Draft
wants to merge 228 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
228 commits
Select commit Hold shift + click to select a range
5de28d0
generate a thumbnail when the first image is > 512
ssube Jan 3, 2024
5ad7b4c
fix thumbnail call
ssube Jan 3, 2024
0fa7eff
make thumbnail size configurable
ssube Jan 3, 2024
4edd397
add image metadata to stage results
ssube Jan 3, 2024
297285f
fix(api): upscale during highres regardless of upscale checkbox
ssube Jan 3, 2024
4609896
attempt to save grid mode metadata
ssube Jan 3, 2024
19c91f7
add networks to metadata
ssube Jan 3, 2024
44a8d61
feat: add batch endpoints for cancel and status, update responses
ssube Jan 4, 2024
a6baf36
avoid reusing routes
ssube Jan 4, 2024
444d809
fix progress, unwrap metadata
ssube Jan 4, 2024
d87861c
fix params, save metadata
ssube Jan 4, 2024
492bc1e
make sure image response is array
ssube Jan 4, 2024
6f0adcb
add types for cancelled and running jobs
ssube Jan 4, 2024
9d05d9b
return output names
ssube Jan 4, 2024
0c504e3
report stage and tile count in progress
ssube Jan 4, 2024
4f1bc84
initialize fields
ssube Jan 4, 2024
28fc208
track results after each stage
ssube Jan 4, 2024
5a48447
add types for unknown jobs
ssube Jan 4, 2024
9b5e894
avoid waiting for final progress
ssube Jan 4, 2024
c4b831f
fix typos
ssube Jan 4, 2024
46bcd5a
make response types match
ssube Jan 4, 2024
e0d0933
fix missing param
ssube Jan 4, 2024
fac98ab
keep result of each stage with metadata
ssube Jan 4, 2024
7a5e6ab
pass result on to command
ssube Jan 4, 2024
8ae6069
handle 0 progress
ssube Jan 4, 2024
bdefaec
serialize metadata
ssube Jan 4, 2024
04be627
pass server when serializing metadata
ssube Jan 4, 2024
fe6b267
prep models field
ssube Jan 4, 2024
48671e2
fix hash field
ssube Jan 4, 2024
e3a6635
remove unused job type field
ssube Jan 4, 2024
112d5a8
start passing metadata through stages
ssube Jan 4, 2024
ce84dfa
pass metadata through tiles
ssube Jan 4, 2024
b6da935
use progress type in command
ssube Jan 5, 2024
9a1389d
fix imports
ssube Jan 5, 2024
4dc251c
fix callback access
ssube Jan 5, 2024
10acad2
estimate steps better, pass progress onto reply
ssube Jan 5, 2024
4f230f4
clean up result and metadata handling
ssube Jan 6, 2024
9b5d00a
move progress state to worker context
ssube Jan 6, 2024
88f99ef
remove unused format field from upscale params
ssube Jan 6, 2024
6b0b2e4
update tests
ssube Jan 6, 2024
7d78284
fix(api): only hash networks once per worker lifetime
ssube Jan 6, 2024
e958eff
misc testing fixes
ssube Jan 6, 2024
b5ed110
use result size helper
ssube Jan 6, 2024
058a0f1
use max size of all images in stack
ssube Jan 6, 2024
1a8d538
handle empty results
ssube Jan 6, 2024
3e5a955
fix array sizing, update release tests
ssube Jan 6, 2024
3a647ad
provide empty metadata for pipelines with source images
ssube Jan 6, 2024
e8e2b92
keep metadata when tiling
ssube Jan 6, 2024
9b9a614
return results for multiple jobs
ssube Jan 6, 2024
c7154ff
start adding specific error messages
ssube Jan 6, 2024
9e201fc
fix blend sources
ssube Jan 6, 2024
ec48b27
start inheriting metadata
ssube Jan 6, 2024
21666ab
fix up highres metadata
ssube Jan 6, 2024
be40797
use txt2img params for highres output
ssube Jan 6, 2024
fd92d52
send empty progress with initial job
ssube Jan 7, 2024
237accc
start adding queue progress
ssube Jan 7, 2024
0f11873
add queue status to UI
ssube Jan 7, 2024
1dae8ee
feat(gui): filter pipelines based on tab and set a reasonable default
ssube Jan 9, 2024
3101be8
feat: add motd to server config, show in web UI
ssube Jan 9, 2024
c8d6afd
fix(gui): make pipeline labels more consistent
ssube Jan 9, 2024
a42d728
feat(api): add optional horde safety stage
ssube Jan 9, 2024
0215cb9
cancel unsafe jobs
ssube Jan 9, 2024
2eb90ba
feat: better error messaging
ssube Jan 9, 2024
99bd6b0
keep safe images
ssube Jan 9, 2024
0d14397
fix output stage
ssube Jan 9, 2024
055f6e2
fix controlnet
ssube Jan 9, 2024
2b562d9
feat(gui): make layout direction and history width persist
ssube Jan 11, 2024
5888cae
add settings slice and allow resizing image history
ssube Jan 12, 2024
853b92e
cleanup layout logic and margins
ssube Jan 12, 2024
f5506b1
feat(api): support CPU model offloading specifically for SDXL
ssube Jan 13, 2024
f30c5f2
clean up horizontal layout styles, use constants for spacing
ssube Jan 13, 2024
7966f00
fix(api): make sure a controlnet has been selected when using that pi…
ssube Jan 13, 2024
c5d64e7
lint fixes
ssube Jan 13, 2024
26c1631
lint fixes
ssube Jan 13, 2024
746f2f5
avoid mutating existing progress objects
ssube Jan 13, 2024
1cf8c7e
make pipeline progress more accurate and complete
ssube Jan 13, 2024
065df23
more lint
ssube Jan 13, 2024
a5fe52d
feat(api): parse metadata from input images
ssube Jan 13, 2024
301628e
fix progress recursion
ssube Jan 13, 2024
5b5dd18
fix exif method
ssube Jan 14, 2024
19b84ed
complete most of german localization
ssube Jan 14, 2024
a7568db
fix(gui): translate tab labels
ssube Jan 14, 2024
150ed75
add network tokens to experimental prompt parser
ssube Jan 14, 2024
d349e8c
feat(gui): batch status requests (#238)
ssube Jan 14, 2024
80f3438
feat(gui): make status update interval configurable
ssube Jan 14, 2024
9d3a2d7
complete most of spanish localization
ssube Jan 14, 2024
f7b171f
fix highres output size
ssube Jan 14, 2024
8f31d16
use correct upscale params for highres metadata
ssube Jan 14, 2024
5e40ba9
cache horde safety models
ssube Jan 14, 2024
943f0e6
fix thumbnail metadata size
ssube Jan 14, 2024
4b7bd2b
fix thumbnail metadata
ssube Jan 14, 2024
1e22446
feat(gui): drag and drop images to get params
ssube Jan 14, 2024
0a1ccf2
use adjusted metadata for thumbnail
ssube Jan 14, 2024
c47e91f
apply lint
ssube Jan 14, 2024
1dd1988
document horde-safety flags and sdxl model offloading
ssube Jan 14, 2024
0eacb8b
fix(docs): document client query params
ssube Jan 14, 2024
95ac6d7
remove text hook in profiles to fix pasting
ssube Jan 14, 2024
5ffb44c
reset outscale for thumbnail metadata
ssube Jan 14, 2024
2c988b8
lint fixes
ssube Jan 15, 2024
2faac57
limit status batch size
ssube Jan 15, 2024
513c190
document new API endpoints
ssube Jan 15, 2024
4de917d
fix(api): include networks in launch scripts
ssube Jan 15, 2024
effa26c
fix(api): remove watermark calls from SDXL panorama
ssube Jan 15, 2024
0f12c37
save metadata to S3
ssube Jan 15, 2024
482d9b2
pass correct scale params
ssube Jan 15, 2024
374efca
attempt to freeze scheduler timestep for panorama
ssube Jan 15, 2024
d7af93c
remove panorama denoise stage
ssube Jan 15, 2024
bb1b309
increment scheduler index after view loop
ssube Jan 15, 2024
4633e7e
fix last step errors
ssube Jan 15, 2024
500561b
start updating french translation
ssube Jan 15, 2024
ff11d75
remove timestep pinning
ssube Jan 15, 2024
dcaadf1
add experimental patch with latent mirroring
ssube Jan 22, 2024
51217ea
add scheduler patch
ssube Jan 22, 2024
40dac93
fix gradient point order
ssube Jan 22, 2024
285c672
fix output type
ssube Jan 22, 2024
e41fa04
convert mirrored latents back to torch
ssube Jan 22, 2024
23018a7
include flipped mask
ssube Jan 22, 2024
bdf6f40
add gradient to mirroring
ssube Jan 22, 2024
2773ab0
put latent mirroring behind feature flag, fix means
ssube Jan 27, 2024
ddb8f4f
disable latent mirroring for img2img pipelines
ssube Jan 27, 2024
d8a0f5f
use pipeline type to decide scheduler patch options
ssube Jan 27, 2024
c2ec5f9
add feature flag for vertical mirroring
ssube Jan 28, 2024
bdbe654
fix(api): correct gradient for vertical latent mirroring
ssube Jan 28, 2024
256714b
fix(api): add missing callback params to stages
ssube Jan 28, 2024
964000e
reduce blur when using latent mirroring
ssube Jan 28, 2024
f8bdd76
fix bad import
ssube Jan 28, 2024
7c6ae6a
fix(api): make with_args methods accept and ignore extra args
ssube Jan 28, 2024
83e5c99
feat(api): read thumbnail parameter from request
ssube Jan 28, 2024
8a71934
turn off thumbnails for release tests, fix unit tests
ssube Jan 28, 2024
8c8be8f
feat: save a thumbnail for every image
ssube Jan 29, 2024
8b26c12
fix(api): send correct image URLs
ssube Jan 29, 2024
3c17fb8
fix(api): save correct image as thumbnail
ssube Jan 29, 2024
7cfe619
remove some duplicate code
ssube Jan 29, 2024
8f7ef6d
remove references to /tmp
ssube Jan 29, 2024
c2d45b0
fix(api): correct output names for inpaint pipelines
ssube Jan 30, 2024
f70de1c
correctly handle falsey args in with_args methods
ssube Jan 30, 2024
e09b1ce
feat: use CUDA 11.8 throughout
ssube Jan 30, 2024
4b5ff69
fix circular imports
ssube Jan 30, 2024
028547d
fix size import
ssube Jan 30, 2024
dd02b05
add missing file
ssube Jan 30, 2024
acd9168
fix(api): save inpaint images regardless of full-res settings
ssube Jan 31, 2024
bc2eeb8
feat(api): add prompt filter stage using GPT2 models
ssube Feb 11, 2024
3fea317
put prompt filters behind a feature flag for now
ssube Feb 11, 2024
2d18ac1
use preferred Torch device for prompt filters
ssube Feb 11, 2024
bfdaae9
fix(api): move optimum model validation behind a feature flag, disabl…
ssube Feb 11, 2024
61272b9
support multi-stage prompts in prompt filter
ssube Feb 12, 2024
444369e
add mock controls for experimental features
ssube Feb 17, 2024
dff6dfa
add experimental controls, fix filter list
ssube Feb 17, 2024
6f35b57
add strings for new features
ssube Feb 17, 2024
6c3e02a
add experimental params to client-side state
ssube Feb 17, 2024
c60c263
feat: move image params from query string to form data
ssube Feb 17, 2024
1a4c31d
parse json in forms
ssube Feb 17, 2024
bf1a88f
add single class to store all request params
ssube Feb 17, 2024
b00de64
make all params compatible with JSON structure
ssube Feb 17, 2024
bd44423
fix parameters to get parameters
ssube Feb 17, 2024
b358d3b
pass pipelined data to params
ssube Feb 17, 2024
2449e34
make optional params properly optional
ssube Feb 17, 2024
749cf84
send experimental params to server
ssube Feb 17, 2024
48d7a51
add new params to server config
ssube Feb 17, 2024
0bbdc3b
implement experimental parameters
ssube Feb 17, 2024
cdef20f
pass prompt editing params to stage
ssube Feb 17, 2024
7743e8d
use experimental defaults from server
ssube Feb 24, 2024
c05d74b
fix server params
ssube Feb 24, 2024
5004234
use nested config keys for experimental features
ssube Feb 24, 2024
0945237
fix default params
ssube Feb 24, 2024
abc045b
python version compatibility fixes
ssube Feb 24, 2024
9338f61
use server defaults for experimental params
ssube Feb 24, 2024
6226fe5
translate strings for experimental features
ssube Feb 24, 2024
3098e89
wrap experimental features in a collapsible accordion
ssube Feb 24, 2024
1e1e77b
fix(api): use correct keys for experimental parameters
ssube Feb 24, 2024
324bef5
fix(api): use correct name for min prompt length
ssube Feb 24, 2024
f61808c
fix(api): correct parameter name for prompt filter
ssube Feb 24, 2024
9d87e92
fix(api): load horde safety model to worker's torch device
ssube Feb 25, 2024
fd28c09
update black, apply latest lint
ssube Feb 25, 2024
26e3405
fix blend pipeline test
ssube Feb 25, 2024
a653f44
fix tests
ssube Feb 25, 2024
7f0fbdc
create default sub-params when key is missing
ssube Mar 2, 2024
4a89bee
fix special param parsing within img2img/inpaint pipelines
ssube Mar 2, 2024
660e9ef
fix inpaint job name
ssube Mar 2, 2024
b8df500
get inpainting border from request params
ssube Mar 2, 2024
8d71aed
add missing alpha channels when blending tiles
ssube Mar 2, 2024
dadb254
fix alpha channel range
ssube Mar 2, 2024
0d1f65a
get params from root object if their subkey is not present, restoring…
ssube Mar 2, 2024
415405c
correctly cache horde-safety models
ssube Mar 2, 2024
c95fd5f
only use subkeys when they are an object
ssube Mar 2, 2024
fcbb3c4
pass correct params when building img2img name
ssube Mar 2, 2024
c226162
fix name shadowing
ssube Mar 2, 2024
6581e3d
feature(api): add feature flag to use Compel for prompt parsing
ssube Mar 3, 2024
481dcb9
fix wrapper for ORT model
ssube Mar 3, 2024
5da3cfa
convert embeddings after padding
ssube Mar 3, 2024
504c1ce
fix typo
ssube Mar 3, 2024
fd05533
enable Compel parsing for SDXL
ssube Mar 3, 2024
5da846e
add Compel for SDXL
ssube Mar 3, 2024
a1657a6
fix SDXL patch signature
ssube Mar 3, 2024
9113cc5
detect dtype in encoder patch
ssube Mar 3, 2024
ec6421a
fix encoder patch for SDXL
ssube Mar 3, 2024
069b795
fix encoder patch for SDXL
ssube Mar 3, 2024
463799f
fix SDXL patch output
ssube Mar 3, 2024
4f5f87b
leave hidden states in a list
ssube Mar 3, 2024
6dbed8c
return text embeds when requested
ssube Mar 3, 2024
d084f53
look up input types for SD1.5 as well
ssube Mar 3, 2024
ce45e63
enable CLIP skip for SD1.5 with Compel
ssube Mar 3, 2024
4713169
parse CLIP skip tokens for Compel
ssube Mar 3, 2024
86a2db1
add region and reseed tokens to arpeggio parser
ssube Mar 3, 2024
1e73eac
add clip skip tokens to arpeggio parser
ssube Mar 3, 2024
24039ab
add conversion patch for text encoder
ssube Mar 3, 2024
bea97ef
fix(api): use correct pipeline when converting inpainting with optimum
ssube Mar 3, 2024
87f34cf
fix hidden states patch
ssube Mar 3, 2024
cdf6f46
fix tests
ssube Mar 3, 2024
f80a7bb
feat(build): add additional launch configs for vscode
ssube Mar 3, 2024
e5fdcff
add script for converting models only
ssube Mar 3, 2024
fceffb8
fix(api): make negative prompt optional with Compel
ssube Mar 3, 2024
1774939
compile AST to structured prompt
ssube Mar 4, 2024
5ae3d72
fix Compel parsing when negative prompt is empty
ssube Mar 4, 2024
0323634
fix(gui): pass outpainting params
ssube Mar 8, 2024
08396c8
fix(api): remove alpha channels while blending tiles
ssube Mar 8, 2024
ce48ce2
fix(api): add current params to outpaint metadata
ssube Mar 9, 2024
f785548
fix(api): keep metadata from tiled stages
ssube Mar 9, 2024
322aa3f
fix outpaint size calculation
ssube Mar 9, 2024
501dbff
add clip skip to custom prompt parser, collapse phrases with the same…
ssube Mar 10, 2024
3765fb9
collapse prompt phrase runs
ssube Mar 16, 2024
7b0d736
fix(api): correct output size math for upscale and correction
ssube Mar 16, 2024
09dfc51
remove print statements
ssube Mar 16, 2024
8202e92
only log keys for ignored kwargs
ssube Mar 16, 2024
9e3d84d
fix(gui): handle responses with 0 images correctly
ssube Apr 17, 2024
26e8d29
add GH action workflow
ssube Apr 17, 2024
ff88ea5
fix syntax errors in workflow
ssube Apr 17, 2024
8c19068
fix runner tags
ssube Apr 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
319 changes: 319 additions & 0 deletions .github/workflows/onnx-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,319 @@
name: build
on:
push:
workflow_dispatch:
jobs:
github-pending:
runs-on:
- ubuntu-latest
container:
image: docker.io/python:3.10
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.cache/pip"
steps:
- uses: actions/[email protected]
- run: "./common/scripts/github-status.sh pending"
build-api-coverage-3-10:
needs: github-pending
runs-on:
- ubuntu-latest
container:
image: docker.io/python:3.10
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.cache/pip"
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: ".cache/pip"
key: python-3-10
- run: apt-get -y update && apt-get -y install python3-opencv
- run: cd api
- run: "${{ github.workspace }}/common/scripts/make-venv.sh"
- run: make ci
build-api-coverage-3-9:
needs: github-pending
runs-on:
- ubuntu-latest
container:
image: docker.io/python:3.9
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.cache/pip"
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: ".cache/pip"
key: python-3-9
- run: apt-get -y update && apt-get -y install python3-opencv
- run: cd api
- run: "${{ github.workspace }}/common/scripts/make-venv.sh"
- run: make ci
build-api-coverage-3-8:
needs: github-pending
runs-on:
- ubuntu-latest
container:
image: docker.io/python:3.8
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.cache/pip"
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: ".cache/pip"
key: python-3-8
- run: apt-get -y update && apt-get -y install python3-opencv
- run: cd api
- run: "${{ github.workspace }}/common/scripts/make-venv.sh"
- run: make ci
build-gui-bundle:
needs: github-pending
runs-on:
- ubuntu-latest
container:
image: docker.io/node:18
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: gui/node_modules/
key: "${{ runner.os }}-${{ hashFiles('gui/yarn.lock') }}"
- run: cd gui
- run: make ci
# # 'artifacts.coverage_report' was not transformed because there is no suitable equivalent in GitHub Actions
# # 'artifacts.junit' was not transformed because there is no suitable equivalent in GitHub Actions
- uses: actions/[email protected]
if: success()
with:
name: "${{ github.job }}"
retention-days: 1
path: gui/out/
package-api-oci:
needs:
- build-api-coverage-3-8
- build-api-coverage-3-9
- build-api-coverage-3-10
- build-gui-bundle
runs-on:
- ubuntu-latest
container:
image: docker.io/docker:20.10
services:
docker.io/docker:20.10-dind:
image: docker.io/docker:20.10-dind
env:
DOCKER_CERT_PATH: "/shared/docker/client"
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2376
DOCKER_NAME: "${{ github.repository }}"
DOCKER_TLS_CERTDIR: "/shared/docker"
DOCKER_TLS_VERIFY: 1
VERSION_TAG: "${{ github.ref }}"
IMAGE_ROOT: "${{ github.workspace }}"
IMAGE_SUFFIX: api
strategy:
matrix:
include:
- IMAGE_ARCH: cpu-buster
IMAGE_FILE: api/Containerfile.cpu.buster
- IMAGE_ARCH: cuda-ubuntu
IMAGE_FILE: api/Containerfile.cuda.ubuntu
- IMAGE_ARCH: rocm-ubuntu
IMAGE_FILE: api/Containerfile.rocm.ubuntu
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- run: mkdir ${HOME}/.docker
- run: echo "${DOCKER_SECRET}" | base64 -d > ${HOME}/.docker/config.json
- run: "${{ github.workspace }}/common/scripts/image-build.sh --push"
- run: rm -rfv ${HOME}/.docker
if: always()
package-gui-oci:
needs: build-gui-bundle
runs-on:
- ubuntu-latest
container:
image: docker.io/docker:20.10
services:
docker.io/docker:20.10-dind:
image: docker.io/docker:20.10-dind
env:
DOCKER_CERT_PATH: "/shared/docker/client"
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://localhost:2376
DOCKER_NAME: "${{ github.repository }}"
DOCKER_TLS_CERTDIR: "/shared/docker"
DOCKER_TLS_VERIFY: 1
VERSION_TAG: "${{ github.ref }}"
IMAGE_ROOT: "${{ github.workspace }}/gui"
IMAGE_SUFFIX: gui
strategy:
matrix:
include:
- IMAGE_ARCH: nginx-alpine
IMAGE_FILE: Containerfile.nginx.alpine
- IMAGE_ARCH: nginx-bullseye
IMAGE_FILE: Containerfile.nginx.bullseye
- IMAGE_ARCH: node-alpine
IMAGE_FILE: Containerfile.node.alpine
- IMAGE_ARCH: node-buster
IMAGE_FILE: Containerfile.node.buster
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- run: mkdir ${HOME}/.docker
- run: echo "${DOCKER_SECRET}" | base64 -d > ${HOME}/.docker/config.json
- run: cd gui
- run: "${{ github.workspace }}/common/scripts/image-build.sh --push"
- run: rm -rfv ${HOME}/.docker
if: always()
package-api-twine:
needs:
- build-api-coverage-3-8
- build-api-coverage-3-10
runs-on:
- ubuntu-latest
container:
image: docker.io/python:3.10
if: startsWith(github.ref, 'refs/tags')
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.cache/pip"
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: ".cache/pip"
key: "${{ runner.os }}-${{ hashFiles('api/requirements/dev.txt') }}"
- uses: actions/[email protected]
- run: echo "${PIP_SECRET}" | base64 -d > $HOME/.pypirc
- run: cp -v README.md api/README.md
- run: cd api
- run: pip3 install -r requirements/dev.txt
- run: python3 -m build
- run: twine check dist/*
- run: twine upload --repository onnx-web dist/*
- uses: actions/[email protected]
if: success()
with:
name: "${{ github.job }}"
retention-days: 7
path: dist/
package-api-twine-dry:
needs:
- build-api-coverage-3-8
- build-api-coverage-3-10
runs-on:
- ubuntu-latest
container:
image: docker.io/python:3.10
if: "!(startsWith(github.ref, 'refs/tags'))"
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.cache/pip"
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: ".cache/pip"
key: "${{ runner.os }}-${{ hashFiles('api/requirements/dev.txt') }}"
- uses: actions/[email protected]
- run: cp -v README.md api/README.md
- run: cd api
- run: pip install build twine
- run: python -m build
- run: twine check dist/*
- uses: actions/[email protected]
if: success()
with:
name: "${{ github.job }}"
retention-days: 7
path: dist/
package-gui-npm:
needs: build-gui-bundle
runs-on:
- ubuntu-latest
container:
image: docker.io/node:18
if: startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: gui/node_modules/
key: "${{ runner.os }}-${{ hashFiles('gui/yarn.lock') }}"
- uses: actions/[email protected]
- run: echo "${NPM_SECRET}" | base64 -d > $HOME/.npmrc
- run: cp -v README.md gui/README.md
- run: cd gui
- run: npm publish
# # 'artifacts.coverage_report' was not transformed because there is no suitable equivalent in GitHub Actions
# # 'artifacts.junit' was not transformed because there is no suitable equivalent in GitHub Actions
- uses: actions/[email protected]
if: success()
with:
name: "${{ github.job }}"
retention-days: 7
path: "${{ github.workspace }}/*.tgz"
package-gui-npm-dry:
needs: build-gui-bundle
runs-on:
- ubuntu-latest
container:
image: docker.io/node:18
if: "!(startsWith(github.ref, 'refs/tags'))"
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: gui/node_modules/
key: "${{ runner.os }}-${{ hashFiles('gui/yarn.lock') }}"
- uses: actions/[email protected]
- run: cp -v README.md gui/README.md
- run: cd gui
- run: npm pack
# # 'artifacts.coverage_report' was not transformed because there is no suitable equivalent in GitHub Actions
# # 'artifacts.junit' was not transformed because there is no suitable equivalent in GitHub Actions
- uses: actions/[email protected]
if: success()
with:
name: "${{ github.job }}"
retention-days: 7
path: "${{ github.workspace }}/*.tgz"
github-failure:
needs:
- package-api-oci
- package-gui-oci
- package-api-twine
- package-api-twine-dry
- package-gui-npm
- package-gui-npm-dry
runs-on:
- ubuntu-latest
container:
image: docker.io/python:3.10
if: failure()
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.cache/pip"
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- run: "./common/scripts/github-status.sh failure"
github-success:
needs:
- package-api-oci
- package-gui-oci
- package-api-twine
- package-api-twine-dry
- package-gui-npm
- package-gui-npm-dry
runs-on:
- ubuntu-latest
container:
image: docker.io/python:3.10
if: success()
env:
PIP_CACHE_DIR: "${{ github.workspace }}/.cache/pip"
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
- run: "./common/scripts/github-status.sh success"
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -16,6 +24,16 @@
}
],
"justMyCode": false
},
{
"name": "Python: Local Attach",
"type": "python",
"request": "attach",
"connect": {
"host": "127.0.0.1",
"port": 5679
},
"justMyCode": false
}
]
}
2 changes: 2 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ entry.py
*.swp
*.pyc

.cache/
__pycache__/
dist/
filter/
htmlcov/
onnx_env/
venv/
Expand Down
2 changes: 1 addition & 1 deletion api/Containerfile.cuda.ubuntu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/nvidia/cuda:11.7.1-runtime-ubuntu20.04
FROM docker.io/nvidia/cuda:11.8.0-runtime-ubuntu20.04

WORKDIR /onnx-web/api

Expand Down
28 changes: 28 additions & 0 deletions api/convert.sh
Original file line number Diff line number Diff line change
@@ -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:-}

Loading