Skip to content

Commit

Permalink
added docker updates
Browse files Browse the repository at this point in the history
  • Loading branch information
the-dusky committed Dec 12, 2024
1 parent 6ca416e commit f9dc2e5
Show file tree
Hide file tree
Showing 54 changed files with 764 additions and 32 deletions.
45 changes: 35 additions & 10 deletions Components/txt2img-comfy/form.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
[
[
{
"id": "model",
"name": "Model",
"type": "select",
"default": "sd_xl_base_1.0_0.9vae.safetensors",
"conf_file": "sd_models.json",
"display": true,
"group": "main"
"group": [
"basic",
"main",
"advanced"
]
},
{
"id": "prompt",
"name": "Prompt",
"type": "prompt_editor",
"default": "",
"display": true,
"group": "main"
"group": [
"basic",
"main",
"advanced"
]
},
{
"id": "negative_prompt",
"name": "Negative Prompt",
"type": "prompt_editor",
"default": "",
"display": true,
"group": "main"
"group": [
"advanced"
]
},
{
"id": "width",
Expand All @@ -35,7 +45,10 @@
"step": 64
},
"display": true,
"group": "main"
"group": [
"main",
"advanced"
]
},
{
"id": "height",
Expand All @@ -48,7 +61,10 @@
"step": 64
},
"display": true,
"group": "main"
"group": [
"main",
"advanced"
]
},
{
"id": "steps",
Expand All @@ -61,7 +77,10 @@
"step": 1
},
"display": true,
"group": "main"
"group": [
"main",
"advanced"
]
},
{
"id": "sampler",
Expand All @@ -70,7 +89,9 @@
"default": "euler_ancestral",
"conf_file": "samplers.json",
"display": true,
"group": "advanced"
"group": [
"advanced"
]
},
{
"id": "scheduler",
Expand All @@ -79,7 +100,9 @@
"default": "normal",
"conf_file": "schedulers.json",
"display": true,
"group": "advanced"
"group": [
"advanced"
]
},
{
"id": "cfg",
Expand All @@ -92,6 +115,8 @@
"step": 0.01
},
"display": true,
"group": "advanced"
"group": [
"advanced"
]
}
]
3 changes: 1 addition & 2 deletions Components/txt2img-comfy/inputs.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
"5": {
"width": {
"value": "width",
"is_required": false,
"default": 1024
"is_required": true
},
"height": {
"value": "height",
Expand Down
26 changes: 16 additions & 10 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM pytorch/pytorch:latest
# Setup a server ready to accept component requests
# Use ubuntu user, not root
# Use a venv for ComfyUI

FROM pytorch/pytorch:latest AS start

# ARG DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1

Expand All @@ -21,18 +25,14 @@ RUN service ssh restart
RUN sudo cp /etc/sudoers /etc/sudoers.bak
RUN echo 'ubuntu ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers

FROM start AS middle

RUN su - ubuntu

RUN mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo ${GITACCESSKEY} >> ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519

ENV ROOT=/comfyui-launcher

# COPY ./models.sh /scripts/models.sh
# RUN /scripts/models.sh

# COPY ./nodes.sh /scripts/nodes.sh
# RUN /scripts/nodes.sh

RUN eval "$(ssh-agent -s)" && ssh-add /root/.ssh/id_ed25519 && ssh-keyscan github.com > ~/.ssh/githubKey && ssh-keygen -lf ~/.ssh/githubKey && cat ~/.ssh/githubKey >> ~/.ssh/known_hosts

WORKDIR ${ROOT}
Expand All @@ -41,10 +41,16 @@ WORKDIR ${ROOT}

# RUN /scripts/build.sh

# COPY ./models.sh /scripts/models.sh
COPY ./nodes.sh /nodes.sh
RUN /nodes.sh

FROM middle AS end

# COPY ./start.sh /scripts/start.sh
COPY --from=scripts . /scripts/
RUN chmod +x /scripts/*.sh

# COPY ./cron.sh /scripts/cron.sh
RUN mv /nodes.sh /scripts/nodes.sh

COPY ./models.sh /scripts/models.sh

CMD ["/scripts/start.sh"]
2 changes: 0 additions & 2 deletions docker/_global/.bash_aliases

This file was deleted.

1 change: 0 additions & 1 deletion docker/_global/.env_openai

This file was deleted.

33 changes: 33 additions & 0 deletions docker/_oldstuff/basic/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM pytorch/pytorch:latest

# ARG DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1

RUN apt update && apt-get install -y git rsync nginx wget nano ffmpeg libsm6 libxext6 cron && apt-get clean

ARG GITACCESSKEY

RUN mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo ${GITACCESSKEY} >> ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519

ENV ROOT=/comfyui-launcher

# COPY ./models.sh /scripts/models.sh
# RUN /scripts/models.sh

COPY ./nodes.sh /scripts/nodes.sh
RUN /scripts/nodes.sh

RUN eval "$(ssh-agent -s)" && ssh-add /root/.ssh/id_ed25519 && ssh-keyscan github.com > ~/.ssh/githubKey && ssh-keygen -lf ~/.ssh/githubKey && cat ~/.ssh/githubKey >> ~/.ssh/known_hosts

WORKDIR ${ROOT}

COPY ./build.sh /scripts/build.sh

RUN /scripts/build.sh

COPY ./models.sh /scripts/models.sh

COPY ./start.sh /scripts/start.sh

COPY ./cron.sh /scripts/cron.sh

CMD ["/scripts/start.sh"]
File renamed without changes.
File renamed without changes.
47 changes: 47 additions & 0 deletions docker/_oldstuff/basic/models.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash
ROOT=/comfyui-launcher/ComfyUI

git lfs install

mkdir -p ${ROOT}/models/checkpoints
mkdir -p ${ROOT}/models/clip_vision
mkdir -p ${ROOT}/models/controlnet
mkdir -p ${ROOT}/models/upscale_models
mkdir -p ${ROOT}/models/loras
mkdir -p ${ROOT}/models/ipadapter

cd ${ROOT}/models/checkpoints \
&& wget https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors -O sd_xl_base_1.0_0.9vae.safetensors \
&& wget https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors -O v1-5-pruned.safetensors \
&& wget https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors -O v2-1_768-ema-pruned.safetensors \
&& wget https://huggingface.co/JCTN/fav_models/resolve/b6734996c5ee586fa4d7cae9a5bab1406df0521a/juggernautXL_v8Rundiffusion.safetensors -O juggernautXL_v8Rundiffusion.safetensors \
&& wget 'https://civitai.com/api/download/models/782002?type=Model&format=SafeTensor&size=full&fp=fp16' -O Juggernaut-XI-byRunDiffusion.safetensors \
&& wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggernaut_reborn.safetensors -O juggernaut_reborn.safetensors \
&& wget https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/realisticVisionV51_v51VAE.safetensors -O realisticVisionV51_v51VAE.safetensors \
&& wget 'https://civitai.com/api/download/models/429454?type=Model&format=SafeTensor&size=pruned&fp=fp16' -O epicphotogasm_v1.safetensors \
&& wget https://huggingface.co/stabilityai/sdxl-turbo/resolve/main/sd_xl_turbo_1.0_fp16.safetensors -O sd_xl_turbo_1.0_fp16.safetensors;

cd ${ROOT}/models/upscale_models \
&& wget https://github.com/Phhofm/models/releases/download/4xNomosUniDAT_otf/4xNomosUniDAT_otf.safetensors -O 4xNomosUniDAT_otf.safetensors \
&& wget https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/4x-UltraSharp.pth -O 4x-UltraSharp.pth \
&& wget https://huggingface.co/Afizi/ESRGAN_4x.pth/resolve/main/ESRGAN_4x.pth -O ESRGAN_4x.pth \
&& wget https://huggingface.co/dtarnow/UPscaler/resolve/main/RealESRGAN_x2plus.pth -O RealESRGAN_x2plus.pth \
&& wget https://huggingface.co/kaliansh/sdrep/resolve/main/RealESRGAN_x4plus.pth -O RealESRGAN_x4plus.pth \
&& wget https://huggingface.co/kaliansh/sdrep/resolve/main/RealESRGAN_x4plus_anime_6B.pth -O RealESRGAN_x4plus_anime_6B.pth;

cd ${ROOT}/models/loras && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/loras/SDXLrender_v2.0.safetensors \
&& wget https://huggingface.co/digiplay/LORA/resolve/fa075647d8164b327ba07e430bdb3fd02f147a62/more_details.safetensors;

cd ${ROOT}/models/ipadapter && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/ipadapter/ip-adapter-plus_sd15.safetensors \
&& wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15.safetensors \
&& wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus-face_sd15.safetensors \
&& wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-full-face_sd15.safetensors \
&& wget https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_vit-G.safetensors \
&& wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl_vit-h.safetensors \
&& wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus_sdxl_vit-h.safetensors \
&& wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus-face_sdxl_vit-h.safetensors \
&& wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl.safetensors;

cd ${ROOT}/models/clip_vision && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/clip_vision/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors;

cd ${ROOT}/models/controlnet && wget https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile_fp16.safetensors;
19 changes: 19 additions & 0 deletions docker/_oldstuff/basic/nodes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

ROOT=/comfyui-launcher

mkdir -p ${ROOT}/nodes \
cd ${ROOT}/nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager && cd "$(basename "$_" .git)"
cd ${ROOT}/nodes && git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet && cd "$(basename "$_" .git)" && git reset --hard "b9c8bdc6dd47f3eb322c3194bee10afe80c5fbad"
# cd ${ROOT}/nodes && git clone https://github.com/Extraltodeus/ComfyUI-AutomaticCFG && cd "$(basename "$_" .git)" && git reset --hard "2e395317b65c05a97a0ef566c4a8c7969305dafa" && pip install -r requirements.txt
# cd ${ROOT}/nodes && git clone https://github.com/crystian/ComfyUI-Crystools && cd "$(basename "$_" .git)" && git reset --hard "ad2e9b8be8c601f17cf04d676a16afe538b89497" && pip install -r requirements.txt
# cd ${ROOT}/nodes && git clone https://github.com/alt-key-project/comfyui-dream-project && cd "$(basename "$_" .git)" && git reset --hard "b2ddca87a95881d2b37f4602edfcc7507da39a9c" && pip install -r requirements.txt
# cd ${ROOT}/nodes && git clone https://github.com/yolain/ComfyUI-Easy-Use && cd "$(basename "$_" .git)" && git reset --hard "c51d1fdea2edad09e6788eafea4312fcf1a7bb27" && pip install -r requirements.txt
# cd ${ROOT}/nodes && git clone https://github.com/shiimizu/ComfyUI-TiledDiffusion && cd "$(basename "$_" .git)" && git reset --hard "5b2d0d2c4036218c0d6460efc79790e2a54f9a22"
# cd ${ROOT}/nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes && cd "$(basename "$_" .git)" && git reset --hard "d78b780ae43fcf8c6b7c6505e6ffb4584281ceca" && pip install -r requirements.txt
# cd ${ROOT}/nodes && git clone https://github.com/cubiq/ComfyUI_essentials && cd "$(basename "$_" .git)" && git reset --hard "64e38fd0f3b2e925573684f4a43727be80dc7d5b" && pip install -r requirements.txt
# cd ${ROOT}/nodes && git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus && cd "$(basename "$_" .git)" && git reset --hard "b188a6cb39b512a9c6da7235b880af42c78ccd0d"
# cd ${ROOT}/nodes && git clone https://github.com/edenartlab/eden_comfy_pipelines && cd "$(basename "$_" .git)" && git reset --hard "69d7f4f204a38626113686ec6c56281105419f1c" && pip install -r requirements.txt
# cd ${ROOT}/nodes && git clone https://github.com/BadCafeCode/execution-inversion-demo-comfyui && cd "$(basename "$_" .git)" && git reset --hard "b0b489659684a1b69221db48cabb9dce5f7bb6fb"
# cd ${ROOT}/nodes && git clone https://github.com/rgthree/rgthree-comfy && cd "$(basename "$_" .git)" && git reset --hard "6f82a5c72fdb36ce28b3c09eecd2d7fe493c91a1" && pip install -r requirements.txt
# cd ${ROOT}/nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui && cd "$(basename "$_" .git)" && git reset --hard "b2f12387b2af5aae98d69d785709971c123a10fd" && pip install -r requirements.txt
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions docker/_oldstuff/basic2/nodes-direct.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

ROOT=/comfyui-launcher

mkdir -p ${ROOT}/ComfyUI/custom_nodes \
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet && cd "$(basename "$_" .git)"
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/Extraltodeus/ComfyUI-AutomaticCFG && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/crystian/ComfyUI-Crystools && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/alt-key-project/comfyui-dream-project && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/yolain/ComfyUI-Easy-Use && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/shiimizu/ComfyUI-TiledDiffusion && cd "$(basename "$_" .git)"
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/cubiq/ComfyUI_essentials && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus && cd "$(basename "$_" .git)" && git reset --hard "b188a6cb39b512a9c6da7235b880af42c78ccd0d"
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/edenartlab/eden_comfy_pipelines && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/BadCafeCode/execution-inversion-demo-comfyui && cd "$(basename "$_" .git)"
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/rgthree/rgthree-comfy && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/huchenlei/ComfyUI-layerdiffuse && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/Fannovel16/comfyui_controlnet_aux && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone --recursive https://github.com/receyuki/comfyui-prompt-reader-node && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/edenartlab/eden_comfy_pipelines && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/evanspearman/ComfyMath && cd "$(basename "$_" .git)" && pip install -r requirements.txt
cd ${ROOT}/ComfyUI/custom_nodes && git clone https://github.com/drmbt/comfyui-dreambait-nodes && cd "$(basename "$_" .git)" && pip install -r requirements.txt
File renamed without changes.
6 changes: 4 additions & 2 deletions docker/_global/start.sh → docker/_oldstuff/basic2/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ rm -rf /etc/nginx && git clone [email protected]:stakeordie/emprops-nginx-conf.git
ln -s /etc/nginx-repo/node /etc/nginx

git clone https://github.com/comfyanonymous/ComfyUI.git ${ROOT}/ComfyUI
cd ${ROOT}/ComfyUI && pip install -r requirements.txt
cd ${ROOT}/ComfyUI && git reset --hard "915fdb57454c094391d830cefb4ffdd24ed8088c" && pip install -r requirements.txt
rm -rf custom_nodes
mv ${ROOT}/nodes ${ROOT}/ComfyUI/custom_nodes

/scripts/models.sh

cd ${ROOT}/ComfyUI && pm2 start --name comfy "python main.py --highvram"
pip install "numpy < 2"

cd ${ROOT}/ComfyUI && pm2 start --name comfy "python main.py"


git clone https://github.com/stakeordie/comfy-middleware.git ${ROOT}/comfy-middleware
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f9dc2e5

Please sign in to comment.