mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-04-06 15:04:26 +00:00
CUDA support, updated ComfyUI to support SD3, updated readme
This commit is contained in:
parent
034c98b50f
commit
7d54b08162
20 changed files with 1408 additions and 56 deletions
23
services/comfy-cuda/Dockerfile
Normal file
23
services/comfy-cuda/Dockerfile
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1
|
||||
|
||||
RUN apt-get update && apt-get install -y git cargo nasm && apt-get clean
|
||||
|
||||
ENV ROOT=/stable-diffusion
|
||||
RUN --mount=type=cache,target=/root/.cache/pip,Z \
|
||||
git clone --recursive https://github.com/comfyanonymous/ComfyUI.git ${ROOT} && \
|
||||
cd ${ROOT} && \
|
||||
git checkout master && \
|
||||
git reset --hard 5eb98f00927ace00b6b3d01ed9c76b113fc4ec9f && \
|
||||
pip install -r requirements.txt
|
||||
|
||||
WORKDIR ${ROOT}
|
||||
COPY . /docker/
|
||||
RUN chmod u+x /docker/entrypoint.sh && cp /docker/extra_model_paths.yaml ${ROOT}
|
||||
|
||||
ENV NVIDIA_VISIBLE_DEVICES=all PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS=""
|
||||
ENV PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS=""
|
||||
EXPOSE 7860
|
||||
ENTRYPOINT ["/docker/entrypoint.sh"]
|
||||
CMD python -u main.py --listen --port 7860 ${CLI_ARGS}
|
||||
41
services/comfy-cuda/entrypoint.sh
Executable file
41
services/comfy-cuda/entrypoint.sh
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -Eeuo pipefail
|
||||
|
||||
mkdir -vp /data/config/comfy/custom_nodes
|
||||
|
||||
declare -A MOUNTS
|
||||
|
||||
MOUNTS["/root/.cache"]="/data/.cache"
|
||||
MOUNTS["${ROOT}/input"]="/data/config/comfy/input"
|
||||
MOUNTS["${ROOT}/custom_nodes"]="/data/config/comfy/custom_nodes"
|
||||
MOUNTS["${ROOT}/my_workflows"]="/data/config/comfy/my_workflows"
|
||||
MOUNTS["${ROOT}/output"]="/output/comfy"
|
||||
|
||||
for to_path in "${!MOUNTS[@]}"; do
|
||||
set -Eeuo pipefail
|
||||
from_path="${MOUNTS[${to_path}]}"
|
||||
rm -rf "${to_path}"
|
||||
if [ ! -f "$from_path" ]; then
|
||||
mkdir -vp "$from_path"
|
||||
fi
|
||||
mkdir -vp "$(dirname "${to_path}")"
|
||||
ln -sT "${from_path}" "${to_path}"
|
||||
echo Mounted $(basename "${from_path}")
|
||||
done
|
||||
|
||||
if [ -z "$(ls -A /data/config/comfy/custom_nodes/ComfyUI_UltimateSDUpscale)" ]; then
|
||||
git -C /data/config/comfy/custom_nodes clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale --recursive
|
||||
fi
|
||||
|
||||
if [ -z "$(ls -A /data/config/comfy/custom_nodes/comfyui-workspace-manager)" ]; then
|
||||
git -C /data/config/comfy/custom_nodes clone https://github.com/11cafe/comfyui-workspace-manager.git
|
||||
fi
|
||||
|
||||
if [ -f "/data/config/comfy/startup.sh" ]; then
|
||||
pushd ${ROOT}
|
||||
. /data/config/comfy/startup.sh
|
||||
popd
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
25
services/comfy-cuda/extra_model_paths.yaml
Normal file
25
services/comfy-cuda/extra_model_paths.yaml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
a111:
|
||||
base_path: /data
|
||||
|
||||
checkpoints: models/Stable-diffusion
|
||||
configs: models/Stable-diffusion
|
||||
vae: models/VAE
|
||||
loras: models/Lora
|
||||
upscale_models: |
|
||||
models/RealESRGAN
|
||||
models/ESRGAN
|
||||
models/SwinIR
|
||||
models/GFPGAN
|
||||
hypernetworks: models/hypernetworks
|
||||
controlnet: models/ControlNet
|
||||
gligen: models/GLIGEN
|
||||
clip: models/CLIPEncoder
|
||||
embeddings: embeddings
|
||||
|
||||
custom_nodes: config/comfy/custom_nodes
|
||||
|
||||
# TODO: I am unsure about these, need more testing
|
||||
# style_models: config/comfy/style_models
|
||||
# t2i_adapter: config/comfy/t2i_adapter
|
||||
# clip_vision: config/comfy/clip_vision
|
||||
# diffusers: config/comfy/diffusers
|
||||
Loading…
Add table
Add a link
Reference in a new issue