mirror of
				https://github.com/AbdBarho/stable-diffusion-webui-docker.git
				synced 2025-10-30 17:53:23 -04:00 
			
		
		
		
	
							
								
								
									
										1
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
								
							| @@ -14,7 +14,6 @@ jobs: | |||||||
|       matrix: |       matrix: | ||||||
|         profile: |         profile: | ||||||
|           - auto |           - auto | ||||||
|           - sygil |  | ||||||
|           - invoke |           - invoke | ||||||
|           - comfy |           - comfy | ||||||
|           - download |           - download | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								README.md
									
									
									
									
									
								
							| @@ -26,14 +26,6 @@ This repository provides multiple UIs for you to play around with stable diffusi | |||||||
| | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | | ||||||
| |  |  |  | | |  |  |  | | ||||||
|  |  | ||||||
| ### [Sygil (sd-webui / hlky)](https://github.com/Sygil-Dev/sygil-webui) |  | ||||||
|  |  | ||||||
| [Full feature list here](https://github.com/Sygil-Dev/sygil-webui/blob/master/README.md), Screenshots: |  | ||||||
|  |  | ||||||
| | Text to image                                                                                              | Image to image                                                                                             | Image Lab                                                                                                  | |  | ||||||
| | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | |  | ||||||
| |  |  |  | |  | ||||||
|  |  | ||||||
| ### [ComfyUI](https://github.com/comfyanonymous/ComfyUI) | ### [ComfyUI](https://github.com/comfyanonymous/ComfyUI) | ||||||
|  |  | ||||||
| [Full feature list here](https://github.com/comfyanonymous/ComfyUI#features), Screenshot: | [Full feature list here](https://github.com/comfyanonymous/ComfyUI#features), Screenshot: | ||||||
| @@ -58,7 +50,7 @@ Special thanks to everyone behind these awesome projects, without them, none of | |||||||
|  |  | ||||||
| - [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | - [AUTOMATIC1111/stable-diffusion-webui](https://github.com/AUTOMATIC1111/stable-diffusion-webui) | ||||||
| - [InvokeAI](https://github.com/invoke-ai/InvokeAI) | - [InvokeAI](https://github.com/invoke-ai/InvokeAI) | ||||||
| - [Sygil-webui](https://github.com/Sygil-Dev/sygil-webui) |  | ||||||
| - [ComfyUI](https://github.com/comfyanonymous/ComfyUI) | - [ComfyUI](https://github.com/comfyanonymous/ComfyUI) | ||||||
| - [CompVis/stable-diffusion](https://github.com/CompVis/stable-diffusion) | - [CompVis/stable-diffusion](https://github.com/CompVis/stable-diffusion) | ||||||
|  | - [Sygil-webui](https://github.com/Sygil-Dev/sygil-webui) | ||||||
| - and many many more. | - and many many more. | ||||||
|   | |||||||
| @@ -55,21 +55,6 @@ services: | |||||||
|   #     - PRELOAD=true |   #     - PRELOAD=true | ||||||
|   #     - CLI_ARGS=--always_use_cpu |   #     - CLI_ARGS=--always_use_cpu | ||||||
|  |  | ||||||
|   sygil: &sygil |  | ||||||
|     <<: *base_service |  | ||||||
|     profiles: ["sygil"] |  | ||||||
|     build: ./services/sygil/ |  | ||||||
|     image: sd-sygil:16 |  | ||||||
|     environment: |  | ||||||
|       - CLI_ARGS=--optimized-turbo |  | ||||||
|       - USE_STREAMLIT=0 |  | ||||||
|  |  | ||||||
|   sygil-sl: |  | ||||||
|     <<: *sygil |  | ||||||
|     profiles: ["sygil-sl"] |  | ||||||
|     environment: |  | ||||||
|       - USE_STREAMLIT=1 |  | ||||||
|  |  | ||||||
|   comfy: &comfy |   comfy: &comfy | ||||||
|     <<: *base_service |     <<: *base_service | ||||||
|     profiles: ["comfy"] |     profiles: ["comfy"] | ||||||
|   | |||||||
| @@ -1,40 +0,0 @@ | |||||||
| FROM python:3.8-slim |  | ||||||
|  |  | ||||||
| ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 |  | ||||||
|  |  | ||||||
| RUN --mount=type=cache,target=/root/.cache/pip pip install torch==1.13.0 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117 |  | ||||||
|  |  | ||||||
| RUN apt-get update && apt install gcc libsndfile1 ffmpeg build-essential zip unzip git -y && apt-get clean |  | ||||||
|  |  | ||||||
| RUN --mount=type=cache,target=/root/.cache/pip \ |  | ||||||
|   git config --global http.postBuffer 1048576000 && \ |  | ||||||
|   git clone https://github.com/Sygil-Dev/sygil-webui.git stable-diffusion && \ |  | ||||||
|   cd stable-diffusion && \ |  | ||||||
|   git reset --hard 5291437085bddd16d752f811b6552419a2044d12 && \ |  | ||||||
|   pip install -r requirements.txt |  | ||||||
|  |  | ||||||
|  |  | ||||||
| ARG BRANCH=master SHA=571fb897edd58b714bb385dfaa1ad59aecef8bc7 |  | ||||||
| RUN --mount=type=cache,target=/root/.cache/pip \ |  | ||||||
|   cd stable-diffusion && \ |  | ||||||
|   git fetch && \ |  | ||||||
|   git checkout ${BRANCH} && \ |  | ||||||
|   git reset --hard ${SHA} && \ |  | ||||||
|   pip install -r requirements.txt |  | ||||||
|  |  | ||||||
| RUN --mount=type=cache,target=/root/.cache/pip pip install -U 'transformers>=4.24' |  | ||||||
|  |  | ||||||
| # add info |  | ||||||
| COPY . /docker/ |  | ||||||
| RUN python /docker/info.py /stable-diffusion/frontend/frontend.py && \ |  | ||||||
|   chmod +x /docker/mount.sh /docker/run.sh && \ |  | ||||||
|   # streamlit \ |  | ||||||
|   sed -i -- 's/8501/7860/g' /stable-diffusion/.streamlit/config.toml |  | ||||||
|  |  | ||||||
| WORKDIR /stable-diffusion |  | ||||||
| ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility |  | ||||||
| ENV NVIDIA_VISIBLE_DEVICES=all |  | ||||||
| ENV PYTHONPATH="${PYTHONPATH}:${PWD}" STREAMLIT_SERVER_HEADLESS=true USE_STREAMLIT=0 CLI_ARGS="" |  | ||||||
| EXPOSE 7860 |  | ||||||
|  |  | ||||||
| CMD /docker/mount.sh && /docker/run.sh |  | ||||||
| @@ -1,13 +0,0 @@ | |||||||
| import sys |  | ||||||
| from pathlib import Path |  | ||||||
|  |  | ||||||
| file = Path(sys.argv[1]) |  | ||||||
| file.write_text( |  | ||||||
|   file.read_text()\ |  | ||||||
|   .replace('<p>For help and advanced usage guides,', """ |  | ||||||
|   <p> |  | ||||||
|     Created using <a href="https://github.com/AbdBarho/stable-diffusion-webui-docker">stable-diffusion-webui-docker</a>. |  | ||||||
|   </p> |  | ||||||
|   <p>For help and advanced usage guides, |  | ||||||
| """, 1) |  | ||||||
| ) |  | ||||||
| @@ -1,32 +0,0 @@ | |||||||
| #!/bin/bash |  | ||||||
|  |  | ||||||
| set -Eeuo pipefail |  | ||||||
|  |  | ||||||
| declare -A MOUNTS |  | ||||||
|  |  | ||||||
| ROOT=/stable-diffusion/src |  | ||||||
|  |  | ||||||
| # cache |  | ||||||
| MOUNTS["/root/.cache"]=/data/.cache |  | ||||||
| # ui specific |  | ||||||
| MOUNTS["${PWD}/models/realesrgan"]=/data/RealESRGAN |  | ||||||
| MOUNTS["${PWD}/models/ldsr"]=/data/LDSR |  | ||||||
| MOUNTS["${PWD}/models/custom"]=/data/StableDiffusion |  | ||||||
|  |  | ||||||
| # hack |  | ||||||
| MOUNTS["${PWD}/models/gfpgan/GFPGANv1.3.pth"]=/data/GFPGAN/GFPGANv1.4.pth |  | ||||||
| MOUNTS["${PWD}/models/gfpgan/GFPGANv1.4.pth"]=/data/GFPGAN/GFPGANv1.4.pth |  | ||||||
| MOUNTS["${PWD}/gfpgan/weights"]=/data/.cache |  | ||||||
|  |  | ||||||
|  |  | ||||||
| for to_path in "${!MOUNTS[@]}"; do |  | ||||||
|   set -Eeuo pipefail |  | ||||||
|   from_path="${MOUNTS[${to_path}]}" |  | ||||||
|   rm -rf "${to_path}" |  | ||||||
|   mkdir -p "$(dirname "${to_path}")" |  | ||||||
|   ln -sT "${from_path}" "${to_path}" |  | ||||||
|   echo Mounted $(basename "${from_path}") |  | ||||||
| done |  | ||||||
|  |  | ||||||
| # streamlit config |  | ||||||
| ln -sf /docker/userconfig_streamlit.yaml /stable-diffusion/configs/webui/userconfig_streamlit.yaml |  | ||||||
| @@ -1,10 +0,0 @@ | |||||||
| #!/bin/bash |  | ||||||
|  |  | ||||||
| set -Eeuo pipefail |  | ||||||
|  |  | ||||||
| echo "USE_STREAMLIT = ${USE_STREAMLIT}" |  | ||||||
| if [ "${USE_STREAMLIT}" == "1" ]; then |  | ||||||
|   python -u -m streamlit run scripts/webui_streamlit.py |  | ||||||
| else |  | ||||||
|   python3 -u scripts/webui.py --outdir /output --ckpt /data/StableDiffusion/v1-5-pruned-emaonly.ckpt ${CLI_ARGS} |  | ||||||
| fi |  | ||||||
| @@ -1,11 +0,0 @@ | |||||||
| # https://github.com/Sygil-Dev/sygil-webui/blob/master/configs/webui/webui_streamlit.yaml |  | ||||||
| general: |  | ||||||
|   version: 1.24.6 |  | ||||||
|   outdir: /output |  | ||||||
|   default_model: "Stable Diffusion v1.5" |  | ||||||
|   default_model_path: /data/StableDiffusion/v1-5-pruned-emaonly.ckpt |  | ||||||
|   outdir_txt2img: /output/txt2img |  | ||||||
|   outdir_img2img: /output/img2img |  | ||||||
|   outdir_img2txt: /output/img2txt |  | ||||||
|   optimized: True |  | ||||||
|   optimized_turbo: True |  | ||||||
		Reference in New Issue
	
	Block a user