mirror of
				https://github.com/AbdBarho/stable-diffusion-webui-docker.git
				synced 2025-10-31 02:03:32 -04:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 89d8a17064 | ||
|  | 05829c5ae3 | ||
|  | 66c0658255 | 
| @@ -13,13 +13,15 @@ RUN apt-get update && apt install fonts-dejavu-core && apt-get clean | |||||||
|  |  | ||||||
| # Note: don't update the sha of previous versions because the install will take forever | # Note: don't update the sha of previous versions because the install will take forever | ||||||
| # instead, update the repo state in a later step | # instead, update the repo state in a later step | ||||||
| RUN cd stable-diffusion && git pull && git reset --hard ac31d943ce0c99b7dd4df7e6cb1c14f2e275ca96 && \ | RUN cd stable-diffusion && git pull && git reset --hard f3ab556a0c25389cf76f82e63073054e32313829 && \ | ||||||
|   conda env update --file environment.yaml --name base && conda clean -a -y |   conda env update --file environment.yaml --name base && conda clean -a -y | ||||||
|  |  | ||||||
| # download dev UI version, update the sha below in case you want some other version | # download dev UI version, update the sha below in case you want some other version | ||||||
| RUN git clone https://github.com/hlky/stable-diffusion-webui.git && cd stable-diffusion-webui && \ | RUN git clone https://github.com/hlky/stable-diffusion-webui.git && cd stable-diffusion-webui && \ | ||||||
|   git reset --hard 244f945c40b8dec3fd1faf8824b99abeb3bc4b97 && \ |   git reset --hard 083ffd9ad83d196100fd4b8edfa82c9378546327 && \ | ||||||
|   cp -t /stable-diffusion/scripts/ txt2img.yaml webui.py webui.yaml webui_playground.py && \ |   cp -t /stable-diffusion/scripts/ txt2img.yaml webui.py webui.yaml webui_playground.py relauncher.py && \ | ||||||
|  |   cd frontend && \ | ||||||
|  |   cp -t /stable-diffusion/frontend/ __init__.py css_and_js.py frontend.py ui_functions.py && \ | ||||||
|   cd / && rm -rf stable-diffusion-webui |   cd / && rm -rf stable-diffusion-webui | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -30,16 +32,22 @@ RUN git clone https://github.com/hlky/stable-diffusion-webui.git && cd stable-di | |||||||
| #   cd / && rm -rf stable-diffusion-webui | #   cd / && rm -rf stable-diffusion-webui | ||||||
|  |  | ||||||
|  |  | ||||||
| WORKDIR /stable-diffusion | # add info | ||||||
| ENV TRANSFORMERS_CACHE=/cache/transformers TORCH_HOME=/cache/torch CLI_ARGS="" |  | ||||||
| EXPOSE 7860 |  | ||||||
| COPY info.py /info.py | COPY info.py /info.py | ||||||
|  | RUN  python /info.py /stable-diffusion/frontend/frontend.py | ||||||
|  |  | ||||||
|  | WORKDIR /stable-diffusion | ||||||
|  | ENV TRANSFORMERS_CACHE=/cache/transformers TORCH_HOME=/cache/torch CLI_ARGS="" \ | ||||||
|  |   GFPGAN_PATH=/stable-diffusion/src/gfpgan/experiments/pretrained_models/GFPGANv1.3.pth \ | ||||||
|  |   RealESRGAN_PATH=/stable-diffusion/src/realesrgan/experiments/pretrained_models/RealESRGAN_x4plus.pth \ | ||||||
|  |   RealESRGAN_ANIME_PATH=/stable-diffusion/src/realesrgan/experiments/pretrained_models/RealESRGAN_x4plus_anime_6B.pth | ||||||
|  | EXPOSE 7860 | ||||||
| CMD \ | CMD \ | ||||||
|   python /info.py scripts/webui.py && \ |   (test -f /models/GFPGANv1.3.pth && ln -sf /models/GFPGANv1.3.pth "${GFPGAN_PATH}" && echo "Mounted GFPGAN"); \ | ||||||
|   ln -sf /models/GFPGANv1.3.pth   /stable-diffusion/src/gfpgan/experiments/pretrained_models/GFPGANv1.3.pth && \ |   (test -f /models/RealESRGAN_x4plus.pth && ln -sf /models/RealESRGAN_x4plus.pth "${RealESRGAN_PATH}" && echo "Mounted RealESRGAN");\ | ||||||
|   ln -sf /models/RealESRGAN_x4plus.pth   /stable-diffusion/src/realesrgan/experiments/pretrained_models/RealESRGAN_x4plus.pth && \ |   (test -f /models/RealESRGAN_x4plus_anime_6B.pth && ln -sf /models/RealESRGAN_x4plus_anime_6B.pth "${RealESRGAN_ANIME_PATH}" && echo "Mounted RealESRGAN_ANIME"); \ | ||||||
|   # force facexlib cache |   # force facexlib cache | ||||||
|   mkdir -p /cache/weights/ && rm -rf /opt/conda/lib/python3.8/site-packages/facexlib/weights && \ |   mkdir -p /cache/weights/ && rm -rf /opt/conda/lib/python3.8/site-packages/facexlib/weights && \ | ||||||
|   ln -sf  /cache/weights/ /opt/conda/lib/python3.8/site-packages/facexlib/ && \ |   ln -sf  /cache/weights/ /opt/conda/lib/python3.8/site-packages/facexlib/ && \ | ||||||
|   # run, -u to not buffer stdout / stderr |   # run, -u to not buffer stdout / stderr | ||||||
|   python3 -u scripts/webui.py --outdir /output --save-metadata --ckpt /models/model.ckpt ${CLI_ARGS} |   python3 -u scripts/webui.py --outdir /output --ckpt /models/model.ckpt --save-metadata ${CLI_ARGS} | ||||||
|   | |||||||
| @@ -8,5 +8,5 @@ file.write_text( | |||||||
|     Created using <a href="https://github.com/AbdBarho/stable-diffusion-webui-docker">stable-diffusion-webui-docker</a>. |     Created using <a href="https://github.com/AbdBarho/stable-diffusion-webui-docker">stable-diffusion-webui-docker</a>. | ||||||
|   </p> |   </p> | ||||||
|   <p>For help and advanced usage guides, |   <p>For help and advanced usage guides, | ||||||
| """) | """, 1) | ||||||
| ) | ) | ||||||
		Reference in New Issue
	
	Block a user