Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
18fb90e
First pass at getting Fooocus working
digitallamb Dec 31, 2023
77cfe49
Adding mount points to shared models
digitallamb Dec 31, 2023
74813d5
Updated readme
digitallamb Dec 31, 2023
0561547
Merge branch 'master' into adding_fooocus
digitallamb Dec 31, 2023
ff6e3d6
Adding mount for wildcard functionality
digitallamb Jan 2, 2024
4f0e684
Merge branch 'master' into adding_fooocus
digitallamb Jan 2, 2024
89e258d
Merge branch 'adding_fooocus' of github.com:digitallamb/stable-diffus…
digitallamb Jan 2, 2024
6168e38
Merge branch 'master' into adding_fooocus
digitallamb Apr 11, 2024
cfc373d
Version bump, fooocus 2.3.1
digitallamb Apr 11, 2024
5a8e6dc
Merge branch 'adding_fooocus' of github.com:digitallamb/stable-diffus…
digitallamb Apr 11, 2024
e9fa4e6
add forge support
au70ma70n Aug 22, 2024
f859c3b
Fix forge in compose
au70ma70n Aug 23, 2024
3ed0a6a
updates
simonmcnair Jan 16, 2025
276f417
updates
simonmcnair Jan 16, 2025
67cde0b
Merge remote-tracking branch 'upstream/pr/635'
simonmcnair Jan 16, 2025
3367764
Update README.md
simonmcnair Jan 16, 2025
015f531
Update README.md
simonmcnair Jan 16, 2025
20b593f
huggingface_guess was in incorrect location
simonmcnair Jan 20, 2025
ae30d6b
Update Dockerfile
simonmcnair Jan 20, 2025
9e86d3e
Update Dockerfile
simonmcnair Jan 20, 2025
5612710
Update Dockerfile
simonmcnair Jan 20, 2025
8619e74
Update Dockerfile
simonmcnair Jan 20, 2025
bf55e21
Update entrypoint.sh
simonmcnair Feb 10, 2025
1fa117f
Update Dockerfile
simonmcnair Feb 10, 2025
cc08ed6
Update Dockerfile
simonmcnair Mar 10, 2025
b52f5c6
Update entrypoint.sh
simonmcnair Mar 10, 2025
66a1490
Update entrypoint.sh
simonmcnair Mar 10, 2025
b642d3a
Update Dockerfile
simonmcnair Mar 10, 2025
18709fa
Update docker-compose.yml
simonmcnair Mar 10, 2025
fe5caa9
Discard changes to docker-compose.yml
simonmcnair Mar 10, 2025
d53e2dd
Merge pull request #2 from simonmcnair/non_ROOT
simonmcnair Mar 10, 2025
2688923
Update Dockerfile
simonmcnair Mar 10, 2025
c1c52f5
Update entrypoint.sh
simonmcnair Mar 10, 2025
3210469
Update Dockerfile
simonmcnair Mar 10, 2025
dd08166
Update Dockerfile
simonmcnair Mar 10, 2025
dd4791c
Update Dockerfile
simonmcnair Mar 10, 2025
b336cbc
Update Dockerfile
simonmcnair Mar 10, 2025
40e1e81
Update entrypoint.sh
simonmcnair Mar 10, 2025
8c36494
Update Dockerfile
simonmcnair Mar 10, 2025
d5af001
Update Dockerfile
simonmcnair Mar 10, 2025
cdbfb4e
Merge pull request #3 from simonmcnair/comfy-no_root
simonmcnair Mar 10, 2025
1e34142
Update Dockerfile
simonmcnair Mar 10, 2025
d2ec770
Update Dockerfile
simonmcnair Mar 10, 2025
7e35f13
Update Dockerfile
simonmcnair Mar 10, 2025
04a09cb
Update entrypoint.sh
simonmcnair Mar 10, 2025
658ac33
Update Dockerfile
simonmcnair Mar 10, 2025
8efc56d
Update Dockerfile
simonmcnair Mar 10, 2025
4bd3e0b
Update Dockerfile
simonmcnair Mar 10, 2025
07fc053
Update Dockerfile
simonmcnair Mar 10, 2025
6030daa
Update docker-compose.yml
simonmcnair Mar 10, 2025
7a1a86e
Update Dockerfile
simonmcnair Mar 10, 2025
48955a1
Update Dockerfile
simonmcnair Mar 10, 2025
317055f
Update Dockerfile
simonmcnair Mar 10, 2025
7606b12
Update Dockerfile
simonmcnair Mar 10, 2025
0f94b77
Update Dockerfile
simonmcnair Mar 10, 2025
afcef58
Update docker.yml
simonmcnair Mar 10, 2025
3e25d0a
Update Dockerfile
simonmcnair Mar 10, 2025
f4d803a
Update docker.yml
simonmcnair Mar 10, 2025
85ffaee
Update docker.yml
simonmcnair Mar 10, 2025
5b81363
Update docker.yml
simonmcnair Mar 10, 2025
8f74cec
Update Dockerfile
simonmcnair Mar 10, 2025
c5c5b2b
Update Dockerfile
simonmcnair Mar 10, 2025
bfd834d
Update Dockerfile
simonmcnair Mar 10, 2025
5656458
Update Dockerfile
simonmcnair Mar 10, 2025
039559e
add reforge
simonmcnair Mar 24, 2025
712953b
Merge branch 'master' of github.com:simonmcnair/stable-diffusion-webu…
simonmcnair Mar 24, 2025
b5ebd4c
add reforge
simonmcnair Mar 24, 2025
d32b186
Update docker-compose.yml
simonmcnair Mar 24, 2025
bd2fcce
try and fix error
simonmcnair Mar 24, 2025
db36a12
Update Dockerfile
simonmcnair Mar 24, 2025
d92e9ab
set pydantic
simonmcnair Mar 24, 2025
0cf468b
oops
simonmcnair Mar 24, 2025
9a73fad
Update Dockerfile
simonmcnair Mar 24, 2025
53153c6
Update Dockerfile
simonmcnair Mar 24, 2025
8fe07a1
Update Dockerfile
simonmcnair Mar 24, 2025
c417634
Update Dockerfile
simonmcnair Mar 24, 2025
fe62a0f
Update Dockerfile
simonmcnair Mar 24, 2025
a740f9d
Update Dockerfile
simonmcnair Mar 24, 2025
9a36d6b
Update Dockerfile
simonmcnair Mar 24, 2025
3db97c9
Update Dockerfile
simonmcnair Mar 24, 2025
9a9111d
Update README.md
simonmcnair Mar 24, 2025
894b877
Update Dockerfile
simonmcnair Apr 8, 2025
d6d46fc
Update Dockerfile
simonmcnair Apr 8, 2025
f3df34b
Update docker-compose.yml
simonmcnair Apr 8, 2025
8b6b82e
Create Dockerfile.rocm
simonmcnair Apr 8, 2025
c40d415
Update Dockerfile
simonmcnair Apr 8, 2025
f1eed95
Update Dockerfile
simonmcnair Apr 9, 2025
17f1c0c
Create Docker-compose-build.yml
simonmcnair Apr 9, 2025
c0e97d1
Update docker-compose.yml
simonmcnair Apr 9, 2025
45dd1dd
Update docker.yml
simonmcnair Apr 9, 2025
72ffe45
Update docker-compose.yml
simonmcnair Apr 9, 2025
70858ae
Update docker-compose.yml
simonmcnair Apr 9, 2025
657ad99
fix docker-compose.yml
ExtraTNT Apr 10, 2025
087b5bf
Merge pull request #5 from ExtraTNT/patch-1
simonmcnair Apr 14, 2025
b959dcf
Update Dockerfile
simonmcnair May 5, 2025
eed0ad0
Update entrypoint.sh
simonmcnair May 5, 2025
6615a2c
Update Docker-compose-build.yml
simonmcnair May 7, 2025
d5fe95f
Update Dockerfile.rocm
simonmcnair May 7, 2025
e30123a
Update Dockerfile.rocm
simonmcnair May 7, 2025
a024ec1
Update Dockerfile.rocm
simonmcnair May 7, 2025
18ad18c
Update Dockerfile
simonmcnair May 7, 2025
d72392c
Update docker.yml
simonmcnair May 8, 2025
ab47d2c
Update
fapoverflow Jul 7, 2025
8e5ac35
Merge pull request #1 from fapoverflow/fix/docker
fapoverflow Jul 7, 2025
b4941ea
Upgrade comfyui versions & add convert_2_safetensors service
fapoverflow Jul 18, 2025
68afd2b
Add swarmui
fapoverflow Jul 31, 2025
f7f2d90
Merge remote-tracking branch 'refs/remotes/upstream/master' into merge
fapoverflow Aug 2, 2025
94aa949
Update docker compose
fapoverflow Aug 2, 2025
99928ec
Update comfyui, add comfyui manager to swarmui, TODOs
fapoverflow Aug 19, 2025
01f26a3
Update comfyui & pre-install requirements
fapoverflow Aug 25, 2025
1e1c593
Update swarmui & comfyui, pre-install custom nodes requirements for s…
fapoverflow Sep 4, 2025
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
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.devscripts
.github
.vscode
.idea
.editorconfig
.gitattributes
.gitignore
*.md
docs
data
output
66 changes: 60 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,66 @@ jobs:
build:
strategy:
matrix:
profile:
- auto
- comfy
- download
include:
- image: simonmcnair/AUTOMATIC1111
dockerfile: services/AUTOMATIC1111/Dockerfile
context: services/AUTOMATIC1111/

# - image: simonmcnair/AUTOMATIC1111-rocm
# dockerfile: services/AUTOMATIC1111/Dockerfile.rocm
# context: services/AUTOMATIC1111/

- image: simonmcnair/comfy
dockerfile: services/comfy/Dockerfile
context: services/comfy/

- image: simonmcnair/download
dockerfile: services/download/Dockerfile
context: services/download/

- image: simonmcnair/fooocus
dockerfile: services/fooocus/Dockerfile
context: services/fooocus/

- image: simonmcnair/forge
dockerfile: services/forge/Dockerfile
context: services/forge/

- image: simonmcnair/reforge
dockerfile: services/reforge/Dockerfile
context: services/reforge/

runs-on: ubuntu-latest
name: ${{ matrix.profile }}
steps:
- uses: actions/checkout@v3
- run: docker compose --profile ${{ matrix.profile }} build --progress plain
# - uses: actions/checkout@v3
# - run: docker compose --profile ${{ matrix.profile }} build --progress plain

- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ matrix.image }}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: true
#This is needed because it is called main instead of master to get the latest tag in docker
# tags: |
# set latest tag for default branch
# type=raw,value=latest,enable={{is_default_branch}}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
# VSCode specific
*.code-workspace
/.vscode
.idea
TODO.md
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
I have forked this as AbdBarho hasn't been around for a while. I'm not great with git, Linux , docker or stable diffusion but I manage to get along a bit. Slowly. with more commits than it takes.

I am happy to look at PR's as and when. Also happy to pass this back, as and whe, and if, they return.

supports:
- AUTOMATIC1111
- comfy
- fooocus
- forge
- reforge
- swarmui _**(be aware comfyui backend can take some time to start, up to a minute or 2)**_

#### TODOs
1. [ ] Fix [Warning] [ComfyUI-0/STDERR] NameError: name 'NODE_CLASS_MAPPINGS' is not defined

# Stable Diffusion WebUI Docker

Run Stable Diffusion on your machine with a nice UI without any hassle!
Expand Down Expand Up @@ -26,6 +41,14 @@ This repository provides multiple UIs for you to play around with stable diffusi
| -------------------------------------------------------------------------------- |
| ![](https://github.com/comfyanonymous/ComfyUI/raw/master/comfyui_screenshot.png) |

### [Fooocus](https://github.com/comfyanonymous/ComfyUI)

[Full feature list here](https://github.com/lllyasviel/Fooocus#fooocus), Screenshot:

| Simplified UI |
| -------------------------------------------------------------------------------- |
| ![](https://github.com/lllyasviel/Fooocus/assets/19834515/483fb86d-c9a2-4c20-997c-46dafc124f25) |

## Contributing

Contributions are welcome! **Create a discussion first of what the problem is and what you want to contribute (before you implement anything)**
Expand Down
6 changes: 2 additions & 4 deletions data/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
/.cache
/config
/embeddings
/models
/*
!/.gitignore
127 changes: 114 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,33 @@
x-base_service: &base_service
ports:
- "${WEBUI_PORT:-7860}:7860"
volumes:
- &v1 ./data:/data
- &v2 ./output:/output
stop_signal: SIGKILL
tty: true
restart: unless-stopped
deploy:
resources:
# limits:
# cpus: 8
# memory: 48G
reservations:
# cpus: 4
# memory: 24G
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [compute, utility]
capabilities: [compute, utility, gpu]

x-defaults: &defaults
<<: *base_service
ports:
- "${WEBUI_PORT:-7860}:7860"
volumes:
- &v1 ./data:/data
- &v2 ./output:/output

x-auto_service: &auto_service
<<: *defaults
container_name: auto
build: ./services/AUTOMATIC1111
image: sd-auto:78

name: webui-docker

Expand All @@ -23,33 +38,119 @@ services:
volumes:
- *v1

auto: &automatic
<<: *base_service
auto:
<<: *auto_service
profiles: ["auto"]
build: ./services/AUTOMATIC1111
image: sd-auto:78
environment:
- CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api

auto-cpu:
<<: *automatic
<<: *auto_service
profiles: ["auto-cpu"]
deploy: {}
environment:
- CLI_ARGS=--no-half --precision full --allow-code --enable-insecure-extension-access --api

auto-full:
<<: *auto_service
profiles: [ "full" ]
environment:
- CLI_ARGS=--allow-code --xformers --enable-insecure-extension-access --no-half-vae --api

auto-rocm:
<<: *auto_service
profiles: ["auto-rocm"]
container_name: auto-rocm
build:
context: ./services/AUTOMATIC1111
dockerfile: ROCM.dockerfile
devices:
- "/dev/kfd"
- "/dev/dri"
deploy: {}
environment:
- CLI_ARGS=--allow-code --medvram --enable-insecure-extension-access --api

comfy: &comfy
<<: *base_service
profiles: ["comfy"]
build: ./services/comfy/
container_name: comfy
build: ./services/comfy
image: sd-comfy:7
volumes:
- ./data/models:/opt/comfyui/models
- ./data/models/configs:/opt/comfyui/user/default/
- ./data/config/comfy/custom_nodes:/opt/comfyui/custom_nodes
- ./output/comfy:/opt/comfyui/output
ports:
- "${COMFYUI_PORT:-7861}:7861"
environment:
- COMFYUI_PATH=/opt/comfyui
- COMFYUI_MODEL_PATH=/opt/comfyui/models
- CLI_ARGS=

# - TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD=1

comfy-cpu:
<<: *comfy
profiles: ["comfy-cpu"]
deploy: {}
ports:
- "${COMFYUI_PORT:-7861}:7861"
environment:
- CLI_ARGS=--cpu

swarmui:
<<: *base_service
profiles: ["swarmui"]
container_name: swarmui
build: ./services/swarmui
image: sd-swarmui
ports:
- "${SWARMUI_PORT:-7801}:7801"
volumes:
- ./data/swarmui:/SwarmUI/Data
- ./data/models:/SwarmUI/Models
- ./data/embeddings:/SwarmUI/Models/Embeddings
# comfyui
- ./data/config/comfy/custom_nodes:/SwarmUI/dlbackend/ComfyUI/custom_nodes
# - ./data/models/configs:/SwarmUI/dlbackend/ComfyUI/user/default/ # TODO rm old
- ./data/config/configs:/SwarmUI/dlbackend/ComfyUI/user/default/
# output
- ./output/swarmui:/SwarmUI/Output
- ./output/swarmui/comfy:/SwarmUI/dlbackend/ComfyUI/output
environment:
- COMFYUI_PATH=/opt/comfyui
- COMFYUI_MODEL_PATH=/opt/comfyui/models

reforge: &reforge
<<: *base_service
profiles: ["reforge"]
build: ./services/reforge
image: sd-reforge:80
environment:
- CLI_ARGS=--allow-code --xformers --enable-insecure-extension-access --api --pin-shared-memory --cuda-malloc --cuda-stream

forge: &forge
<<: *base_service
profiles: ["forge"]
build: ./services/forge
image: sd-forge:80
environment:
- CLI_ARGS=--allow-code --xformers --enable-insecure-extension-access --api --pin-shared-memory --cuda-malloc --cuda-stream

fooocus: &fooocus
<<: *base_service
profiles: ["fooocus"]
build: ./services/fooocus/
image: sd-fooocus:3
environment:
- CLI_ARGS=

# TODO rm old
# convertor:
# <<: *base_service
# profiles: [ "convert" ]
# build: ./services/convert2safetensors
# image: sd-convert
# volumes:
# - ./data/convert:/opt/convert2safetensors/models
72 changes: 72 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# General

Unfortunately, AMD GPUs [#63](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/63) and MacOs [#35](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/35) are not supported, contributions to add support are very welcome.

## `auto` exists with error code 137

This is an indicator that the container does not have enough RAM, you need at least 12GB, recommended 16GB.

You might need to [adjust the size of the docker virtual machine RAM](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/296#issuecomment-1480318829) depending on your OS.

## Dockerfile parse error
```
Error response from daemon: dockerfile parse error line 33: unknown instruction: GIT
ERROR: Service 'model' failed to build : Build failed
```
Update docker to the latest version, and make sure you are using `docker compose` instead of `docker-compose`. [#16](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/16), also, try setting the environment variable `DOCKER_BUILDKIT=1`

## Unknown Flag `--profile`

Update docker to the latest version, and see [this comment](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/165#issuecomment-1296155667), try setting the environment variable mentioned in the previous point.

## Output is a always green image
use `--precision full --no-half`. [#9](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/9)


## Found no NVIDIA driver on your system even though the drivers are installed and `nvidia-smi` shows it

add `NVIDIA_DRIVER_CAPABILITIES=compute,utility` and `NVIDIA_VISIBLE_DEVICES=all` to container can resolve this problem [#348](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/348#issuecomment-1449250332)


---

# Linux

### Error response from daemon: could not select device driver "nvidia" with capabilities: `[[gpu]]`

Install [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) and restart the docker service [#81](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/81)


### `docker compose --profile auto up --build` fails with `OSError`

This might be related to the `overlay2` storage driver used by docker overlayed on zfs, change to the `zfs` storage driver [#433](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/433#issuecomment-1694520689)

---

# Windows / WSL


## Build fails at [The Shell command](https://github.com/AbdBarho/stable-diffusion-webui-docker/blob/5af482ed8c975df6aa0210225ad68b218d4f61da/build/Dockerfile#L11), `/bin/bash` not found in WSL.

Edit the corresponding docker file, and change the SHELL from `/bin/bash` to `//bin/bash` [#21](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/21), note: this is a hack and something in your wsl is messed up.


## Build fails with credentials errors when logged in via SSH on WSL2/Windows
You can try forcing plain text auth creds storage by removing line with "credStore" from ~/.docker/config.json (in WSL). [#56](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/56)

## `unable to access 'https://github.com/...': Could not resolve host: github.com` or any domain
Set the `build/network` of the service you are starting to `host` [#114](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/114#issue-1393683083)

## Other build errors on windows
* Make sure:
* Windows 10 release >= 2021H2 (required for WSL to see the GPU)
* WSL2 (check with `wsl -l -v`)
* Latest Docker Desktop
* You might need to create a [`.wslconfig`](https://docs.microsoft.com/en-us/windows/wsl/wsl-config#example-wslconfig-file) and increase memory, if you have 16GB RAM, set the limit to something around 12GB, [#34](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/34) [#64](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/64)
* You might also need to [force wsl to allow file permissions](https://superuser.com/a/1646556)

---

# AWS

You have to use one of AWS's GPU-enabled VMs and their Deep Learning OS images. These have the right divers, the toolkit and all the rest already installed and optimized. [#70](https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/70)
1 change: 1 addition & 0 deletions docs/Home.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Welcome to the stable-diffusion-webui-docker wiki!
Loading