Stable Diffusion including a web GUI (GUItard)
10K+
See Repository: https://github.com/Sharrnah/Stable-Diffusion-Docker
[wsl2]
memory=12GB # Limits VM memory in WSL 2 to X GB
processors=3 # Makes the WSL 2 VM use X virtual processors
localhostForwarding=true
You can play with the values if your PC can't handle it.
Install Docker Desktop for Windows
Make sure you are running the newest NVIDIA Drivers and newest Docker Desktop Version.
See https://docs.microsoft.com/en-us/windows/ai/directml/gpu-cuda-in-wsl for more information about WSL support.
(all newer Driver and Docker versions should support it out of the box.)
Test with:
wsl cat /proc/version
Needs kernel version of 5.10.43.3 or higher.
Run
wsl --update
to update the kernel.
Build image yourself with:
docker build -t stable-diffusion-guitard .
Run prebuild image with:
docker run -d --gpus all -p 7860:8080 -v ./.cache/app:/root/.cache -v ./.cache/facexlib/:/app/src/facexlib/facexlib/weights/ -v ./.cache/gfpgan/:/app/gfpgan/weights/ -v ./models/:/models/ -v ./outputs/:/outputs/ -e RUN_MODE=false sharrnah/stable-diffusion-guitard
(replace "sharrnah/stable-diffusion-guitard" image name with "stable-diffusion-guitard" to run self-build image)
change "RUN_MODE" depending on your machine. (see Options for more info)
Download / Clone this repo.
(Or just get the docker-compose.yaml file if you want to use the prebuild image and ignore "build image yourself" step.)
Start docker-compose project.
docker compose -f docker-compose.build.yaml up -d --build
docker compose up -d
See current logs with:
docker compose logs stablediffusion -f
You can exec into the container with:
docker compose exec stablediffusion bash
OPTIMIZED" For reduced Memory mode (sacrificing speed)OPTIMIZED-TURBO" For lesser reduced Memory mode (sacrificing less speed)GTX16" When generated images are green (known problem on GTX 16xx GPUs)GTX16-TURBO" When generated images are green (known problem on GTX 16xx GPUs) [using OPTIMIZED-TURBO]FULL-PRECISION" use full precisiontrue" (default) For automatic restarting of the WebUIfalse" Disables automatic restarting of the WebUItrue" To clone and install Textual Inversion (Breaks Latent Diffusion SR!!!)false" (default) does not clone Textual Inversion on startupFor that you can create a .env file and set the content to
RUN_MODE=OPTIMIZED
or
RUN_MODE=GTX16
(See example.env file including all possible values)
after the webgui started successfully you should see a log output telling
Running on local URL: http://127.0.0.1:7860/
See current log with:
docker compose logs stablediffusion -f
Open http://127.0.0.1:7860/ in your Browser to use it.
All generated images are saved into the ./outputs/ directory.
Find some nice example prompts here:
Models should be downloaded automatically on first run now!
| Model | Function | Version | Size | Local Location (Case-Sensitive!) | Download Source |
|---|---|---|---|---|---|
| Stable Diffusion | Image Generation | v1.4 | ~4 GB | models/SDv1.4.ckpt | Web: https://drive.yerf.org/wl/?id=EBfTrmcCCUAGaQBXVIj5lJmEhjoP1tgl https://www.googleapis.com/storage/v1/b/aai-blog-files/o/sd-v1-4.ckpt?alt=media Torrent Magnet: magnet:?xt=urn:btih:3a4a612d75ed088ea542acac52f9f45987488d1c&dn=sd-v1-4.ckpt&tr=udp%3a%2f%2ftracker.openbittorrent.com%3a6969%2fannounce&tr=udp%3a%2f%2ftracker.opentrackr.org%3a1337Hugging Face: https://huggingface.co/CompVis/stable-diffusion-v1-4 |
| GFPGAN | Face Correction | v1.3.0 | 332 MB | models/GFPGANv1.3.pth | Web: https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth |
| RealESRGAN | Upscaling | v0.1.0 | ~64 MB | models/RealESRGAN_x4plus.pth | Web: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth |
| RealESRGAN anime | Upscaling Anime | v0.2.2.4 | ~17 MB | models/RealESRGAN_x4plus_anime_6B.pth | Web: https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth |
| Latent Diffusion | Upscaling, Inpainting | July 2022 | ~2 GB | models/LDSR.ckpt | Web: https://heibox.uni-heidelberg.de/f/578df07c8fc04ffbadf3/?dl=1 |
Content type
Image
Digest
sha256:79702f1e7…
Size
7.2 GB
Last updated
about 4 years ago
docker pull sharrnah/stable-diffusion-guitard