2023-04-20 15:21:35 +03:00
|
|
|
|
distributable:
|
2023-05-09 18:21:24 +03:00
|
|
|
|
url: https://github.com/AUTOMATIC1111/stable-diffusion-webui/archive/refs/tags/v{{version}}.tar.gz
|
2023-04-20 15:21:35 +03:00
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
|
|
versions:
|
2023-05-09 18:21:24 +03:00
|
|
|
|
github: AUTOMATIC1111/stable-diffusion-webui
|
2023-04-20 15:21:35 +03:00
|
|
|
|
|
2023-06-20 15:06:29 +03:00
|
|
|
|
#TODO there's inefficient duplication we can overcome
|
|
|
|
|
# eg. pytorch-vision bundles its own libpng and libjpeg, which we could provide
|
|
|
|
|
|
2023-04-20 15:21:35 +03:00
|
|
|
|
dependencies:
|
|
|
|
|
python.org: ~3.10
|
2023-04-26 18:57:58 +03:00
|
|
|
|
tea.xyz: ^0 # our scripts use tea/cli
|
2023-04-28 18:42:01 +03:00
|
|
|
|
# we clear out all the git repos before uploading but something
|
|
|
|
|
# still tries to use git. hopefully nothing is broken because we
|
|
|
|
|
# clear out all the git repos (they were 100s of MB)
|
|
|
|
|
git-scm.org: ^2
|
2023-04-20 15:21:35 +03:00
|
|
|
|
|
2023-05-09 18:21:24 +03:00
|
|
|
|
#FIXME pls make this work on Linux thanks
|
2023-04-24 22:57:50 +03:00
|
|
|
|
platforms: darwin
|
2023-04-24 20:46:43 +03:00
|
|
|
|
|
2023-04-20 15:21:35 +03:00
|
|
|
|
build:
|
|
|
|
|
dependencies:
|
|
|
|
|
pip.pypa.io: '*'
|
|
|
|
|
gnu.org/wget: '*'
|
|
|
|
|
protobuf.dev: '>=21'
|
|
|
|
|
rust-lang.org: ^1 # docs say this is needed but I’m not convinced…
|
|
|
|
|
script:
|
|
|
|
|
# don’t download the models RN
|
|
|
|
|
# --exit just installs deps and exits rather than boots the web server
|
|
|
|
|
- echo 'export COMMANDLINE_ARGS="
|
|
|
|
|
--no-download-sd-model
|
|
|
|
|
--exit
|
|
|
|
|
$COMMANDLINE_ARGS"' > webui-user.sh
|
|
|
|
|
|
|
|
|
|
# or it clones HEAD and uses that
|
|
|
|
|
- mkdir -p .git
|
|
|
|
|
|
|
|
|
|
# installs python virtual-env
|
|
|
|
|
- ./webui.sh
|
|
|
|
|
|
2023-06-20 15:06:29 +03:00
|
|
|
|
# torchvision .whl dylibs are broken out the box :/
|
|
|
|
|
- run:
|
|
|
|
|
install_name_tool
|
|
|
|
|
-add_rpath @loader_path/../torch/lib
|
|
|
|
|
venv/lib/python3.10/site-packages/torchvision/image.so
|
|
|
|
|
if: darwin
|
|
|
|
|
|
|
|
|
|
# change CWD for remainder of our execution
|
|
|
|
|
- |
|
|
|
|
|
mkdir -p {{prefix}}
|
|
|
|
|
cd {{prefix}}
|
|
|
|
|
|
2023-04-20 15:21:35 +03:00
|
|
|
|
# move this installation into its prefix
|
|
|
|
|
- run: |
|
2023-06-20 15:06:29 +03:00
|
|
|
|
cp -a $SRCROOT lib
|
2023-04-24 22:19:58 +03:00
|
|
|
|
mkdir -p bin
|
2023-04-20 15:21:35 +03:00
|
|
|
|
|
|
|
|
|
# install our scripts and shims
|
|
|
|
|
- |
|
|
|
|
|
cp lib/props/webui-user.sh lib
|
2023-04-24 22:19:58 +03:00
|
|
|
|
cp lib/props/entrypoint.sh .
|
2023-04-20 15:21:35 +03:00
|
|
|
|
cp lib/props/stable-diffusion-webui bin
|
|
|
|
|
|
2023-05-28 00:21:30 +03:00
|
|
|
|
# removes the prepare_environment() step since we have already done that
|
2023-05-16 15:23:13 +03:00
|
|
|
|
- run: |
|
2023-05-28 00:21:30 +03:00
|
|
|
|
sed -i.bak \
|
|
|
|
|
-e '/if not args\.skip_prepare_environment:/{N;N;d;}' \
|
|
|
|
|
-e '/prepare_environment()/d' \
|
|
|
|
|
launch.py
|
2023-05-16 15:23:13 +03:00
|
|
|
|
rm launch.py.bak
|
|
|
|
|
working-directory:
|
|
|
|
|
lib
|
|
|
|
|
|
2023-04-20 15:21:35 +03:00
|
|
|
|
# delete our crap
|
2023-04-24 22:19:58 +03:00
|
|
|
|
- rm -rf lib/props lib/xyz.tea.* lib/tea.yaml
|
2023-04-20 15:21:35 +03:00
|
|
|
|
|
|
|
|
|
# we set this as a symlink to ~/.local/share/models in our stub scripts
|
|
|
|
|
- rm -rf lib/models/Stable-diffusion lib/extensions lib/outputs
|
|
|
|
|
|
2023-05-16 15:23:13 +03:00
|
|
|
|
# delete all the .git stuff to save >1GB
|
|
|
|
|
# NOTE that this would cause the prepare_environment() step to fail
|
2023-04-20 15:21:35 +03:00
|
|
|
|
- find . -name .git\* | xargs rm -rf
|
|
|
|
|
|
|
|
|
|
provides:
|
|
|
|
|
- bin/stable-diffusion-webui
|
2023-04-24 22:19:58 +03:00
|
|
|
|
|
|
|
|
|
entrypoint: ./entrypoint.sh
|
2023-04-20 15:21:35 +03:00
|
|
|
|
|
|
|
|
|
test:
|
2023-06-09 20:51:55 +03:00
|
|
|
|
qa-required: true
|
|
|
|
|
script: stable-diffusion-webui --help
|