Skip to content

Commit

Permalink
Custom Models Auto (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdBarho authored Sep 17, 2022
1 parent fceb83c commit 59892da
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions cache/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/transformers
/weights
/models
/custom-models
5 changes: 3 additions & 2 deletions services/AUTOMATIC1111/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN pip install --prefer-binary --no-cache-dir -r ${ROOT}/repositories/CodeForme
# Note: don't update the sha of previous versions because the install will take forever
# instead, update the repo state in a later step

ARG SHA=7fe00d08402b8bf9f7f0ffef59ee3f3ad0187cfc
ARG SHA=99585b3514e2d7e987651d5c6a0806f933af012b
RUN <<EOF
cd stable-diffusion-webui
git pull --rebase
Expand All @@ -61,4 +61,5 @@ RUN chmod +x /docker/mount.sh && python3 /docker/info.py ${ROOT}/modules/ui.py
WORKDIR ${WORKDIR}
EXPOSE 7860
# run, -u to not buffer stdout / stderr
CMD /docker/mount.sh && python3 -u ../../webui.py --listen --port 7860 --hide-ui-dir-config ${CLI_ARGS}
CMD /docker/mount.sh && \
python3 -u ../../webui.py --listen --port 7860 --hide-ui-dir-config --ckpt-dir /cache/custom-models --ckpt /cache/models/model.ckpt ${CLI_ARGS}
12 changes: 11 additions & 1 deletion services/AUTOMATIC1111/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,15 @@
"interrogate_clip_num_beams": 1,
"interrogate_clip_min_length": 24,
"interrogate_clip_max_length": 48,
"interrogate_clip_dict_limit": 1500.0
"interrogate_clip_dict_limit": 1500.0,
"samples_filename_pattern": "",
"directories_filename_pattern": "",
"save_selected_only": false,
"filter_nsfw": false,
"img2img_color_correction": false,
"img2img_fix_steps": false,
"enable_quantization": false,
"enable_batch_seeds": true,
"memmon_poll_rate": 8,
"sd_model_checkpoint": null
}
3 changes: 1 addition & 2 deletions services/AUTOMATIC1111/mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ rm -rf ${ROOT}/repositories/CodeFormer/weights/CodeFormer ${ROOT}/repositories/C
ln -sf -T /cache/weights ${ROOT}/repositories/CodeFormer/weights/CodeFormer
ln -sf -T /cache/weights ${ROOT}/repositories/CodeFormer/weights/facelib

# mount config
# ln -sf /docker/config.json ${WORKDIR}/config.json
mkdir -p /cache/torch /cache/transformers /cache/weights /cache/models /cache/custom-models
2 changes: 2 additions & 0 deletions services/download/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -Eeuo pipefail

mkdir -p /cache/torch /cache/transformers /cache/weights /cache/models /cache/custom-models

echo "Downloading, this might take a while..."

aria2c --input-file /docker/links.txt --dir /cache/models --continue
Expand Down

0 comments on commit 59892da

Please sign in to comment.