https://github.com/siutin/stable-diffusion-webui-docker
stable-diffusion-webui in docker
https://github.com/siutin/stable-diffusion-webui-docker
stable-diffusion stable-diffusion-webui
Last synced: 5 months ago
JSON representation
stable-diffusion-webui in docker
- Host: GitHub
- URL: https://github.com/siutin/stable-diffusion-webui-docker
- Owner: siutin
- Created: 2023-02-04T07:19:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T18:58:40.000Z (over 1 year ago)
- Last Synced: 2024-10-26T05:03:24.998Z (over 1 year ago)
- Topics: stable-diffusion, stable-diffusion-webui
- Homepage: https://hub.docker.com/r/siutin/stable-diffusion-webui-docker
- Size: 35.2 KB
- Stars: 104
- Watchers: 2
- Forks: 18
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stable Diffusion Webui Docker Image
### Compatibility and Breaking Changes
If you encounter issues that were not present before, please try switching to the following image versions:
```
siutin/stable-diffusion-webui-docker:latest-cuda-12.1.1
siutin/stable-diffusion-webui-docker:cuda-v1.10.1-2024-07-30
```
---
### Prepare the directory mapping in your host:
```
mkdir -p /MY-DATA-DIR && cd /MY-DATA-DIR
mkdir models outputs
sudo chown 10000:$UID -R models outputs
sudo chmod 775 -R models outputs
```
### Run with CUDA
```
# With the latest CUDA version
docker run -it --name sdw --gpus all --network host \
-v $(pwd)/models:/app/stable-diffusion-webui/models \
-v $(pwd)/outputs:/app/stable-diffusion-webui/outputs \
--rm siutin/stable-diffusion-webui-docker:latest-cuda \
bash webui.sh --share
# With specific CUDA version
docker run -it --name sdw --gpus all --network host \
-v $(pwd)/models:/app/stable-diffusion-webui/models \
-v $(pwd)/outputs:/app/stable-diffusion-webui/outputs \
--rm siutin/stable-diffusion-webui-docker:latest-cuda-12.6.2 \
bash webui.sh --share
```
### Run with CPU only
```
docker run -it --name sdw --network host \
-v $(pwd)/models:/app/stable-diffusion-webui/models \
-v $(pwd)/outputs:/app/stable-diffusion-webui/outputs \
--rm siutin/stable-diffusion-webui-docker:latest-cpu \
bash webui.sh --skip-torch-cuda-test --use-cpu all --share
```
### Build custom image
```
# Nvidia CUDA image
nvidia-docker buildx build -f Dockerfile.cuda \
--platform linux/amd64 \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg BUILD_VERSION=custom-cuda \
-t siutin/stable-diffusion-webui-docker:custom-cuda .
# Nvidia CUDA image with specific version
nvidia-docker buildx build -f Dockerfile.cuda \
--platform linux/amd64 \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg BUILD_VERSION=custom-cuda \
--build-arg CUDA_VERSION=12.5.1 \
-t siutin/stable-diffusion-webui-docker:custom-cuda-12.5 .
# CPU only image
docker buildx build -f Dockerfile.cpu \
--platform linux/arm64 \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg BUILD_VERSION=custom-cpu \
-t siutin/stable-diffusion-webui-docker:custom-cpu .
```
### Miscellaneous
```
# Check your current CUDA Driver API version
nvidia-smi -x -q |sed -n 's/.*\(.*\)<\/cuda_version>.*/\1/p'
```