2022-09-13 18:09:20 +02:00
|
|
|
|
version: '3'
|
|
|
|
|
|
# silent: true
|
2022-09-14 20:41:34 +02:00
|
|
|
|
#output: group
|
2022-09-13 18:09:20 +02:00
|
|
|
|
dotenv: [.env]
|
|
|
|
|
|
|
|
|
|
|
|
# Default environment variables for projects
|
|
|
|
|
|
env:
|
|
|
|
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
|
|
|
|
|
|
|
|
vars:
|
|
|
|
|
|
TODAY: '{{ now | date "2006-01-02T15:04:05-07:00" }}'
|
|
|
|
|
|
MODEL_DIRECTORY: cache/models
|
2022-09-13 18:59:55 +02:00
|
|
|
|
black: \033[:0;30m
|
|
|
|
|
|
red: \033[:0;31m
|
|
|
|
|
|
green: \033[:0;32m
|
|
|
|
|
|
orange: \033[:0;33m
|
|
|
|
|
|
blue: \033[:0;34m
|
|
|
|
|
|
purple: \033[:0;35m
|
|
|
|
|
|
cyan: \033[:0;36m
|
|
|
|
|
|
light_gray: \033[:0;37m
|
|
|
|
|
|
dark_gray: \033[:1;30m
|
|
|
|
|
|
light_red: \033[:1;31m
|
|
|
|
|
|
light_green: \033[:1;32m
|
|
|
|
|
|
yellow: \033[:1;33m
|
|
|
|
|
|
light_blue: \033[:1;34m
|
|
|
|
|
|
light_purple: \033[:1;35m
|
|
|
|
|
|
light_cyan: \033[:1;36m
|
|
|
|
|
|
white: \033[:1;37m
|
|
|
|
|
|
nocolor: \u001b[0m
|
|
|
|
|
|
reversed: \u001b[7m
|
2022-09-13 18:09:20 +02:00
|
|
|
|
tasks:
|
|
|
|
|
|
default:
|
|
|
|
|
|
cmds:
|
|
|
|
|
|
- task: list
|
|
|
|
|
|
list:
|
|
|
|
|
|
desc: list tasks
|
2022-09-13 18:32:21 +02:00
|
|
|
|
prefix: ' '
|
2022-09-13 18:09:20 +02:00
|
|
|
|
cmds:
|
2022-09-13 18:32:21 +02:00
|
|
|
|
- task --list --color=true --list-all
|
2022-09-13 18:09:20 +02:00
|
|
|
|
vars:
|
|
|
|
|
|
desc: variable output
|
|
|
|
|
|
cmds:
|
|
|
|
|
|
- |
|
|
|
|
|
|
echo -e "{{.light_gray}}=== ℹ {{ .reversed }} Variable Info from Task {{ .nocolor }} === "
|
2022-09-13 18:59:55 +02:00
|
|
|
|
echo -e "{{.light_gray}}MODEL_DIRECTORY {{.nocolor}}: {{ .orange}}{{ .MODEL_DIRECTORY }} {{ .nocolor }}"
|
|
|
|
|
|
echo -e "{{.light_gray}}DOCKER_BUILDKIT {{.nocolor}}: {{ .orange}}{{ .DOCKER_BUILDKIT }} {{ .nocolor }}"
|
|
|
|
|
|
echo -e "{{.light_gray}}UI {{.nocolor}}: {{ .orange}}{{ .UI }} {{ .nocolor }}"
|
2022-09-13 18:32:21 +02:00
|
|
|
|
|
|
|
|
|
|
### Core Task ###
|
|
|
|
|
|
init:
|
|
|
|
|
|
desc: Download models, build initial docker-compose setup
|
|
|
|
|
|
cmds:
|
|
|
|
|
|
- task: download
|
|
|
|
|
|
- task: update
|
|
|
|
|
|
compose:build:
|
2022-09-13 18:09:20 +02:00
|
|
|
|
desc: setup tooling for project and download dependencies
|
|
|
|
|
|
cmds:
|
|
|
|
|
|
- |
|
|
|
|
|
|
docker compose --profile download up --build
|
2022-09-13 18:32:21 +02:00
|
|
|
|
compose:up:
|
|
|
|
|
|
desc: 'compose up with the current profile of: {{ .UI }}'
|
2022-09-13 18:09:20 +02:00
|
|
|
|
cmds:
|
2022-09-13 18:59:55 +02:00
|
|
|
|
- task: vars
|
2022-09-13 18:32:21 +02:00
|
|
|
|
- docker compose --profile {{ .UI }} up
|
2022-09-13 18:09:20 +02:00
|
|
|
|
update:
|
|
|
|
|
|
desc: run updates
|
|
|
|
|
|
interactive: true
|
|
|
|
|
|
cmds:
|
2022-09-13 18:59:55 +02:00
|
|
|
|
- task: vars
|
2022-09-13 18:09:20 +02:00
|
|
|
|
- task: download
|
2022-09-14 20:41:34 +02:00
|
|
|
|
- |
|
|
|
|
|
|
docker compose --profile {{ .UI }} build
|
|
|
|
|
|
|
2022-09-13 18:09:20 +02:00
|
|
|
|
download:
|
|
|
|
|
|
desc: get extras downloaded
|
|
|
|
|
|
cmds:
|
|
|
|
|
|
- |
|
2022-09-13 18:32:21 +02:00
|
|
|
|
echo '👉 This might take a few minutes. However, it will resume downloading if interuppted and ran again'
|
2022-09-13 18:09:20 +02:00
|
|
|
|
mkdir -p cache/models || true
|
2022-09-13 18:32:21 +02:00
|
|
|
|
curl --progress-bar -C - https://www.googleapis.com/storage/v1/b/aai-blog-files/o/sd-v1-4.ckpt?alt=media -o {{ .MODEL_DIRECTORY }}/model.ckpt
|
2022-09-13 18:09:20 +02:00
|
|
|
|
curl --progress-bar -C - https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth -o {{ .MODEL_DIRECTORY }}/GFPGANv1.3.pth
|
|
|
|
|
|
curl --progress-bar -C - https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -o {{ .MODEL_DIRECTORY }}/RealESRGAN_x4plus.pth
|
|
|
|
|
|
curl --progress-bar -C - https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth -o {{ .MODEL_DIRECTORY }}/RealESRGAN_x4plus_anime_6B.pth
|
|
|
|
|
|
curl --progress-bar -C - https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth -o {{ .MODEL_DIRECTORY }}/RealESRGAN_x2plus.pth
|
|
|
|
|
|
curl --progress-bar -C - https://heibox.uni-heidelberg.de/f/578df07c8fc04ffbadf3/?dl=1 -o {{ .MODEL_DIRECTORY }}/LDSR.ckpt
|
|
|
|
|
|
curl --progress-bar -C - https://heibox.uni-heidelberg.de/f/31a76b13ea27482981b4/?dl=1 -o {{ .MODEL_DIRECTORY }}/LDSR.yaml
|
2022-09-14 20:41:34 +02:00
|
|
|
|
curl --progress-bar -C - https://thisanimedoesnotexist.ai/downloads/wd-v1-2-full-ema.ckpt -o {{ .MODEL_DIRECTORY }}/waifu-diffusion.ckpt
|
2022-09-13 18:32:21 +02:00
|
|
|
|
status:
|
|
|
|
|
|
- test -f {{ .MODEL_DIRECTORY }}/model.ckpt
|
|
|
|
|
|
- test -f {{ .MODEL_DIRECTORY }}/GFPGANv1.3.pth
|
|
|
|
|
|
- test -f {{ .MODEL_DIRECTORY }}/RealESRGAN_x4plus.pth
|
|
|
|
|
|
- test -f {{ .MODEL_DIRECTORY }}/RealESRGAN_x4plus_anime_6B.pth
|
|
|
|
|
|
- test -f {{ .MODEL_DIRECTORY }}/RealESRGAN_x2plus.pth
|
|
|
|
|
|
- test -f {{ .MODEL_DIRECTORY }}/LDSR.ckpt
|
2022-09-14 20:41:34 +02:00
|
|
|
|
- test -f {{ .MODEL_DIRECTORY }}/LDSR.yaml
|
|
|
|
|
|
- test -f {{ .MODEL_DIRECTORY }}/waifu-diffusion.ckpt
|
|
|
|
|
|
|