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

Updates & Prepare hlky streamlit #59

Merged
merged 1 commit into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion services/AUTOMATIC1111/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,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=85b97cc49c4766cb47306e71e552871a0791ea29
ARG SHA=91c56c51c7c83e18adb8fc52a950ec481c93b1de
RUN <<EOF
cd stable-diffusion-webui
git pull --rebase
Expand Down
6 changes: 4 additions & 2 deletions services/hlky/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN pip install -U --no-cache-dir pyperclip
# 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 BRANCH=master
ARG SHA=e6a9e5d968aad020e54045a0923d8c6aa0b54591
ARG SHA=833a91047df999302f699637768741cecee9c37b
RUN <<EOF
cd stable-diffusion
git fetch
Expand Down Expand Up @@ -56,4 +56,6 @@ WORKDIR /stable-diffusion
ENV TRANSFORMERS_CACHE=/cache/transformers TORCH_HOME=/cache/torch CLI_ARGS=""
EXPOSE 7860
# run, -u to not buffer stdout / stderr
CMD /docker/mount.sh && python3 -u scripts/webui.py --outdir /output --ckpt /cache/models/model.ckpt --ldsr-dir /latent-diffusion ${CLI_ARGS}
CMD /docker/mount.sh && \
python3 -u scripts/webui.py --outdir /output --ckpt /cache/models/model.ckpt --ldsr-dir /latent-diffusion --inbrowser ${CLI_ARGS}
#STREAMLIT_SERVER_PORT=7860 python -m streamlit run scripts/webui_streamlit.py
3 changes: 3 additions & 0 deletions services/hlky/mount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ fi
# force facexlib cache
mkdir -p /cache/weights/ /stable-diffusion/gfpgan/
ln -sf /cache/weights/ /stable-diffusion/gfpgan/

# streamlit config
ln -sf /docker/webui_streamlit.yaml /stable-diffusion/configs/webui/webui_streamlit.yaml
101 changes: 101 additions & 0 deletions services/hlky/webui_streamlit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# UI defaults configuration file. It is automatically loaded if located at configs/webui/webui_streamlit.yaml.
general:
gpu: 0
outdir: /outputs
ckpt: "/cache/models/model.ckpt"
fp:
name: "embeddings/alex/embeddings_gs-11000.pt"
GFPGAN_dir: "./src/gfpgan"
RealESRGAN_dir: "./src/realesrgan"
RealESRGAN_model: "RealESRGAN_x4plus"
outdir_txt2img: /outputs/txt2img-samples
outdir_img2img: /outputs/img2img-samples
gfpgan_cpu: False
esrgan_cpu: False
extra_models_cpu: False
extra_models_gpu: False
save_metadata: True
skip_grid: False
skip_save: False
grid_format: "jpg:95"
n_rows: -1
no_verify_input: False
no_half: False
precision: "autocast"
optimized: False
optimized_turbo: False
update_preview: True
update_preview_frequency: 1

txt2img:
prompt:
height: 512
width: 512
cfg_scale: 5.0
seed: ""
batch_count: 1
batch_size: 1
sampling_steps: 50
default_sampler: "k_lms"
separate_prompts: False
normalize_prompt_weights: True
save_individual_images: True
save_grid: True
group_by_prompt: True
save_as_jpg: False
use_GFPGAN: True
use_RealESRGAN: True
RealESRGAN_model: "RealESRGAN_x4plus"
variant_amount: 0.0
variant_seed: ""

img2img:
prompt:
sampling_steps: 50
# Adding an int to toggles enables the corresponding feature.
# 0: Create prompt matrix (separate multiple prompts using |, and get all combinations of them)
# 1: Normalize Prompt Weights (ensure sum of weights add up to 1.0)
# 2: Loopback (use images from previous batch when creating next batch)
# 3: Random loopback seed
# 4: Save individual images
# 5: Save grid
# 6: Sort samples by prompt
# 7: Write sample info files
# 8: jpg samples
# 9: Fix faces using GFPGAN
# 10: Upscale images using Real-ESRGAN
sampler_name: k_lms
denoising_strength: 0.45
# 0: Keep masked area
# 1: Regenerate only masked area
mask_mode: 0
# 0: Just resize
# 1: Crop and resize
# 2: Resize and fill
resize_mode: 0
# Leave blank for random seed:
seed: ""
ddim_eta: 0.0
cfg_scale: 5.0
batch_count: 1
batch_size: 1
height: 512
width: 512
# Textual inversion embeddings file path:
fp: ""
loopback: True
random_seed_loopback: True
separate_prompts: False
normalize_prompt_weights: True
save_individual_images: True
save_grid: True
group_by_prompt: True
save_as_jpg: False
use_GFPGAN: True
use_RealESRGAN: True
RealESRGAN_model: "RealESRGAN_x4plus"
variant_amount: 0.0
variant_seed: ""

gfpgan:
strength: 100