-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update folders * Update CI * Update CI * Unify base docker images * Remove dead config * Update permissions * Remove CPU Hack * Update hlky * Add Download Service * Adapt services * executable * remove buggy parameter * rename to SHA * Update README
- Loading branch information
Showing
21 changed files
with
164 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,14 @@ | ||
name: Build Image | ||
name: Build Images | ||
|
||
on: [push] | ||
|
||
# TODO: how to cache intermediate images? | ||
jobs: | ||
build_hlky: | ||
build_all: | ||
runs-on: ubuntu-latest | ||
name: hlky | ||
name: All | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: docker compose build --progress plain | ||
build_AUTOMATIC1111: | ||
runs-on: ubuntu-latest | ||
name: AUTOMATIC1111 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: cd AUTOMATIC1111 && docker compose build --progress plain | ||
build_lstein: | ||
runs-on: ubuntu-latest | ||
name: lstein | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: cd lstein && docker compose build --progress plain | ||
# better caching? | ||
- run: docker compose --profile auto build --progress plain | ||
- run: docker compose --profile hlky build --progress plain | ||
- run: docker compose --profile lstein build --progress plain |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/torch | ||
/transformers | ||
/weights | ||
/weights | ||
/models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,54 @@ | ||
version: '3.9' | ||
|
||
services: | ||
model: | ||
build: | ||
context: ./hlky/ | ||
args: | ||
# You can choose any commit sha from https://github.com/hlky/stable-diffusion/commits/main | ||
# USE AT YOUR OWN RISK! otherwise just leave it empty. | ||
BRANCH: | ||
WEBUI_SHA: | ||
x-base_service: &base_service | ||
ports: | ||
- "7860:7860" | ||
volumes: | ||
- ./cache:/cache | ||
- ./output:/output | ||
- ./models:/models | ||
environment: | ||
- CLI_ARGS=--extra-models-cpu --optimized-turbo | ||
- &v1 ./cache:/cache | ||
- &v2 ./output:/output | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
device_ids: ['0'] | ||
capabilities: [gpu] | ||
|
||
name: webui-docker | ||
|
||
services: | ||
download: | ||
build: ./services/download/ | ||
profiles: ["download"] | ||
volumes: | ||
- *v1 | ||
|
||
hlky: | ||
<<: *base_service | ||
profiles: ["hlky"] | ||
build: ./services/hlky/ | ||
environment: | ||
- CLI_ARGS=--optimized-turbo | ||
|
||
automatic1111: &automatic | ||
<<: *base_service | ||
profiles: ["auto"] | ||
build: ./services/AUTOMATIC1111 | ||
volumes: | ||
- *v1 | ||
- *v2 | ||
- ./services/AUTOMATIC1111/config.json:/docker/config.json | ||
environment: | ||
- CLI_ARGS=--medvram --opt-split-attention | ||
|
||
automatic1111-cpu: | ||
<<: *automatic | ||
profiles: ["auto-cpu"] | ||
deploy: {} | ||
environment: | ||
- CLI_ARGS=--no-half --precision full | ||
|
||
lstein: | ||
<<: *base_service | ||
profiles: ["lstein"] | ||
build: ./services/lstein/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
set -Eeuo pipefail | ||
|
||
find . -name "*.sh" -exec git update-index --chmod=+x {} \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"outdir_samples": "/output", "outdir_txt2img_samples": "/output/txt2img-images", "outdir_img2img_samples": "/output/img2img-images", "outdir_extras_samples": "/output/extras-images", "outdir_txt2img_grids": "/output/txt2img-grids", "outdir_img2img_grids": "/output/img2img-grids", "outdir_save": "/output/saved", "__WARNING__": "DON'T CHANGE ANYTHING BEFORE THIS", "outdir_grids": "", "save_to_dirs": false, "save_to_dirs_prompt_len": 10, "samples_save": true, "samples_format": "png", "grid_save": true, "return_grid": true, "grid_format": "png", "grid_extended_filename": false, "grid_only_if_multiple": true, "n_rows": -1, "jpeg_quality": 80, "export_for_4chan": true, "enable_pnginfo": true, "font": "DejaVuSans.ttf", "enable_emphasis": true, "save_txt": false, "ESRGAN_tile": 192, "ESRGAN_tile_overlap": 8, "random_artist_categories": [], "upscale_at_full_resolution_padding": 16, "show_progressbar": true, "show_progress_every_n_steps": 0, "multiple_tqdm": true, "face_restoration_model": "CodeFormer", "code_former_weight": 0.5} | ||
{"outdir_samples": "/output", "outdir_txt2img_samples": "/output/txt2img-images", "outdir_img2img_samples": "/output/img2img-images", "outdir_extras_samples": "/output/extras-images", "outdir_txt2img_grids": "/output/txt2img-grids", "outdir_img2img_grids": "/output/img2img-grids", "outdir_save": "/output/saved", "__WARNING__": "DON'T CHANGE ANYTHING BEFORE THIS", "outdir_grids": "", "save_to_dirs": false, "save_to_dirs_prompt_len": 10, "samples_save": true, "samples_format": "png", "grid_save": true, "return_grid": true, "grid_format": "png", "grid_extended_filename": false, "grid_only_if_multiple": true, "n_rows": -1, "jpeg_quality": 80, "export_for_4chan": true, "enable_pnginfo": true, "font": "DejaVuSans.ttf", "enable_emphasis": true, "save_txt": false, "ESRGAN_tile": 192, "ESRGAN_tile_overlap": 8, "random_artist_categories": [], "upscale_at_full_resolution_padding": 16, "show_progressbar": true, "show_progress_every_n_steps": 5, "multiple_tqdm": true, "face_restoration_model": "CodeFormer", "code_former_weight": 0.5, "grid_save_to_dirs": false} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM bash:alpine3.15 | ||
|
||
RUN apk add parallel | ||
COPY . /docker | ||
RUN chmod +x /docker/download.sh | ||
ENTRYPOINT ["/docker/download.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fe4efff1e174c627256e44ec2991ba279b3816e364b49f9be2abc0b3ff3f8556 /cache/models/model.ckpt | ||
c953a88f2727c85c3d9ae72e2bd4846bbaf59fe6972ad94130e23e7017524a70 /cache/models/GFPGANv1.3.pth | ||
4fa0d38905f75ac06eb49a7951b426670021be3018265fd191d2125df9d682f1 /cache/models/RealESRGAN_x4plus.pth | ||
f872d837d3c90ed2e05227bed711af5671a6fd1c9f7d7e91c911a61f155e99da /cache/models/RealESRGAN_x4plus_anime_6B.pth | ||
c209caecac2f97b4bb8f4d726b70ac2ac9b35904b7fc99801e1f5e61f9210c13 /cache/models/LDSR.ckpt | ||
9d6ad53c5dafeb07200fb712db14b813b527edd262bc80ea136777bdb41be2ba /cache/models/LDSR.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -Eeuo pipefail | ||
|
||
# [[ "$(sha256sum -b $file | head -c 64)" == "$sha" ]] | ||
|
||
declare -A MODELS | ||
|
||
MODELS['model.ckpt']='https://www.googleapis.com/storage/v1/b/aai-blog-files/o/sd-v1-4.ckpt?alt=media' | ||
MODELS['GFPGANv1.3.pth']='https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth' | ||
MODELS['RealESRGAN_x4plus.pth']='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth' | ||
MODELS['RealESRGAN_x4plus_anime_6B.pth']='https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth' | ||
MODELS['LDSR.yaml']='https://heibox.uni-heidelberg.de/f/31a76b13ea27482981b4/?dl=1' | ||
MODELS['LDSR.ckpt']='https://heibox.uni-heidelberg.de/f/578df07c8fc04ffbadf3/?dl=1' | ||
|
||
echo "Downloading..." | ||
|
||
for file in "${!MODELS[@]}"; do | ||
url=${MODELS[$file]} | ||
full_path="/cache/models/$file" | ||
|
||
if [[ -f "$full_path" ]]; then | ||
echo "- $file exists" | ||
continue | ||
fi | ||
|
||
mkdir -p $(dirname $full_path) | ||
wget --tries=10 -c -O $full_path $url | ||
done | ||
|
||
echo "Checking SHAs..." | ||
|
||
time parallel --will-cite -a /docker/checksums.sha256 "echo -n {} | sha256sum -c" |
Oops, something went wrong.