From ba04dd410b7d1ee368a8ad2a8c07165f4261932b Mon Sep 17 00:00:00 2001 From: Sandy Corsillo Date: Tue, 17 Dec 2024 11:51:27 -0500 Subject: [PATCH] through to merge --- .gitignore | 2 +- docker/.env_openai | 1 - docker/Dockerfile | 84 ++- .../_oldstuff/_scripts/generate_dockerfile.py | 229 ++++++ docker/_oldstuff/_scripts/start.sh | 183 +++++ .../basic/backup/models_container.sh} | 24 +- docker/_oldstuff/basic/backup/models_image.sh | 29 + docker/_oldstuff/basic/backup/nodes.sh | 30 + docker/_oldstuff/flux/backup/models.sh | 20 + docker/_oldstuff/flux/backup/nodes.sh | 25 + docker/_oldstuff/flux/models.sh | 44 -- docker/_oldstuff/flux/nodes.sh | 25 - docker/_oldstuff/models_dyn_image.sh | 93 +++ docker/_oldstuff/nodes_dyn_image.sh | 116 +++ docker/{ => _oldstuff/old}/.bash_aliases | 0 docker/{ => _oldstuff}/old/Dockerfile | 0 docker/{ => _oldstuff}/old/build.sh | 0 docker/{ => _oldstuff}/old/clone.sh | 0 docker/{ => _oldstuff}/old/config.py | 0 docker/{ => _oldstuff}/old/error_catch_all.sh | 0 docker/{ => _oldstuff}/old/loader.py | 0 docker/{ => _oldstuff}/old/start.sh | 0 docker/_oldstuff/tester/Dockerfile | 671 ++++++++++++++++++ .../tester/models_config_contaidner.json | 9 + .../_oldstuff/tester/models_config_image.json | 14 + docker/_oldstuff/tester/models_container.sh | 8 + docker/_oldstuff/tester/nodes.sh | 9 + docker/_oldstuff/tester/start.sh | 140 ++++ docker/_oldstuff/video_new/models.sh | 69 -- docker/_oldstuff/video_new/nodes.sh | 44 -- docker/_scripts/comfyui | 44 -- docker/_scripts/cron.sh | 9 - docker/_scripts/start.sh | 117 --- docker/basic/nodes.sh | 28 - docker/config/basic/config.json | 312 ++++++++ docker/config/flux/config.json | 100 +++ docker/config/tester/config.json | 12 + docker/config/video/config.json | 380 ++++++++++ docker/docker-compose.yml | 84 +++ docker/old/.bash_aliases | 2 - docker/scripts/comfyui | 171 +++++ docker/scripts/download_model.py | 109 +++ docker/scripts/start.sh | 389 ++++++++++ 43 files changed, 3181 insertions(+), 445 deletions(-) delete mode 100644 docker/.env_openai create mode 100644 docker/_oldstuff/_scripts/generate_dockerfile.py create mode 100755 docker/_oldstuff/_scripts/start.sh rename docker/{basic/models.sh => _oldstuff/basic/backup/models_container.sh} (72%) create mode 100755 docker/_oldstuff/basic/backup/models_image.sh create mode 100755 docker/_oldstuff/basic/backup/nodes.sh create mode 100755 docker/_oldstuff/flux/backup/models.sh create mode 100755 docker/_oldstuff/flux/backup/nodes.sh delete mode 100755 docker/_oldstuff/flux/models.sh delete mode 100755 docker/_oldstuff/flux/nodes.sh create mode 100644 docker/_oldstuff/models_dyn_image.sh create mode 100644 docker/_oldstuff/nodes_dyn_image.sh rename docker/{ => _oldstuff/old}/.bash_aliases (100%) mode change 100755 => 100644 rename docker/{ => _oldstuff}/old/Dockerfile (100%) rename docker/{ => _oldstuff}/old/build.sh (100%) rename docker/{ => _oldstuff}/old/clone.sh (100%) rename docker/{ => _oldstuff}/old/config.py (100%) rename docker/{ => _oldstuff}/old/error_catch_all.sh (100%) rename docker/{ => _oldstuff}/old/loader.py (100%) rename docker/{ => _oldstuff}/old/start.sh (100%) create mode 100644 docker/_oldstuff/tester/Dockerfile create mode 100644 docker/_oldstuff/tester/models_config_contaidner.json create mode 100644 docker/_oldstuff/tester/models_config_image.json create mode 100755 docker/_oldstuff/tester/models_container.sh create mode 100755 docker/_oldstuff/tester/nodes.sh create mode 100644 docker/_oldstuff/tester/start.sh delete mode 100755 docker/_oldstuff/video_new/models.sh delete mode 100755 docker/_oldstuff/video_new/nodes.sh delete mode 100644 docker/_scripts/comfyui delete mode 100755 docker/_scripts/cron.sh delete mode 100755 docker/_scripts/start.sh delete mode 100755 docker/basic/nodes.sh create mode 100644 docker/config/basic/config.json create mode 100644 docker/config/flux/config.json create mode 100644 docker/config/tester/config.json create mode 100644 docker/config/video/config.json create mode 100644 docker/docker-compose.yml delete mode 100644 docker/old/.bash_aliases create mode 100644 docker/scripts/comfyui create mode 100755 docker/scripts/download_model.py create mode 100644 docker/scripts/start.sh diff --git a/.gitignore b/.gitignore index 15c7e7d..c8028c4 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,4 @@ yarn-error.log* # Sentry Config File .sentryclirc -package-lock.json +package-lock.json \ No newline at end of file diff --git a/docker/.env_openai b/docker/.env_openai deleted file mode 100644 index 8ce0ef3..0000000 --- a/docker/.env_openai +++ /dev/null @@ -1 +0,0 @@ -OPENAI_API_KEY='sk-1234567890abcdef1234567890abcdef' \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index bc91291..7a2b5c3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,56 +1,64 @@ -# Setup a server ready to accept component requests -# Use ubuntu user, not root -# Use a venv for ComfyUI +# Builder stage for SSH key +FROM pytorch/pytorch:latest as start -FROM pytorch/pytorch:latest AS start +RUN apt update && apt-get install -y \ + git git-lfs rsync nginx wget curl nano ffmpeg libsm6 libxext6 \ + cron sudo ssh zstd jq build-essential cmake ninja-build \ + gcc g++ openssh-client aria2 \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* -# ARG DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 - -RUN apt update && apt-get install -y git rsync nginx wget nano ffmpeg libsm6 libxext6 cron sudo ssh && apt-get clean - -ARG GITACCESSKEY +FROM start AS middle -RUN useradd -m -d /home/ubuntu -s /bin/bash ubuntu -RUN usermod -aG sudo ubuntu -RUN mkdir -p /home/ubuntu/.ssh && touch /home/ubuntu/.ssh/authorized_keys -RUN echo ${GITACCESSKEY} >> /home/ubuntu/.ssh/authorized_keys -RUN chown -R ubuntu:ubuntu /home/ubuntu/.ssh +ENV ROOT=/workspace +ENV PATH="${ROOT}/.local/bin:${PATH}" +ENV CONFIG_DIR=${ROOT}/config +ENV COMFY_DIR=${ROOT}/ComfyUI -RUN mkdir -p /etc/ssh/sshd_config.d -RUN touch /etc/ssh/sshd_config.d/ubuntu.conf -RUN echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config.d/ubuntu.conf -RUN echo "PasswordAuthentication no" >> /etc/ssh/sshd_config.d/ubuntu.conf +WORKDIR ${ROOT} -RUN service ssh restart -RUN sudo cp /etc/sudoers /etc/sudoers.bak -RUN echo 'ubuntu ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers +RUN git clone https://github.com/comfyanonymous/ComfyUI.git ${COMFY_DIR} && \ + cd ${COMFY_DIR} && \ + pip install --upgrade pip && \ + pip install -r requirements.txt && \ + pip install huggingface_hub[hf_transfer] && \ + pip install tqdm -FROM start AS middle +FROM middle AS end -RUN su - ubuntu +COPY config/ ${CONFIG_DIR}/ -RUN mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo ${GITACCESSKEY} >> ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519 +# Debug: List config files +RUN find ${CONFIG_DIR} -name "config.json" -ENV ROOT=/comfyui-launcher +# Set default config type +ARG CONFIG_TYPE -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 +# Copy type-specific config files +COPY config/${CONFIG_TYPE} ${CONFIG_DIR}/ -WORKDIR ${ROOT} +# Copy init.d script +COPY scripts/comfyui /etc/init.d/comfyui +RUN chmod +x /etc/init.d/comfyui && \ + update-rc.d comfyui defaults -# COPY ./build.sh /scripts/build.sh +# Copy startup script +COPY scripts/start.sh /start.sh +RUN chmod +x /start.sh -# RUN /scripts/build.sh +COPY scripts ${ROOT}/scripts -COPY ./nodes.sh /nodes.sh -RUN /nodes.sh +RUN rm -rf ${ROOT}/scripts/start.sh && rm -rf ${ROOT}/scripts/comfyui -FROM middle AS end -COPY --from=scripts . /scripts/ -RUN chmod +x /scripts/*.sh +# RUN usermod -aG crontab ubuntu +# Create cron pid directory with correct permissions +RUN mkdir -p /var/run/cron \ + && touch /var/run/cron/crond.pid \ + && chmod 644 /var/run/cron/crond.pid +RUN sed -i 's/touch $PIDFILE/# touch $PIDFILE/g' /etc/init.d/cron -RUN mv /nodes.sh /scripts/nodes.sh +RUN cd ${ROOT} && git-lfs install -COPY ./models.sh /scripts/models.sh - -CMD ["/scripts/start.sh"] \ No newline at end of file +# Start services and application +CMD ["/start.sh"] \ No newline at end of file diff --git a/docker/_oldstuff/_scripts/generate_dockerfile.py b/docker/_oldstuff/_scripts/generate_dockerfile.py new file mode 100644 index 0000000..a0ad1a1 --- /dev/null +++ b/docker/_oldstuff/_scripts/generate_dockerfile.py @@ -0,0 +1,229 @@ +#!/usr/bin/env python3 +import json +import os +import hashlib +import shutil +from typing import Dict, List + +def read_json_config(config_path: str) -> Dict: + with open(config_path, 'r') as f: + return json.load(f) + +def generate_download_stage(model: Dict, index: int) -> str: + stage_name = f"download_{index}" + path = model['path'] + name = model.get('name', f'model_{index}') + + # If path ends with /, append the name to create full path + if path.endswith('/'): + path_dir = path.rstrip('/') + full_path = os.path.join(path_dir, name) + else: + full_path = path + path_dir = os.path.dirname(path) + + # Prepend ComfyUI to the path + comfy_path = os.path.join("ComfyUI", full_path) + comfy_dir = os.path.dirname(comfy_path) + + return f"""RUN echo "Downloading {name}..." +RUN mkdir -p ${{ROOT}}/{comfy_dir} +RUN wget -O "${{ROOT}}/{comfy_path}" "{model['url']}" +""", comfy_path + +def generate_node_stage(node: Dict, index: int) -> str: + """Generate a Dockerfile stage for installing a node.""" + name = node.get('name', f'node_{index}') + url = node.get('url', '') + commit = node.get('commit', None) + + # Extract repo name from URL + repo_name = url.split('/')[-1].replace('.git', '') + + # Build the clone commands only + commands = [f"""FROM middle-comfy-install AS node_{index} +RUN echo "Installing node: {name}..." +RUN mkdir -p ${{ROOT}}/ComfyUI/custom_nodes && \\ + cd ${{ROOT}}/ComfyUI/custom_nodes && \\ + git clone {url}"""] + + if commit: + commands.append(f'RUN cd ${{ROOT}}/ComfyUI/custom_nodes/{repo_name} && git checkout {commit}') + + return "\n".join(commands), repo_name + +def generate_dockerfile_content(models_config: str, nodes_config: str = None) -> str: + # First, generate the startup script + script_content = ["#!/bin/bash", ""] + + # Add model download function + script_content.extend([ + "check_and_download_models() {", + ' echo "Checking and downloading models if needed..."', + "" + ]) + + # Add model download commands + if models_config: + models = read_json_config(models_config).get('models', []) + for model in models: + url = model.get('url', '') + path = model.get('path', '') + name = model.get('name', '') + + full_path = os.path.join("${ROOT}/ComfyUI", path) + script_content.extend([ + f' if [ ! -f "{full_path}/{name}" ]; then', + f' echo "Downloading {name}..."', + f' mkdir -p "{full_path}"', + f' wget -q --header="Authorization: Bearer $HF_TOKEN" "{url}" -O "{full_path}/{name}"', + ' fi', + '' + ]) + + # Add node installation function + script_content.extend([ + "}", + "", + "install_nodes() {", + ' cd ${ROOT}/ComfyUI/custom_nodes', + "" + ]) + + # Add node installation commands + if nodes_config: + nodes = read_json_config(nodes_config).get('nodes', []) + for node in nodes: + url = node.get('url', '') + name = node.get('name', '') + commit = node.get('commit', None) + repo_name = url.split('/')[-1].replace('.git', '') + + script_content.extend([ + f' if [ ! -d "{repo_name}" ]; then', + f' echo "Installing node: {name}"', + f' git clone {url}', + ]) + + if commit: + script_content.append(f' cd {repo_name} && git checkout {commit} && cd ..') + + script_content.extend([ + f' if [ -f "{repo_name}/requirements.txt" ]; then', + f' pip install -r "{repo_name}/requirements.txt"', + ' fi', + ' fi', + '' + ]) + + # Add script execution + script_content.extend([ + "}", + "", + "# Run setup functions", + "check_and_download_models", + "install_nodes", + "", + "# Start ComfyUI", + "cd ${ROOT}/ComfyUI", + "python main.py" + ]) + + # Write the startup script to a file + script_path = os.path.join(os.path.dirname(os.path.dirname(models_config)), "scripts") + os.makedirs(script_path, exist_ok=True) + with open(os.path.join(script_path, "start.sh"), "w") as f: + f.write("\n".join(script_content)) + + # Generate the Dockerfile content + content = [] + content.append("# [GENERATED_CONTENT]\n") + + # Setup environment variables + content.append("# Setup environment variables") + content.append('ARG HF_TOKEN') + content.append('ARG OPENAI_API_KEY') + content.append('ENV HF_TOKEN=$HF_TOKEN') + content.append('ENV OPENAI_API_KEY=$OPENAI_API_KEY') + content.append('ENV ROOT=/home/ubuntu') + content.append('ENV PATH="${ROOT}/.local/bin:${PATH}"\n') + + # Create directories for volumes + content.append("# Create directories for volumes") + content.append("""RUN mkdir -p ${ROOT}/ComfyUI/models && \\ + mkdir -p ${ROOT}/ComfyUI/custom_nodes && \\ + chown -R ubuntu:ubuntu ${ROOT}/ComfyUI""") + + # Copy and setup the startup script + content.extend([ + "", + "# Copy startup script", + "COPY scripts/start.sh /start.sh", + "RUN chmod +x /start.sh", + "", + "# Set working directory", + "WORKDIR ${ROOT}/ComfyUI", + "", + "# Start the application", + 'CMD ["/start.sh"]', + "", + "# [END_GENERATED_CONTENT]" + ]) + + return "\n".join(content) + +def merge_with_dockerfile(dockerfile_path: str, generated_content: str, marker: str = "# [GENERATED_CONTENT]") -> None: + # Create a new Dockerfile in the current directory + current_dir = os.getcwd() + new_dockerfile = os.path.join(current_dir, "Dockerfile") + + # Copy the original Dockerfile + shutil.copy2(dockerfile_path, new_dockerfile) + + # Read the contents of the new Dockerfile + with open(new_dockerfile, 'r') as f: + content = f.read() + + # Split content at marker and reconstruct + if marker in content: + parts = content.split(marker) + if len(parts) >= 2: + # Construct new content with marker, generated content, and final stages + new_content = parts[0] + marker + "\n" + generated_content.split(marker)[1].split("# [END_GENERATED_CONTENT]")[0] + "\n\n" + "# [END_GENERATED_CONTENT]" + "\n\n" + parts[1].split("# [END_GENERATED_CONTENT]")[1] + + # Write back to the new Dockerfile + with open(new_dockerfile, 'w') as f: + f.write(new_content) + + print(f"Generated new Dockerfile at: {new_dockerfile}") + else: + print(f"Error: Marker found but content format unexpected") + else: + print(f"Error: Marker '{marker}' not found in Dockerfile") + +if __name__ == "__main__": + import sys + import os + + if len(sys.argv) < 3: + print("Usage: generate_dockerfile.py [nodes_config_path]") + sys.exit(1) + + dockerfile_path = sys.argv[1] + models_config_path = sys.argv[2] + nodes_config_path = sys.argv[3] if len(sys.argv) > 3 else None + + if not os.path.exists(dockerfile_path): + print(f"Dockerfile not found: {dockerfile_path}") + sys.exit(1) + + if not os.path.exists(models_config_path): + print(f"Models config not found: {models_config_path}") + sys.exit(1) + + if nodes_config_path and not os.path.exists(nodes_config_path): + print(f"Nodes config not found: {nodes_config_path}") + sys.exit(1) + + content = generate_dockerfile_content(models_config_path, nodes_config_path) + merge_with_dockerfile(dockerfile_path, content) \ No newline at end of file diff --git a/docker/_oldstuff/_scripts/start.sh b/docker/_oldstuff/_scripts/start.sh new file mode 100755 index 0000000..ca5f5c7 --- /dev/null +++ b/docker/_oldstuff/_scripts/start.sh @@ -0,0 +1,183 @@ +#!/bin/bash +set -x # Print commands and their arguments as they are executed +set -e # Exit immediately if a command exits with a non-zero status +set -o pipefail # Capture errors in pipe chains + +echo "DEBUG: Script starting" > /tmp/debug.log +date >> /tmp/debug.log + +# Logging function +log() { + echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*" +} + +# Ensure ROOT is set +: "${ROOT:=/home/ubuntu}" +log "Using ROOT directory: $ROOT" + +error_exit() { + log "ERROR: $1" >&2 + exit 1 +} + +setup_nginx() { + log "Setting up Nginx configuration..." + sudo rm -rf /etc/nginx + sudo git clone git@github.com:stakeordie/emprops-nginx-conf.git /etc/nginx-repo + sudo ln -s /etc/nginx-repo/node /etc/nginx +} + +extract_models() { + if [ -f "${ROOT}/tmp/models.tar.zst" ]; then + cd /home/ubuntu/ + tar -I zstd -xvf ${ROOT}/tmp/models.tar.zst + rm ${ROOT}/tmp/models.tar.zst + cp -rn /home/ubuntu/models/* /home/ubuntu/ComfyUI/models + rm -rf /home/ubuntu/models + fi +} + +setup_comfyui() { + local comfyui_path="${ROOT}/ComfyUI" + local comfyui_commit="915fdb57454c094391d830cefb4ffdd24ed8088c" + + cd "$comfyui_path" + # Activate virtual environment + # shellcheck disable=SC1091 + source venv/bin/activate + + git reset --hard "$comfyui_commit" + # pip install -r requirements.txt + + pip install "numpy < 2" + + deactivate +} + +setup_env_files() { + log "Setting up environment files..." + cd "${ROOT}/env_files" || return + + # Loop through all env files and move them to their destinations + for env_file in ComfyUI_custom_nodes_*_env; do + if [ -f "$env_file" ]; then + # Extract repo name from file name + repo_name=${env_file#ComfyUI_custom_nodes_} + repo_name=${repo_name%_env} + + # Create destination directory and move file + target_dir="${ROOT}/ComfyUI/custom_nodes/${repo_name}" + mkdir -p "$target_dir" + cp "$env_file" "${target_dir}/.env" + chown ubuntu:ubuntu "${target_dir}/.env" + + log "Moved $env_file to ${target_dir}/.env" + fi + done +} + +install_models() { + # Process models from config and download them directly to ComfyUI/models + python3 -c ' +import json +import os +import urllib.request +import sys +from tqdm import tqdm + +def download_file(url, path, name): + # If path ends with /, treat it as a directory and append the name + if path.endswith("/"): + path = os.path.join(path, name) + + os.makedirs(os.path.dirname(path), exist_ok=True) + print(f"\nDownloading model: {name}") + print(f"URL: {url}") + print(f"To: {path}") + + try: + response = urllib.request.urlopen(url) + total_size = int(response.headers.get("content-length", 0)) + block_size = 1024 # 1 Kibibyte + progress_bar = tqdm(total=total_size, unit="iB", unit_scale=True) + + with open(path, "wb") as f: + while True: + buffer = response.read(block_size) + if not buffer: + break + size = f.write(buffer) + progress_bar.update(size) + + progress_bar.close() + print(f"✓ Download complete: {name}\n") + + except Exception as e: + print(f"✗ Error downloading {name}: {str(e)}", file=sys.stderr) + raise + +def process_config(): + config_path = "/home/ubuntu/scripts/models_config_container.json" + comfy_dir = "/home/ubuntu/ComfyUI" + + print("\n=== Starting Model Downloads ===\n") + + with open(config_path, "r") as f: + config = json.load(f) + + total_models = len(config["models"]) + print(f"Found {total_models} models to download\n") + + for i, model in enumerate(config["models"], 1): + url = model["url"] + name = model["name"] # name is now required + path = os.path.join(comfy_dir, model["path"]) + print(f"\n[{i}/{total_models}] Processing model: {name}") + try: + download_file(url, path, name) + except Exception as e: + print(f"Failed to download model {name} ({i}/{total_models})") + continue + + print("\n=== Model Downloads Complete ===\n") + +process_config() +' +} + +key_share() { + echo -e "\n$(cat /root/.ssh/authorized_keys)" >> /home/ubuntu/.ssh/authorized_keys +} + +main() { + log "Starting initialization process..." + + setup_nginx + setup_comfyui + setup_env_files + install_models + key_share + + log "Initialization complete." + + # Start ComfyUI or any other required services + + mv $ROOT/scripts/comfyui /etc/init.d/ + + sudo chmod +x /etc/init.d/comfyui + sudo update-rc.d comfyui defaults + + /etc/init.d/nginx start + + /scripts/cron.sh + + service comfyui start +} + +if [ ! -f "/etc/nginx-repo" ]; then + main || error_exit "Failed to complete startup process" +else + log "Nginx configuration already exists" +fi + +sleep infinity \ No newline at end of file diff --git a/docker/basic/models.sh b/docker/_oldstuff/basic/backup/models_container.sh similarity index 72% rename from docker/basic/models.sh rename to docker/_oldstuff/basic/backup/models_container.sh index 89725d3..eed01e5 100755 --- a/docker/basic/models.sh +++ b/docker/_oldstuff/basic/backup/models_container.sh @@ -1,19 +1,9 @@ #!/bin/bash -ROOT=/comfyui-launcher/ComfyUI +ROOT=/home/ubuntu/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 -mkdir -p ${ROOT}/models/controlnet/controlnet-canny-sdxl-1.0 -mkdir -p ${ROOT}/models/controlnet/controlnet-depth-sdxl-1.0 -mkdir -p ${ROOT}/models/controlnet/controlnet-scribble-sdxl-1.0 -mkdir -p ${ROOT}/models/controlnet/controlnet-openpose-sdxl-1.0 -mkdir -p ${ROOT}/models/controlnet/t2i-adapter-lineart-sdxl-1.0 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 \ @@ -27,18 +17,6 @@ cd ${ROOT}/models/checkpoints \ && wget https://huggingface.co/stabilityai/sdxl-turbo/resolve/main/sd_xl_turbo_1.0_fp16.safetensors -O sd_xl_turbo_1.0_fp16.safetensors \ && wget https://edenartlab-lfs.s3.amazonaws.com/models/checkpoints/Eden_SDXL.safetensors -O Eden_SDXL.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 \ -&& wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/loras/SDXL_lora_xander.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 \ diff --git a/docker/_oldstuff/basic/backup/models_image.sh b/docker/_oldstuff/basic/backup/models_image.sh new file mode 100755 index 0000000..5c6f608 --- /dev/null +++ b/docker/_oldstuff/basic/backup/models_image.sh @@ -0,0 +1,29 @@ +#!/bin/bash +ROOT=/home/ubuntu/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 +mkdir -p ${ROOT}/models/controlnet/controlnet-canny-sdxl-1.0 +mkdir -p ${ROOT}/models/controlnet/controlnet-depth-sdxl-1.0 +mkdir -p ${ROOT}/models/controlnet/controlnet-scribble-sdxl-1.0 +mkdir -p ${ROOT}/models/controlnet/controlnet-openpose-sdxl-1.0 +mkdir -p ${ROOT}/models/controlnet/t2i-adapter-lineart-sdxl-1.0 + +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 \ +&& wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/loras/SDXL_lora_xander.safetensors; + diff --git a/docker/_oldstuff/basic/backup/nodes.sh b/docker/_oldstuff/basic/backup/nodes.sh new file mode 100755 index 0000000..86ddd80 --- /dev/null +++ b/docker/_oldstuff/basic/backup/nodes.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +ROOT=/home/ubuntu/ComfyUI + +PIP=/home/ubuntu/ComfyUI/venv/bin/pip + +mkdir -p ${ROOT}/custom_nodes +cd ${ROOT}/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet && cd "$(basename "$_" .git)" && git reset --hard "b9c8bdc6dd47f3eb322c3194bee10afe80c5fbad" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/Extraltodeus/ComfyUI-AutomaticCFG && cd "$(basename "$_" .git)" && git reset --hard "2e395317b65c05a97a0ef566c4a8c7969305dafa" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/crystian/ComfyUI-Crystools && cd "$(basename "$_" .git)" && git reset --hard "ad2e9b8be8c601f17cf04d676a16afe538b89497" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_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}/custom_nodes && git clone https://github.com/yolain/ComfyUI-Easy-Use && cd "$(basename "$_" .git)" && git reset --hard "c51d1fdea2edad09e6788eafea4312fcf1a7bb27" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/shiimizu/ComfyUI-TiledDiffusion && cd "$(basename "$_" .git)" && git reset --hard "5b2d0d2c4036218c0d6460efc79790e2a54f9a22" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes && cd "$(basename "$_" .git)" && git reset --hard "d78b780ae43fcf8c6b7c6505e6ffb4584281ceca" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/cubiq/ComfyUI_essentials && cd "$(basename "$_" .git)" && git reset --hard "64e38fd0f3b2e925573684f4a43727be80dc7d5b" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus && cd "$(basename "$_" .git)" && git reset --hard "b188a6cb39b512a9c6da7235b880af42c78ccd0d" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/edenartlab/eden_comfy_pipelines && cd "$(basename "$_" .git)" && git reset --hard "69d7f4f204a38626113686ec6c56281105419f1c" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/BadCafeCode/execution-inversion-demo-comfyui && cd "$(basename "$_" .git)" && git reset --hard "b0b489659684a1b69221db48cabb9dce5f7bb6fb" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/rgthree/rgthree-comfy && cd "$(basename "$_" .git)" && git reset --hard "6f82a5c72fdb36ce28b3c09eecd2d7fe493c91a1" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui && cd "$(basename "$_" .git)" && git reset --hard "b2f12387b2af5aae98d69d785709971c123a10fd" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/huchenlei/ComfyUI-layerdiffuse && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/Fannovel16/comfyui_controlnet_aux && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone --recursive https://github.com/receyuki/comfyui-prompt-reader-node && cd "$(basename "$_" .git)" && git reset --hard 07a1a5314d09dad4a8445d6921914e8ea8250324 && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/edenartlab/eden_comfy_pipelines && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/evanspearman/ComfyMath && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/drmbt/comfyui-dreambait-nodes && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt diff --git a/docker/_oldstuff/flux/backup/models.sh b/docker/_oldstuff/flux/backup/models.sh new file mode 100755 index 0000000..5296029 --- /dev/null +++ b/docker/_oldstuff/flux/backup/models.sh @@ -0,0 +1,20 @@ +#!/bin/bash +ROOT=/comfyui-launcher/ComfyUI + +mkdir -p ${ROOT}/models/checkpoints +mkdir -p ${ROOT}/models/unet +mkdir -p ${ROOT}/models/vae +mkdir -p ${ROOT}/models/clip +mkdir -p ${ROOT}/models/controlnet +mkdir -p ${ROOT}/models/loras +mkdir -p ${ROOT}/models/checkpoints +mkdir -p ${ROOT}/models/xlabs/ipadapters +mkdir -p ${ROOT}/models/clip_vision +mkdir -p ${ROOT}/models/clip_vision/clip-vit-large-patch14 +mkdir -p ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators +mkdir -p ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/TheMistoAI/MistoLine/Anyline + +cd ${ROOT}/models/unet && wget https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors && ln -sf ${ROOT}/models/unet/flux1-dev-fp8.safetensors ${ROOT}/models/checkpoints/flux1-dev-fp8.safetensors +cd ${ROOT}/models/clip && wget https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn.safetensors +cd ${ROOT}/models/vae && wget https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors +cd ${ROOT}/models/clip && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/clip/clip_l.safetensors diff --git a/docker/_oldstuff/flux/backup/nodes.sh b/docker/_oldstuff/flux/backup/nodes.sh new file mode 100755 index 0000000..c1ed4c3 --- /dev/null +++ b/docker/_oldstuff/flux/backup/nodes.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +ROOT=/comfyui-launcher + +mkdir -p ${ROOT}/nodes \ + +#!/bin/bash -i + + +cd ${ROOT}/nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager && cd "$(basename "$_" .git)" && git reset --hard 7ec376774f79229e2410935f04018805e2d16d16 && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/edenartlab/eden_comfy_pipelines && cd "$(basename "$_" .git)" && git reset --hard 2d2a676f0e3c709aefb04fbe9a518a0d5c7f99ec && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/kijai/ComfyUI-KJNodes && cd "$(basename "$_" .git)" && git reset --hard 9bb1e47ba7dd51da90433f03a44b5dd7dbea04f7 && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone --recursive https://github.com/receyuki/comfyui-prompt-reader-node && cd "$(basename "$_" .git)" && git reset --hard 07a1a5314d09dad4a8445d6921914e8ea8250324 && pip install -r requirements.txt +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/rgthree/rgthree-comfy && cd "$(basename "$_" .git)" && git reset --hard dd534e5384be8cf0c0fa35865afe2126ba75ac55 && 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 && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack && cd "$(basename "$_" .git)" && git reset --hard 94f30ef317d4607a2d91ac222b2bdf4addb1ea66 && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/Fannovel16/comfyui_controlnet_aux && cd "$(basename "$_" .git)" && git reset --hard 4cd233c5d7afe2e51bf57ee7a5ba7e6fcb9cbb22 && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/XLabs-AI/x-flux-comfyui && cd "$(basename "$_" .git)" && git reset --hard 14cfba14655eb19058963fb0d858b0bdb2d89cf0 && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui && cd "$(basename "$_" .git)" && git reset --hard ee2e31a1e5fd85ad6f5c36831ffda6fea8f249c7 && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/cubiq/ComfyUI_essentials && cd "$(basename "$_" .git)" && git reset --hard 635322c1e49fac6c23a56131078be45f64edc193 && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/crystian/ComfyUI-Crystools && cd "$(basename "$_" .git)" && git reset --hard 09d84235d99789447d143c4a4907c2d22e452097 && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/yolain/ComfyUI-Easy-Use && cd "$(basename "$_" .git)" && git reset --hard 7b1dc8ce62ee8bf4360d114b92c3b256f06cd28e && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/al-swaiti/ComfyUI-OllamaGemini && cd "$(basename "$_" .git)" && pip install -r requirements.txt +cd ${ROOT}/nodes && git clone https://github.com/Yanick112/ComfyUI-ToSVG.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt \ No newline at end of file diff --git a/docker/_oldstuff/flux/models.sh b/docker/_oldstuff/flux/models.sh deleted file mode 100755 index 7130b6d..0000000 --- a/docker/_oldstuff/flux/models.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -ROOT=/comfyui-launcher/ComfyUI - -mkdir -p ${ROOT}/models/checkpoints -mkdir -p ${ROOT}/models/unet -mkdir -p ${ROOT}/models/vae -mkdir -p ${ROOT}/models/clip -mkdir -p ${ROOT}/models/controlnet -mkdir -p ${ROOT}/models/loras -mkdir -p ${ROOT}/models/checkpoints -mkdir -p ${ROOT}/models/xlabs/ipadapters -mkdir -p ${ROOT}/models/clip_vision -mkdir -p ${ROOT}/models/clip_vision/clip-vit-large-patch14 -mkdir -p ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators -mkdir -p ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/TheMistoAI/MistoLine/Anyline - -#cd ${ROOT}/models/unet && wget https://huggingface.co/Comfy-Org/flux1-schnell/resolve/main/flux1-schnell-fp8.safetensors && ln -sf ${ROOT}/models/unet/flux1-schnell-fp8.safetensors ${ROOT}/models/checkpoints/flux1-schnell-fp8.safetensors -cd ${ROOT}/models/unet && wget https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors && ln -sf ${ROOT}/models/unet/flux1-dev-fp8.safetensors ${ROOT}/models/checkpoints/flux1-dev-fp8.safetensors -#cd ${ROOT}/models/unet && wget https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/flux1-schnell.safetensors && ln -sf ${ROOT}/models/unet/flux1-schnell.safetensors ${ROOT}/models/checkpoints/flux1-schnell.safetensors -#cd ${ROOT}/models/unet && wget --header="Authorization: Bearer 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" https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/flux1-dev.safetensors && ln -sf ${ROOT}/models/unet/flux1-dev.safetensors ${ROOT}/models/checkpoints/flux1-dev.safetensors -cd ${ROOT}/models/clip && wget https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn.safetensors -#cd ${ROOT}/models/clip && wget https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp16.safetensors -cd ${ROOT}/models/vae && wget https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors -cd ${ROOT}/models/clip && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/clip/clip_l.safetensors -#cd ${ROOT}/models/controlnet && wget https://huggingface.co/InstantX/FLUX.1-dev-Controlnet-Union/resolve/main/diffusion_pytorch_model.safetensors -O FLUX.1-dev-ControlNet-Union-Pro.safetensors -#cd ${ROOT}/models/loras && wget https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-FLUX.1-dev-16steps-lora.safetensors -#cd ${ROOT}/models/xlabs/ipadapters && wget https://huggingface.co/yzd-v/DWPose/resolve/main/yolox_l.onnx -O flux-ip-adapter.safetensors -#cd ${ROOT}/ComfyUI/input && wget https://upload.wikimedia.org/wikipedia/commons/4/49/A_black_image.jpg -#cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators && wget https://huggingface.co/lllyasviel/ControlNet/resolve/main/annotator/ckpts/dpt_hybrid-midas-501f0c75.pt -#cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/TheMistoAI/MistoLine/Anyline && wget https://huggingface.co/TheMistoAI/MistoLine/resolve/main/Anyline/MTEED.pth -#cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/ckpts/yzd-v/DWPose && wget https://huggingface.co/yzd-v/DWPose/resolve/main/dw-ll_ucoco_384.onnx -#cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/ckpts/yzd-v/DWPose && wget https://huggingface.co/yzd-v/DWPose/resolve/main/yolox_l.onnx -#cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators && wget https://huggingface.co/lllyasviel/Annotators/resolve/main/facenet.pth -#cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators && wget https://huggingface.co/lllyasviel/ControlNet/resolve/main/annotator/ckpts/hand_pose_model.pth -#cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators && wget https://huggingface.co/lllyasviel/ControlNet/resolve/main/annotator/ckpts/body_pose_model.pth -#cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators && wget https://huggingface.co/lllyasviel/Annotators/resolve/main/ControlNetHED.pth -#cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators && wget https://huggingface.co/lllyasviel/Annotators/resolve/main/sk_model.pth -#cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators && wget https://huggingface.co/lllyasviel/Annotators/resolve/main/sk_model2.pth -#cd ${ROOT}/models/clip_vision/clip-vit-large-patch14 && wget https://huggingface.co/openai/clip-vit-large-patch14/resolve/main/model.safetensors -#cd ${ROOT}/models/loras && wget https://huggingface.co/XLabs-AI/flux-lora-collection/resolve/main/anime_lora_comfy_converted.safetensors -#cd ${ROOT}/models/loras && wget https://huggingface.co/XLabs-AI/flux-lora-collection/resolve/main/art_lora_comfy_converted.safetensors -#cd ${ROOT}/models/loras && wget https://huggingface.co/XLabs-AI/flux-lora-collection/resolve/main/mjv6_lora_comfy_converted.safetensors -#cd ${ROOT}/models/loras && wget https://huggingface.co/XLabs-AI/flux-lora-collection/resolve/main/realism_lora_comfy_converted.safetensors -#cd ${ROOT}/models/loras && wget https://huggingface.co/XLabs-AI/flux-lora-collection/resolve/main/scenery_lora_comfy_converted.safetensors \ No newline at end of file diff --git a/docker/_oldstuff/flux/nodes.sh b/docker/_oldstuff/flux/nodes.sh deleted file mode 100755 index c89b306..0000000 --- a/docker/_oldstuff/flux/nodes.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -ROOT=/comfyui-launcher - -mkdir -p ${ROOT}/nodes \ - -#!/bin/bash -i - - -# cd ${ROOT}/nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager && cd "$(basename "$_" .git)" && git reset --hard 7ec376774f79229e2410935f04018805e2d16d16 && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/edenartlab/eden_comfy_pipelines && cd "$(basename "$_" .git)" && git reset --hard 2d2a676f0e3c709aefb04fbe9a518a0d5c7f99ec && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/kijai/ComfyUI-KJNodes && cd "$(basename "$_" .git)" && git reset --hard 9bb1e47ba7dd51da90433f03a44b5dd7dbea04f7 && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone --recursive https://github.com/receyuki/comfyui-prompt-reader-node && cd "$(basename "$_" .git)" && git reset --hard 07a1a5314d09dad4a8445d6921914e8ea8250324 && pip install -r requirements.txt -# 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/rgthree/rgthree-comfy && cd "$(basename "$_" .git)" && git reset --hard dd534e5384be8cf0c0fa35865afe2126ba75ac55 && 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 && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack && cd "$(basename "$_" .git)" && git reset --hard 94f30ef317d4607a2d91ac222b2bdf4addb1ea66 && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/Fannovel16/comfyui_controlnet_aux && cd "$(basename "$_" .git)" && git reset --hard 4cd233c5d7afe2e51bf57ee7a5ba7e6fcb9cbb22 && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/XLabs-AI/x-flux-comfyui && cd "$(basename "$_" .git)" && git reset --hard 14cfba14655eb19058963fb0d858b0bdb2d89cf0 && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui && cd "$(basename "$_" .git)" && git reset --hard ee2e31a1e5fd85ad6f5c36831ffda6fea8f249c7 && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/cubiq/ComfyUI_essentials && cd "$(basename "$_" .git)" && git reset --hard 635322c1e49fac6c23a56131078be45f64edc193 && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/crystian/ComfyUI-Crystools && cd "$(basename "$_" .git)" && git reset --hard 09d84235d99789447d143c4a4907c2d22e452097 && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/yolain/ComfyUI-Easy-Use && cd "$(basename "$_" .git)" && git reset --hard 7b1dc8ce62ee8bf4360d114b92c3b256f06cd28e && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/al-swaiti/ComfyUI-OllamaGemini && cd "$(basename "$_" .git)" && pip install -r requirements.txt -# cd ${ROOT}/nodes && git clone https://github.com/Yanick112/ComfyUI-ToSVG.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt \ No newline at end of file diff --git a/docker/_oldstuff/models_dyn_image.sh b/docker/_oldstuff/models_dyn_image.sh new file mode 100644 index 0000000..43ac7b5 --- /dev/null +++ b/docker/_oldstuff/models_dyn_image.sh @@ -0,0 +1,93 @@ +#!/bin/bash + +# Default values +ROOT="/home/ubuntu/ComfyUI" +CONFIG_FILE="" +MAX_PARALLEL=5 + +# Parse command line arguments +while [[ $# -gt 0 ]]; do + case $1 in + --path) + ROOT="$2" + shift 2 + ;; + --config) + CONFIG_FILE="$2" + shift 2 + ;; + --parallel) + MAX_PARALLEL="$2" + shift 2 + ;; + *) + echo "Unknown option: $1" + echo "Usage: $0 --path --config [--parallel ]" + exit 1 + ;; + esac +done + +# Validate required arguments +if [ -z "$CONFIG_FILE" ]; then + echo "Error: Config file is required" + echo "Usage: $0 --path --config [--parallel ]" + exit 1 +fi + +# Ensure jq is installed for JSON parsing +if ! command -v jq &> /dev/null; then + echo "jq could not be found. Installing..." + apt-get update && apt-get install -y jq +fi + +git lfs install + +rm -rf ${ROOT}/models/* + +# Function to download file with retry mechanism +download_file() { + local url="$1" + local output="$2" + local max_retries=3 + local retry_count=0 + + # Ensure output directory exists + mkdir -p "$(dirname "$output")" + + while [ $retry_count -lt $max_retries ]; do + wget -O "$output" "$url" && return 0 + retry_count=$((retry_count + 1)) + echo "Download failed for $url. Retry $retry_count of $max_retries" + sleep 2 + done + return 1 +} + +# Function to process download queue with parallel limit +process_downloads() { + local max_parallel=${1:-5} + local active_jobs=0 + + while IFS='|' read -r url path; do + while [ $active_jobs -ge $max_parallel ]; do + wait -n + active_jobs=$((active_jobs - 1)) + done + + download_file "$url" "${ROOT}/models/${path}" & + active_jobs=$((active_jobs + 1)) + done + + wait +} + +# Process all model types from JSON and create download queue +( + # Use jq to extract all model entries regardless of category + jq -r 'to_entries | .[] | .value[] | [.url, .path] | join("|")' "$CONFIG_FILE" | process_downloads $MAX_PARALLEL +) + +# Verify downloaded files +echo "Downloaded files:" +find ${ROOT}/models -type f diff --git a/docker/_oldstuff/nodes_dyn_image.sh b/docker/_oldstuff/nodes_dyn_image.sh new file mode 100644 index 0000000..61b0a3b --- /dev/null +++ b/docker/_oldstuff/nodes_dyn_image.sh @@ -0,0 +1,116 @@ +#!/bin/bash + +set -e + +# Function to log messages +log() { + echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*" +} + +# Function to handle errors +error_exit() { + log "ERROR: $1" >&2 + exit 1 +} + +# Parse command line arguments +while [[ $# -gt 0 ]]; do + case $1 in + --path) + COMFY_PATH="$2" + shift 2 + ;; + --config) + CONFIG_FILE="$2" + shift 2 + ;; + --parallel) + PARALLEL="$2" + shift 2 + ;; + *) + error_exit "Unknown argument: $1" + ;; + esac +done + +# Validate required arguments +[[ -z "$COMFY_PATH" ]] && error_exit "Missing required argument: --path" +[[ -z "$CONFIG_FILE" ]] && error_exit "Missing required argument: --config" +[[ ! -f "$CONFIG_FILE" ]] && error_exit "Config file not found: $CONFIG_FILE" + +# Process nodes configuration using Python +python3 -c ' +import json +import os +import sys +import subprocess +from concurrent.futures import ThreadPoolExecutor, as_completed + +def install_node(node): + name = node.get("name", "") + url = node.get("url", "") + path = os.path.join("'$COMFY_PATH'", "custom_nodes") + requirements = node.get("requirements", True) + env_vars = node.get("env", {}) + + print(f"\nInstalling node: {name}") + print(f"URL: {url}") + print(f"Path: {path}") + + try: + # Create directory if it doesnt exist + os.makedirs(path, exist_ok=True) + + # Clone repository + subprocess.run(["git", "clone", url], + cwd=path, + check=True, + capture_output=True) + + # Get the directory name from the git URL + dir_name = url.split("/")[-1].replace(".git", "") + node_path = os.path.join(path, dir_name) + + # Install requirements if they exist + if requirements and os.path.exists(os.path.join(node_path, "requirements.txt")): + subprocess.run(["pip", "install", "-r", "requirements.txt"], + cwd=node_path, + check=True, + capture_output=True) + + # Write environment variables if specified + if env_vars: + with open(os.path.join(node_path, ".env"), "w") as f: + for key, value in env_vars.items(): + f.write(f"{key}={value}\n") + + print(f" Successfully installed {name}") + return True + + except Exception as e: + print(f" Failed to install {name}: {str(e)}", file=sys.stderr) + return False + +def process_config(): + with open("'$CONFIG_FILE'", "r") as f: + config = json.load(f) + + nodes = config.get("nodes", []) + parallel = int("'${PARALLEL:-1}'") + + print(f"\n=== Installing {len(nodes)} nodes ===\n") + + if parallel > 1: + with ThreadPoolExecutor(max_workers=parallel) as executor: + futures = [executor.submit(install_node, node) for node in nodes] + for future in as_completed(futures): + future.result() + else: + for node in nodes: + install_node(node) + + print("\n=== Node installation complete ===\n") + +process_config() +' \ No newline at end of file diff --git a/docker/.bash_aliases b/docker/_oldstuff/old/.bash_aliases old mode 100755 new mode 100644 similarity index 100% rename from docker/.bash_aliases rename to docker/_oldstuff/old/.bash_aliases diff --git a/docker/old/Dockerfile b/docker/_oldstuff/old/Dockerfile similarity index 100% rename from docker/old/Dockerfile rename to docker/_oldstuff/old/Dockerfile diff --git a/docker/old/build.sh b/docker/_oldstuff/old/build.sh similarity index 100% rename from docker/old/build.sh rename to docker/_oldstuff/old/build.sh diff --git a/docker/old/clone.sh b/docker/_oldstuff/old/clone.sh similarity index 100% rename from docker/old/clone.sh rename to docker/_oldstuff/old/clone.sh diff --git a/docker/old/config.py b/docker/_oldstuff/old/config.py similarity index 100% rename from docker/old/config.py rename to docker/_oldstuff/old/config.py diff --git a/docker/old/error_catch_all.sh b/docker/_oldstuff/old/error_catch_all.sh similarity index 100% rename from docker/old/error_catch_all.sh rename to docker/_oldstuff/old/error_catch_all.sh diff --git a/docker/old/loader.py b/docker/_oldstuff/old/loader.py similarity index 100% rename from docker/old/loader.py rename to docker/_oldstuff/old/loader.py diff --git a/docker/old/start.sh b/docker/_oldstuff/old/start.sh similarity index 100% rename from docker/old/start.sh rename to docker/_oldstuff/old/start.sh diff --git a/docker/_oldstuff/tester/Dockerfile b/docker/_oldstuff/tester/Dockerfile new file mode 100644 index 0000000..c729f14 --- /dev/null +++ b/docker/_oldstuff/tester/Dockerfile @@ -0,0 +1,671 @@ +# 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 + +RUN apt update && apt-get install -y git rsync nginx wget nano ffmpeg libsm6 libxext6 cron sudo ssh zstd jq && apt-get clean + +ARG GITACCESSKEY +#ARG OPENAI_API_KEY + +RUN useradd -m -d /home/ubuntu -s /bin/bash ubuntu +RUN usermod -aG sudo ubuntu +RUN mkdir -p /home/ubuntu/.ssh && touch /home/ubuntu/.ssh/authorized_keys +RUN echo ${GITACCESSKEY} >> /home/ubuntu/.ssh/authorized_keys +RUN chown -R ubuntu:ubuntu /home/ubuntu/.ssh + +RUN mkdir -p /etc/ssh/sshd_config.d +RUN touch /etc/ssh/sshd_config.d/ubuntu.conf +RUN echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config.d/ubuntu.conf +RUN echo "PasswordAuthentication no" >> /etc/ssh/sshd_config.d/ubuntu.conf + +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 + +ENV ROOT=/home/ubuntu + +USER ubuntu + +RUN mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo ${GITACCESSKEY} >> ~/.ssh/id_ed25519 && chmod 600 ~/.ssh/id_ed25519 + +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} + +FROM middle AS middle-comfy-install + +RUN git clone https://github.com/comfyanonymous/ComfyUI.git ${ROOT}/ComfyUI + +RUN cd ${ROOT}/ComfyUI && python -m venv venv + +RUN cd ${ROOT}/ComfyUI && ${ROOT}/ComfyUI/venv/bin/pip install --upgrade pip && ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt + +# [GENERATED_CONTENT] + + +FROM middle-comfy-install AS node_0 +RUN echo "Installing node: eden_comfy_pipelines..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/edenartlab/eden_comfy_pipelines.git && \ + cd eden_comfy_pipelines && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi +RUN echo "OPENAI_API_KEY=${OPENAI_API_KEY}" >> ${ROOT}/ComfyUI/custom_nodes/eden_comfy_pipelines/.env + +FROM middle-comfy-install AS node_1 +RUN echo "Installing node: ComfyUI_ModdedNodes..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes && \ + cd Derfuu_ComfyUI_ModdedNodes && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_2 +RUN echo "Installing node: comfyui-dreambait-nodes..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/drmbt/comfyui-dreambait-nodes && \ + cd comfyui-dreambait-nodes && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_3 +RUN echo "Installing node: ComfyUI-Frame-Interpolation..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/Fannovel16/ComfyUI-Frame-Interpolation && \ + cd ComfyUI-Frame-Interpolation && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_4 +RUN echo "Installing node: ComfyUI-Crystools..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/crystian/ComfyUI-Crystools && \ + cd ComfyUI-Crystools && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_5 +RUN echo "Installing node: execution-inversion-demo-comfyui..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/BadCafeCode/execution-inversion-demo-comfyui.git && \ + cd execution-inversion-demo-comfyui && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_6 +RUN echo "Installing node: comfyui_controlnet_aux..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/Fannovel16/comfyui_controlnet_aux && \ + cd comfyui_controlnet_aux && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_7 +RUN echo "Installing node: ComfyUI_FizzNodes..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/FizzleDorf/ComfyUI_FizzNodes && \ + cd ComfyUI_FizzNodes && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_8 +RUN echo "Installing node: ComfyUI-Advanced-ControlNet..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet && \ + cd ComfyUI-Advanced-ControlNet && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_9 +RUN echo "Installing node: ComfyUI-AnimateDiff-Evolved..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved && \ + cd ComfyUI-AnimateDiff-Evolved && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_10 +RUN echo "Installing node: ComfyUI-VideoHelperSuite..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite && \ + cd ComfyUI-VideoHelperSuite && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_11 +RUN echo "Installing node: SeargeSDXL..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/SeargeDP/SeargeSDXL && \ + cd SeargeSDXL && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_12 +RUN echo "Installing node: ComfyUi_NNLatentUpscale..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/Ttl/ComfyUi_NNLatentUpscale && \ + cd ComfyUi_NNLatentUpscale && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_13 +RUN echo "Installing node: was-node-suite-comfyui..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/WASasquatch/was-node-suite-comfyui && \ + cd was-node-suite-comfyui && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_14 +RUN echo "Installing node: ComfyUI-Manager..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/aiXander/ComfyUI-Manager.git && \ + cd ComfyUI-Manager && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_15 +RUN echo "Installing node: ComfyUI_IPAdapter_plus..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus.git && \ + cd ComfyUI_IPAdapter_plus && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_16 +RUN echo "Installing node: ComfyUI_essentials..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/cubiq/ComfyUI_essentials && \ + cd ComfyUI_essentials && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_17 +RUN echo "Installing node: ComfyUI-DepthAnythingV2..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/kijai/ComfyUI-DepthAnythingV2 && \ + cd ComfyUI-DepthAnythingV2 && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_18 +RUN echo "Installing node: ComfyUI-Florence2..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/kijai/ComfyUI-Florence2 && \ + cd ComfyUI-Florence2 && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_19 +RUN echo "Installing node: efficiency-nodes-comfyui..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/jags111/efficiency-nodes-comfyui && \ + cd efficiency-nodes-comfyui && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_20 +RUN echo "Installing node: ComfyUI-KJNodes..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/kijai/ComfyUI-KJNodes && \ + cd ComfyUI-KJNodes && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_21 +RUN echo "Installing node: ComfyUI-Manager-ltdrdata..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/ltdrdata/ComfyUI-Manager.git && \ + cd ComfyUI-Manager && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_22 +RUN echo "Installing node: rgthree-comfy..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/rgthree/rgthree-comfy && \ + cd rgthree-comfy && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_23 +RUN echo "Installing node: ComfyUI-Depthflow-Nodes..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/akatz-ai/ComfyUI-Depthflow-Nodes && \ + cd ComfyUI-Depthflow-Nodes && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_24 +RUN echo "Installing node: comfyui_segment_anything..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/storyicon/comfyui_segment_anything && \ + cd comfyui_segment_anything && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_25 +RUN echo "Installing node: ComfyUI_ExtraModels..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/city96/ComfyUI_ExtraModels.git && \ + cd ComfyUI_ExtraModels && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_26 +RUN echo "Installing node: ComfyUI-Custom-Scripts..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git && \ + cd ComfyUI-Custom-Scripts && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_27 +RUN echo "Installing node: ComfyUI-LLaVA-OneVision..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/kijai/ComfyUI-LLaVA-OneVision.git && \ + cd ComfyUI-LLaVA-OneVision && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_28 +RUN echo "Installing node: ComfyUI_Primere_Nodes..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/CosmicLaca/ComfyUI_Primere_Nodes.git && \ + cd ComfyUI_Primere_Nodes && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_29 +RUN echo "Installing node: ComfyUI-Universal-Styler..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/KoreTeknology/ComfyUI-Universal-Styler.git && \ + cd ComfyUI-Universal-Styler && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_30 +RUN echo "Installing node: DJZ-Nodes..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/MushroomFleet/DJZ-Nodes.git && \ + cd DJZ-Nodes && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_31 +RUN echo "Installing node: ComfyUI-Easy-Use..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/yolain/ComfyUI-Easy-Use.git && \ + cd ComfyUI-Easy-Use && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_32 +RUN echo "Installing node: ComfyUI_LayerStyle..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/chflame163/ComfyUI_LayerStyle.git && \ + cd ComfyUI_LayerStyle && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_33 +RUN echo "Installing node: ComfyUI-MochiWrapper..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/kijai/ComfyUI-MochiWrapper.git && \ + cd ComfyUI-MochiWrapper && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS node_34 +RUN echo "Installing node: ComfyUI-MochiEdit..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes && \ + cd ${ROOT}/ComfyUI/custom_nodes && \ + git clone https://github.com/logtd/ComfyUI-MochiEdit.git && \ + cd ComfyUI-MochiEdit && if [ -f "requirements.txt" ]; then ${ROOT}/ComfyUI/venv/bin/pip install -r requirements.txt; fi + + +FROM middle-comfy-install AS middle-nodes + +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes +COPY --from=node_0 ${ROOT}/ComfyUI/custom_nodes/eden_comfy_pipelines ${ROOT}/ComfyUI/custom_nodes/eden_comfy_pipelines +COPY --from=node_1 ${ROOT}/ComfyUI/custom_nodes/Derfuu_ComfyUI_ModdedNodes ${ROOT}/ComfyUI/custom_nodes/Derfuu_ComfyUI_ModdedNodes +COPY --from=node_2 ${ROOT}/ComfyUI/custom_nodes/comfyui-dreambait-nodes ${ROOT}/ComfyUI/custom_nodes/comfyui-dreambait-nodes +COPY --from=node_3 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation +COPY --from=node_4 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Crystools ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Crystools +COPY --from=node_5 ${ROOT}/ComfyUI/custom_nodes/execution-inversion-demo-comfyui ${ROOT}/ComfyUI/custom_nodes/execution-inversion-demo-comfyui +COPY --from=node_6 ${ROOT}/ComfyUI/custom_nodes/comfyui_controlnet_aux ${ROOT}/ComfyUI/custom_nodes/comfyui_controlnet_aux +COPY --from=node_7 ${ROOT}/ComfyUI/custom_nodes/ComfyUI_FizzNodes ${ROOT}/ComfyUI/custom_nodes/ComfyUI_FizzNodes +COPY --from=node_8 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet +COPY --from=node_9 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved ${ROOT}/ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved +COPY --from=node_10 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite ${ROOT}/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite +COPY --from=node_11 ${ROOT}/ComfyUI/custom_nodes/SeargeSDXL ${ROOT}/ComfyUI/custom_nodes/SeargeSDXL +COPY --from=node_12 ${ROOT}/ComfyUI/custom_nodes/ComfyUi_NNLatentUpscale ${ROOT}/ComfyUI/custom_nodes/ComfyUi_NNLatentUpscale +COPY --from=node_13 ${ROOT}/ComfyUI/custom_nodes/was-node-suite-comfyui ${ROOT}/ComfyUI/custom_nodes/was-node-suite-comfyui +COPY --from=node_14 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Manager ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Manager +COPY --from=node_15 ${ROOT}/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus ${ROOT}/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus +COPY --from=node_16 ${ROOT}/ComfyUI/custom_nodes/ComfyUI_essentials ${ROOT}/ComfyUI/custom_nodes/ComfyUI_essentials +COPY --from=node_17 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-DepthAnythingV2 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-DepthAnythingV2 +COPY --from=node_18 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Florence2 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Florence2 +COPY --from=node_19 ${ROOT}/ComfyUI/custom_nodes/efficiency-nodes-comfyui ${ROOT}/ComfyUI/custom_nodes/efficiency-nodes-comfyui +COPY --from=node_20 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-KJNodes ${ROOT}/ComfyUI/custom_nodes/ComfyUI-KJNodes +COPY --from=node_21 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Manager ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Manager +COPY --from=node_22 ${ROOT}/ComfyUI/custom_nodes/rgthree-comfy ${ROOT}/ComfyUI/custom_nodes/rgthree-comfy +COPY --from=node_23 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Depthflow-Nodes ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Depthflow-Nodes +COPY --from=node_24 ${ROOT}/ComfyUI/custom_nodes/comfyui_segment_anything ${ROOT}/ComfyUI/custom_nodes/comfyui_segment_anything +COPY --from=node_25 ${ROOT}/ComfyUI/custom_nodes/ComfyUI_ExtraModels ${ROOT}/ComfyUI/custom_nodes/ComfyUI_ExtraModels +COPY --from=node_26 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Custom-Scripts ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Custom-Scripts +COPY --from=node_27 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-LLaVA-OneVision ${ROOT}/ComfyUI/custom_nodes/ComfyUI-LLaVA-OneVision +COPY --from=node_28 ${ROOT}/ComfyUI/custom_nodes/ComfyUI_Primere_Nodes ${ROOT}/ComfyUI/custom_nodes/ComfyUI_Primere_Nodes +COPY --from=node_29 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Universal-Styler ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Universal-Styler +COPY --from=node_30 ${ROOT}/ComfyUI/custom_nodes/DJZ-Nodes ${ROOT}/ComfyUI/custom_nodes/DJZ-Nodes +COPY --from=node_31 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Easy-Use ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Easy-Use +COPY --from=node_32 ${ROOT}/ComfyUI/custom_nodes/ComfyUI_LayerStyle ${ROOT}/ComfyUI/custom_nodes/ComfyUI_LayerStyle +COPY --from=node_33 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-MochiWrapper ${ROOT}/ComfyUI/custom_nodes/ComfyUI-MochiWrapper +COPY --from=node_34 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-MochiEdit ${ROOT}/ComfyUI/custom_nodes/ComfyUI-MochiEdit + + +FROM middle-comfy-install AS download_0 +RUN echo "Downloading realismBYSTABLEYOGI_v4LCM.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/checkpoints/SD15/LCM +RUN wget -O "${ROOT}/ComfyUI/models/checkpoints/SD15/LCM/realismBYSTABLEYOGI_v4LCM.safetensors" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/realismBYSTABLEYOGI_v4LCM.safetensors" + + +FROM middle-comfy-install AS download_1 +RUN echo "Downloading Eden_SDXL.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/checkpoints +RUN wget -O "${ROOT}/ComfyUI/models/checkpoints/Eden_SDXL.safetensors" "https://edenartlab-lfs.s3.amazonaws.com/models/checkpoints/Eden_SDXL.safetensors" + + +FROM middle-comfy-install AS download_2 +RUN echo "Downloading A_black_image.jpg..." +RUN mkdir -p ${ROOT}/ComfyUI/input +RUN wget -O "${ROOT}/ComfyUI/input/A_black_image.jpg" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/assets/A_black_image.jpg" + + +FROM middle-comfy-install AS download_3 +RUN echo "Downloading A_white_image.jpg..." +RUN mkdir -p ${ROOT}/ComfyUI/input +RUN wget -O "${ROOT}/ComfyUI/input/A_white_image.jpg" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/assets/A_white_image.jpg" + + +FROM middle-comfy-install AS download_4 +RUN echo "Downloading a_black_video.mp4..." +RUN mkdir -p ${ROOT}/ComfyUI/input +RUN wget -O "${ROOT}/ComfyUI/input/a_black_video.mp4" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/assets/a_black_video.mp4" + + +FROM middle-comfy-install AS download_5 +RUN echo "Downloading depth_anything_v2_vitl_fp16.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/depthanything +RUN wget -O "${ROOT}/ComfyUI/models/depthanything/depth_anything_v2_vitl_fp16.safetensors" "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/resolve/main/depth_anything_v2_vitl_fp16.safetensors" + + +FROM middle-comfy-install AS download_6 +RUN echo "Downloading depth_anything_v2_vitl.pth..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/depth-anything/Depth-Anything-V2-Large +RUN wget -O "${ROOT}/ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/depth-anything/Depth-Anything-V2-Large/depth_anything_v2_vitl.pth" "https://huggingface.co/depth-anything/Depth-Anything-V2-Large/resolve/main/depth_anything_v2_vitl.pth" + + +FROM middle-comfy-install AS download_7 +RUN echo "Downloading NEG_EMBED_STABLE_YOGI_V3.pt..." +RUN mkdir -p ${ROOT}/ComfyUI/models/embeddings +RUN wget -O "${ROOT}/ComfyUI/models/embeddings/NEG_EMBED_STABLE_YOGI_V3.pt" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/embeddings/NEG_EMBED_STABLE_YOGI_V3.pt" + + +FROM middle-comfy-install AS download_8 +RUN echo "Downloading AnimateLCM_sd15_t2v.ckpt..." +RUN mkdir -p ${ROOT}/ComfyUI/models/animatediff_models +RUN wget -O "${ROOT}/ComfyUI/models/animatediff_models/AnimateLCM_sd15_t2v.ckpt" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/animatediff_models/AnimateLCM_sd15_t2v.ckpt" + + +FROM middle-comfy-install AS download_9 +RUN echo "Downloading v3_sd15_mm.ckpt..." +RUN mkdir -p ${ROOT}/ComfyUI/models/animatediff_models +RUN wget -O "${ROOT}/ComfyUI/models/animatediff_models/v3_sd15_mm.ckpt" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/animatediff_models/v3_sd15_mm.ckpt" + + +FROM middle-comfy-install AS download_10 +RUN echo "Downloading sd15_t2v_beta.ckpt..." +RUN mkdir -p ${ROOT}/ComfyUI/models/animatediff_models +RUN wget -O "${ROOT}/ComfyUI/models/animatediff_models/sd15_t2v_beta.ckpt" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/animatediff_models/sd15_t2v_beta.ckpt" + + +FROM middle-comfy-install AS download_11 +RUN echo "Downloading juggernaut_reborn-inpainting.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/checkpoints +RUN wget -O "${ROOT}/ComfyUI/models/checkpoints/juggernaut_reborn-inpainting.safetensors" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggernaut_reborn-inpainting.safetensors" + + +FROM middle-comfy-install AS download_12 +RUN echo "Downloading juggerxlInpaint_juggerInpaintV8.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/checkpoints +RUN wget -O "${ROOT}/ComfyUI/models/checkpoints/juggerxlInpaint_juggerInpaintV8.safetensors" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggerxlInpaint_juggerInpaintV8.safetensors" + + +FROM middle-comfy-install AS download_13 +RUN echo "Downloading juggernaut_reborn.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/checkpoints +RUN wget -O "${ROOT}/ComfyUI/models/checkpoints/juggernaut_reborn.safetensors" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggernaut_reborn.safetensors" + + +FROM middle-comfy-install AS download_14 +RUN echo "Downloading CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/clip_vision +RUN wget -O "${ROOT}/ComfyUI/models/clip_vision/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/clip_vision/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors" + + +FROM middle-comfy-install AS download_15 +RUN echo "Downloading adiff_ControlGIF_controlnet.ckpt..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/adiff_ControlGIF_controlnet.ckpt" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/adiff_ControlGIF_controlnet.ckpt" + + +FROM middle-comfy-install AS download_16 +RUN echo "Downloading control_v11p_sd15_canny_fp16.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_canny_fp16.safetensors" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_canny_fp16.safetensors" + + +FROM middle-comfy-install AS download_17 +RUN echo "Downloading control_v11f1p_sd15_depth.pth..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/control_v11f1p_sd15_depth.pth" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11f1p_sd15_depth.pth" + + +FROM middle-comfy-install AS download_18 +RUN echo "Downloading control_v11p_sd15_canny.pth..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_canny.pth" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_canny.pth" + + +FROM middle-comfy-install AS download_19 +RUN echo "Downloading control_v11p_sd15_lineart.pth..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_lineart.pth" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_lineart.pth" + + +FROM middle-comfy-install AS download_20 +RUN echo "Downloading control_v11p_sd15_openpose.pth..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_openpose.pth" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_openpose.pth" + + +FROM middle-comfy-install AS download_21 +RUN echo "Downloading control_v11p_sd15_scribble.pth..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_scribble.pth" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_scribble.pth" + + +FROM middle-comfy-install AS download_22 +RUN echo "Downloading controlnetQRPatternQR_v2Sd15.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/controlnetQRPatternQR_v2Sd15.safetensors" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/controlnetQRPatternQR_v2Sd15.safetensors" + + +FROM middle-comfy-install AS download_23 +RUN echo "Downloading v3_sd15_sparsectrl_rgb.ckpt..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/v3_sd15_sparsectrl_rgb.ckpt" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/v3_sd15_sparsectrl_rgb.ckpt" + + +FROM middle-comfy-install AS download_24 +RUN echo "Downloading v3_sd15_sparsectrl_scribble.ckpt..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/v3_sd15_sparsectrl_scribble.ckpt" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/v3_sd15_sparsectrl_scribble.ckpt" + + +FROM middle-comfy-install AS download_25 +RUN echo "Downloading controlnet_checkpoint.ckpt..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/controlnet_checkpoint.ckpt" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/controlnet_checkpoint.ckpt" + + +FROM middle-comfy-install AS download_26 +RUN echo "Downloading ip-adapter-plus_sd15.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/ipadapter +RUN wget -O "${ROOT}/ComfyUI/models/ipadapter/ip-adapter-plus_sd15.safetensors" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/ipadapter/ip-adapter-plus_sd15.safetensors" + + +FROM middle-comfy-install AS download_27 +RUN echo "Downloading v3_sd15_adapter.ckpt..." +RUN mkdir -p ${ROOT}/ComfyUI/models/loras +RUN wget -O "${ROOT}/ComfyUI/models/loras/v3_sd15_adapter.ckpt" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/loras/v3_sd15_adapter.ckpt" + + +FROM middle-comfy-install AS download_28 +RUN echo "Downloading RealESRGAN_x2plus.pth..." +RUN mkdir -p ${ROOT}/ComfyUI/models/upscale_models +RUN wget -O "${ROOT}/ComfyUI/models/upscale_models/RealESRGAN_x2plus.pth" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/upscale_models/RealESRGAN_x2plus.pth" + + +FROM middle-comfy-install AS download_29 +RUN echo "Downloading rife47.pth..." +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife +RUN wget -O "${ROOT}/ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife/rife47.pth" "https://github.com/styler00dollar/VSGAN-tensorrt-docker/releases/download/models/rife47.pth" + + +FROM middle-comfy-install AS download_30 +RUN echo "Downloading mm_sd_v15_v2.ckpt..." +RUN mkdir -p ${ROOT}/ComfyUI/models/animatediff_models +RUN wget -O "${ROOT}/ComfyUI/models/animatediff_models/mm_sd_v15_v2.ckpt" "https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15_v2.ckpt" + + +FROM middle-comfy-install AS download_31 +RUN echo "Downloading zavychromaxl_v80.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/checkpoints +RUN wget -O "${ROOT}/ComfyUI/models/checkpoints/zavychromaxl_v80.safetensors" "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/zavychromaxl_v80.safetensors" + + +FROM middle-comfy-install AS download_32 +RUN echo "Downloading hsxl_temporal_layers.f16.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/animatediff_models +RUN wget -O "${ROOT}/ComfyUI/models/animatediff_models/hsxl_temporal_layers.f16.safetensors" "https://huggingface.co/hotshotco/Hotshot-XL/resolve/main/hsxl_temporal_layers.f16.safetensors" + + +FROM middle-comfy-install AS download_33 +RUN echo "Downloading diffusion_pytorch_model.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet/SDXL/controlnet-depth-sdxl-1.0 +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/SDXL/controlnet-depth-sdxl-1.0/diffusion_pytorch_model.safetensors" "https://huggingface.co/xinsir/controlnet-depth-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors" + + +FROM middle-comfy-install AS download_34 +RUN echo "Downloading diffusion_pytorch_model_V2.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet/SDXL/controlnet-canny-sdxl-1.0 +RUN wget -O "${ROOT}/ComfyUI/models/controlnet/SDXL/controlnet-canny-sdxl-1.0/diffusion_pytorch_model_V2.safetensors" "https://huggingface.co/xinsir/controlnet-canny-sdxl-1.0/resolve/main/diffusion_pytorch_model_V2.safetensors" + + +FROM middle-comfy-install AS download_35 +RUN echo "Downloading ip-adapter-plus_sdxl_vit-h.safetensors..." +RUN mkdir -p ${ROOT}/ComfyUI/models/ipadapter +RUN wget -O "${ROOT}/ComfyUI/models/ipadapter/ip-adapter-plus_sdxl_vit-h.safetensors" "https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus_sdxl_vit-h.safetensors" + + +FROM middle-nodes AS middle-models + +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife +RUN mkdir -p ${ROOT}/ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/depth-anything/Depth-Anything-V2-Large +RUN mkdir -p ${ROOT}/ComfyUI/input +RUN mkdir -p ${ROOT}/ComfyUI/models/animatediff_models +RUN mkdir -p ${ROOT}/ComfyUI/models/checkpoints +RUN mkdir -p ${ROOT}/ComfyUI/models/checkpoints/SD15/LCM +RUN mkdir -p ${ROOT}/ComfyUI/models/clip_vision +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet/SDXL/controlnet-canny-sdxl-1.0 +RUN mkdir -p ${ROOT}/ComfyUI/models/controlnet/SDXL/controlnet-depth-sdxl-1.0 +RUN mkdir -p ${ROOT}/ComfyUI/models/depthanything +RUN mkdir -p ${ROOT}/ComfyUI/models/embeddings +RUN mkdir -p ${ROOT}/ComfyUI/models/ipadapter +RUN mkdir -p ${ROOT}/ComfyUI/models/loras +RUN mkdir -p ${ROOT}/ComfyUI/models/upscale_models +COPY --from=download_0 ${ROOT}/ComfyUI/models/checkpoints/SD15/LCM/realismBYSTABLEYOGI_v4LCM.safetensors ${ROOT}/ComfyUI/models/checkpoints/SD15/LCM/realismBYSTABLEYOGI_v4LCM.safetensors +COPY --from=download_1 ${ROOT}/ComfyUI/models/checkpoints/Eden_SDXL.safetensors ${ROOT}/ComfyUI/models/checkpoints/Eden_SDXL.safetensors +COPY --from=download_2 ${ROOT}/ComfyUI/input/A_black_image.jpg ${ROOT}/ComfyUI/input/A_black_image.jpg +COPY --from=download_3 ${ROOT}/ComfyUI/input/A_white_image.jpg ${ROOT}/ComfyUI/input/A_white_image.jpg +COPY --from=download_4 ${ROOT}/ComfyUI/input/a_black_video.mp4 ${ROOT}/ComfyUI/input/a_black_video.mp4 +COPY --from=download_5 ${ROOT}/ComfyUI/models/depthanything/depth_anything_v2_vitl_fp16.safetensors ${ROOT}/ComfyUI/models/depthanything/depth_anything_v2_vitl_fp16.safetensors +COPY --from=download_6 ${ROOT}/ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/depth-anything/Depth-Anything-V2-Large/depth_anything_v2_vitl.pth ${ROOT}/ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/depth-anything/Depth-Anything-V2-Large/depth_anything_v2_vitl.pth +COPY --from=download_7 ${ROOT}/ComfyUI/models/embeddings/NEG_EMBED_STABLE_YOGI_V3.pt ${ROOT}/ComfyUI/models/embeddings/NEG_EMBED_STABLE_YOGI_V3.pt +COPY --from=download_8 ${ROOT}/ComfyUI/models/animatediff_models/AnimateLCM_sd15_t2v.ckpt ${ROOT}/ComfyUI/models/animatediff_models/AnimateLCM_sd15_t2v.ckpt +COPY --from=download_9 ${ROOT}/ComfyUI/models/animatediff_models/v3_sd15_mm.ckpt ${ROOT}/ComfyUI/models/animatediff_models/v3_sd15_mm.ckpt +COPY --from=download_10 ${ROOT}/ComfyUI/models/animatediff_models/sd15_t2v_beta.ckpt ${ROOT}/ComfyUI/models/animatediff_models/sd15_t2v_beta.ckpt +COPY --from=download_11 ${ROOT}/ComfyUI/models/checkpoints/juggernaut_reborn-inpainting.safetensors ${ROOT}/ComfyUI/models/checkpoints/juggernaut_reborn-inpainting.safetensors +COPY --from=download_12 ${ROOT}/ComfyUI/models/checkpoints/juggerxlInpaint_juggerInpaintV8.safetensors ${ROOT}/ComfyUI/models/checkpoints/juggerxlInpaint_juggerInpaintV8.safetensors +COPY --from=download_13 ${ROOT}/ComfyUI/models/checkpoints/juggernaut_reborn.safetensors ${ROOT}/ComfyUI/models/checkpoints/juggernaut_reborn.safetensors +COPY --from=download_14 ${ROOT}/ComfyUI/models/clip_vision/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors ${ROOT}/ComfyUI/models/clip_vision/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors +COPY --from=download_15 ${ROOT}/ComfyUI/models/controlnet/adiff_ControlGIF_controlnet.ckpt ${ROOT}/ComfyUI/models/controlnet/adiff_ControlGIF_controlnet.ckpt +COPY --from=download_16 ${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_canny_fp16.safetensors ${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_canny_fp16.safetensors +COPY --from=download_17 ${ROOT}/ComfyUI/models/controlnet/control_v11f1p_sd15_depth.pth ${ROOT}/ComfyUI/models/controlnet/control_v11f1p_sd15_depth.pth +COPY --from=download_18 ${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_canny.pth ${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_canny.pth +COPY --from=download_19 ${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_lineart.pth ${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_lineart.pth +COPY --from=download_20 ${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_openpose.pth ${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_openpose.pth +COPY --from=download_21 ${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_scribble.pth ${ROOT}/ComfyUI/models/controlnet/control_v11p_sd15_scribble.pth +COPY --from=download_22 ${ROOT}/ComfyUI/models/controlnet/controlnetQRPatternQR_v2Sd15.safetensors ${ROOT}/ComfyUI/models/controlnet/controlnetQRPatternQR_v2Sd15.safetensors +COPY --from=download_23 ${ROOT}/ComfyUI/models/controlnet/v3_sd15_sparsectrl_rgb.ckpt ${ROOT}/ComfyUI/models/controlnet/v3_sd15_sparsectrl_rgb.ckpt +COPY --from=download_24 ${ROOT}/ComfyUI/models/controlnet/v3_sd15_sparsectrl_scribble.ckpt ${ROOT}/ComfyUI/models/controlnet/v3_sd15_sparsectrl_scribble.ckpt +COPY --from=download_25 ${ROOT}/ComfyUI/models/controlnet/controlnet_checkpoint.ckpt ${ROOT}/ComfyUI/models/controlnet/controlnet_checkpoint.ckpt +COPY --from=download_26 ${ROOT}/ComfyUI/models/ipadapter/ip-adapter-plus_sd15.safetensors ${ROOT}/ComfyUI/models/ipadapter/ip-adapter-plus_sd15.safetensors +COPY --from=download_27 ${ROOT}/ComfyUI/models/loras/v3_sd15_adapter.ckpt ${ROOT}/ComfyUI/models/loras/v3_sd15_adapter.ckpt +COPY --from=download_28 ${ROOT}/ComfyUI/models/upscale_models/RealESRGAN_x2plus.pth ${ROOT}/ComfyUI/models/upscale_models/RealESRGAN_x2plus.pth +COPY --from=download_29 ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife/rife47.pth ${ROOT}/ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife/rife47.pth +COPY --from=download_30 ${ROOT}/ComfyUI/models/animatediff_models/mm_sd_v15_v2.ckpt ${ROOT}/ComfyUI/models/animatediff_models/mm_sd_v15_v2.ckpt +COPY --from=download_31 ${ROOT}/ComfyUI/models/checkpoints/zavychromaxl_v80.safetensors ${ROOT}/ComfyUI/models/checkpoints/zavychromaxl_v80.safetensors +COPY --from=download_32 ${ROOT}/ComfyUI/models/animatediff_models/hsxl_temporal_layers.f16.safetensors ${ROOT}/ComfyUI/models/animatediff_models/hsxl_temporal_layers.f16.safetensors +COPY --from=download_33 ${ROOT}/ComfyUI/models/controlnet/SDXL/controlnet-depth-sdxl-1.0/diffusion_pytorch_model.safetensors ${ROOT}/ComfyUI/models/controlnet/SDXL/controlnet-depth-sdxl-1.0/diffusion_pytorch_model.safetensors +COPY --from=download_34 ${ROOT}/ComfyUI/models/controlnet/SDXL/controlnet-canny-sdxl-1.0/diffusion_pytorch_model_V2.safetensors ${ROOT}/ComfyUI/models/controlnet/SDXL/controlnet-canny-sdxl-1.0/diffusion_pytorch_model_V2.safetensors +COPY --from=download_35 ${ROOT}/ComfyUI/models/ipadapter/ip-adapter-plus_sdxl_vit-h.safetensors ${ROOT}/ComfyUI/models/ipadapter/ip-adapter-plus_sdxl_vit-h.safetensors + + +FROM middle-models AS model-compressor + +RUN mkdir -p ${ROOT}/tmp +RUN cd ${ROOT}/ComfyUI && tar -I 'zstd -T0' -cf ${ROOT}/tmp/models.tar.zst models/ +RUN rm -rf ${ROOT}/ComfyUI/models + + + + +# [END_GENERATED_CONTENT] + + + +FROM middle-models AS compressed_import + +COPY --from=model-compressor ${ROOT}/tmp/models.tar.zst ${ROOT}/tmp/models.tar.zst + +FROM compressed_import AS end + +COPY . ${ROOT}/tempscripts +RUN sudo chmod +x -R ${ROOT}/tempscripts + +COPY --from=scripts . ${ROOT}/scripts/ +RUN sudo chmod +x ${ROOT}/scripts/*.sh + +RUN sudo cp -r ${ROOT}/tempscripts/* ${ROOT}/scripts && \ + sudo chown -R ubuntu:ubuntu ${ROOT}/scripts + +CMD ["/home/ubuntu/scripts/start.sh"] \ No newline at end of file diff --git a/docker/_oldstuff/tester/models_config_contaidner.json b/docker/_oldstuff/tester/models_config_contaidner.json new file mode 100644 index 0000000..1839a2d --- /dev/null +++ b/docker/_oldstuff/tester/models_config_contaidner.json @@ -0,0 +1,9 @@ +{ + "models": [ + { + "name": "rife47.pth", + "url": "https://github.com/styler00dollar/VSGAN-tensorrt-docker/releases/download/models/rife47.pth", + "path": "custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife/" + } + ] + } \ No newline at end of file diff --git a/docker/_oldstuff/tester/models_config_image.json b/docker/_oldstuff/tester/models_config_image.json new file mode 100644 index 0000000..543e87c --- /dev/null +++ b/docker/_oldstuff/tester/models_config_image.json @@ -0,0 +1,14 @@ +{ + "models": [ + { + "name": "depth_anything_v2_vitl_fp16.safetensors", + "url": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/resolve/main/depth_anything_v2_vitl_fp16.safetensors", + "path": "models/depthanything/" + }, + { + "name": "depth_anything_v2_vitl.pth", + "url": "https://huggingface.co/depth-anything/Depth-Anything-V2-Large/resolve/main/depth_anything_v2_vitl.pth", + "path": "custom_nodes/comfyui_controlnet_aux/ckpts/depth-anything/Depth-Anything-V2-Large/" + } + ] +} \ No newline at end of file diff --git a/docker/_oldstuff/tester/models_container.sh b/docker/_oldstuff/tester/models_container.sh new file mode 100755 index 0000000..d813edb --- /dev/null +++ b/docker/_oldstuff/tester/models_container.sh @@ -0,0 +1,8 @@ +#!/bin/bash +ROOT=/home/ubuntu/ComfyUI + +git lfs install + +mkdir -p ${ROOT}/models/controlnet + +cd ${ROOT}/models/controlnet && wget https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile_fp16.safetensors; \ No newline at end of file diff --git a/docker/_oldstuff/tester/nodes.sh b/docker/_oldstuff/tester/nodes.sh new file mode 100755 index 0000000..b7bf620 --- /dev/null +++ b/docker/_oldstuff/tester/nodes.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +ROOT=/home/ubuntu/ComfyUI + +PIP=/home/ubuntu/ComfyUI/venv/bin/pip + +mkdir -p ${ROOT}/custom_nodes +cd ${ROOT}/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager && cd "$(basename "$_" .git)" && ${PIP} install -r requirements.txt +cd ${ROOT}/custom_nodes && git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet && cd "$(basename "$_" .git)" && git reset --hard b9c8bdc6dd47f3eb322c3194bee10afe80c5fbad diff --git a/docker/_oldstuff/tester/start.sh b/docker/_oldstuff/tester/start.sh new file mode 100644 index 0000000..a9ef689 --- /dev/null +++ b/docker/_oldstuff/tester/start.sh @@ -0,0 +1,140 @@ +#!/bin/bash +set -e # Exit immediately if a command exits with a non-zero status +set -o pipefail # Capture errors in pipe chains + +log() { + echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*" +} + +# Ensure ROOT is set +: "${ROOT:=/home/ubuntu}" +log "Using ROOT directory: $ROOT" + +error_exit() { + log "ERROR: $1" >&2 + exit 1 +} + +extract_models() { + if [ -f "${ROOT}/tmp/models.tar.zst" ]; then + cd ${ROOT} + log "Extracting models..." + tar -I zstd -xvf ${ROOT}/tmp/models.tar.zst + log "remove temp files..." + sudo rm ${ROOT}/tmp/models.tar.zst + log "Merging Comfy UI models..." + cp -rn ${ROOT}/models/* ${ROOT}/ComfyUI/models + log "Cleaning up..." + sudo rm -rf ${ROOT}/models + log "Clean" + fi +} + +setup_comfyui() { + local comfyui_path="${ROOT}/ComfyUI" + local comfyui_commit="915fdb57454c094391d830cefb4ffdd24ed8088c" + + cd "$comfyui_path" + # Activate virtual environment + # shellcheck disable=SC1091 + source venv/bin/activate + + git reset --hard "$comfyui_commit" + # pip install -r requirements.txt + + pip install "numpy < 2" + + deactivate +} + +install_models() { + local config_path="${ROOT}/scripts/models_config_container.json" + + if [ ! -f "$config_path" ]; then + log "No models configuration found at $config_path - skipping model downloads" + return 0 + fi + + # Process models from config and download them directly to ComfyUI/models + python3 -c ' +import json +import os +import urllib.request +import sys +from tqdm import tqdm + +def download_file(url, path, name): + # If path ends with /, treat it as a directory and append the name + if path.endswith("/"): + path = os.path.join(path, name) + + os.makedirs(os.path.dirname(path), exist_ok=True) + print(f"\nDownloading model: {name}") + print(f"URL: {url}") + print(f"To: {path}") + + try: + response = urllib.request.urlopen(url) + total_size = int(response.headers.get("content-length", 0)) + block_size = 1024 # 1 Kibibyte + progress_bar = tqdm(total=total_size, unit="iB", unit_scale=True) + + with open(path, "wb") as f: + while True: + buffer = response.read(block_size) + if not buffer: + break + size = f.write(buffer) + progress_bar.update(size) + + progress_bar.close() + print(f"✓ Download complete: {name}\n") + + except Exception as e: + print(f"✗ Error downloading {name}: {str(e)}", file=sys.stderr) + raise + +def process_config(): + config_path = "/home/ubuntu/scripts/models_config_container.json" + comfy_dir = "/home/ubuntu/ComfyUI" + + print("\n=== Starting Model Downloads ===\n") + + with open(config_path, "r") as f: + config = json.load(f) + + total_models = len(config["models"]) + print(f"Found {total_models} models to download\n") + + for i, model in enumerate(config["models"], 1): + url = model["url"] + name = model["name"] # name is now required + path = os.path.join(comfy_dir, model["path"]) + print(f"\n[{i}/{total_models}] Processing model: {name}") + try: + download_file(url, path, name) + except Exception as e: + print(f"Failed to download model {name} ({i}/{total_models})") + continue + + print("\n=== Model Downloads Complete ===\n") + +process_config() +' +} + +main() { + setup_comfyui + install_models + extract_models + log "done" +} + +if [ ! -f "/etc/nginx-repo" ]; then + main || error_exit "Failed to complete startup process" +else + log "Nginx configuration already exists" +fi + +log "Goodnight!! 😴😴💤🥱😴💤" +sleep infinity \ No newline at end of file diff --git a/docker/_oldstuff/video_new/models.sh b/docker/_oldstuff/video_new/models.sh deleted file mode 100755 index 8dad9d6..0000000 --- a/docker/_oldstuff/video_new/models.sh +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/bash -ROOT=/comfyui-launcher/ComfyUI - -git lfs install - -mkdir -p ${ROOT}/models/clip -mkdir -p ${ROOT}/models/LLavacheckpoints -mkdir -p ${ROOT}/models/LLM -mkdir -p ${ROOT}/models/CogVideo -mkdir -p ${ROOT}/models/checkpoints -mkdir -p ${ROOT}/models/diffusion_models/mochi -mkdir -p ${ROOT}/models/vae/mochi -mkdir -p ${ROOT}/models/checkpoints/SD15/LCM -mkdir -p ${ROOT}/models/depthanything -mkdir -p ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/depth-anything/Depth-Anything-V2-Large -mkdir -p ${ROOT}/models/embeddings -mkdir -p ${ROOT}/models/animatediff_models -mkdir -p ${ROOT}/models/clip_vision -mkdir -p ${ROOT}/models/controlnet -mkdir -p ${ROOT}/models/ipadapter -mkdir -p ${ROOT}/models/loras -mkdir -p ${ROOT}/models/upscale_models -mkdir -p ${ROOT}/models/controlnet/SDXL/controlnet-depth-sdxl-1.0 -mkdir -p ${ROOT}/models/controlnet/SDXL/controlnet-canny-sdxl-1.0 -mkdir -p ${ROOT}/custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife - -cd ${ROOT}/models/checkpoints/SD15/LCM && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/realismBYSTABLEYOGI_v4LCM.safetensors -O realismBYSTABLEYOGI_v4LCM.safetensors -cd ${ROOT}/models/checkpoints && wget https://edenartlab-lfs.s3.amazonaws.com/models/checkpoints/Eden_SDXL.safetensors -O Eden_SDXL.safetensors -cd ${ROOT}/input && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/assets/A_black_image.jpg -O A_black_image.jpg -cd ${ROOT}/input && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/assets/A_white_image.jpg -O A_white_image.jpg -cd ${ROOT}/input && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/assets/a_black_video.mp4 -O a_black_video.mp4 - -cd ${ROOT}/models/depthanything && wget https://huggingface.co/Kijai/DepthAnythingV2-safetensors/resolve/main/depth_anything_v2_vitl_fp16.safetensors -O depth_anything_v2_vitl_fp16.safetensors -cd ${ROOT}/custom_nodes/comfyui_controlnet_aux/ckpts/depth-anything/Depth-Anything-V2-Large && wget https://huggingface.co/depth-anything/Depth-Anything-V2-Large/resolve/main/depth_anything_v2_vitl.pth -O depth_anything_v2_vitl.pth - -cd ${ROOT}/models/embeddings && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/embeddings/NEG_EMBED_STABLE_YOGI_V3.pt -O NEG_EMBED_STABLE_YOGI_V3.pt -cd ${ROOT}/models/animatediff_models && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/animatediff_models/AnimateLCM_sd15_t2v.ckpt -O AnimateLCM_sd15_t2v.ckpt -cd ${ROOT}/models/animatediff_models && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/animatediff_models/v3_sd15_mm.ckpt -O v3_sd15_mm.ckpt -cd ${ROOT}/models/animatediff_models && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/animatediff_models/sd15_t2v_beta.ckpt -O sd15_t2v_beta.ckpt -cd ${ROOT}/models/checkpoints && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggernaut_reborn-inpainting.safetensors -O juggernaut_reborn-inpainting.safetensors -cd ${ROOT}/models/checkpoints && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggerxlInpaint_juggerInpaintV8.safetensors -O juggerxlInpaint_juggerInpaintV8.safetensors -cd ${ROOT}/models/checkpoints && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggernaut_reborn.safetensors -O juggernaut_reborn.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 -O CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/adiff_ControlGIF_controlnet.ckpt -O adiff_ControlGIF_controlnet.ckpt -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_canny_fp16.safetensors -O control_v11p_sd15_canny_fp16.safetensors - -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11f1p_sd15_depth.pth -O control_v11f1p_sd15_depth.pth -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_canny.pth -O control_v11p_sd15_canny.pth -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_lineart.pth -O control_v11p_sd15_lineart.pth -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_openpose.pth -O control_v11p_sd15_openpose.pth -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_scribble.pth -O control_v11p_sd15_scribble.pth -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/controlnetQRPatternQR_v2Sd15.safetensors -O controlnetQRPatternQR_v2Sd15.safetensors - -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/v3_sd15_sparsectrl_rgb.ckpt -O v3_sd15_sparsectrl_rgb.ckpt -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/v3_sd15_sparsectrl_scribble.ckpt -O v3_sd15_sparsectrl_scribble.ckpt -cd ${ROOT}/models/controlnet && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/controlnet_checkpoint.ckpt -O controlnet_checkpoint.ckpt -cd ${ROOT}/models/ipadapter && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/ipadapter/ip-adapter-plus_sd15.safetensors -O ip-adapter-plus_sd15.safetensors -cd ${ROOT}/models/loras && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/loras/v3_sd15_adapter.ckpt -O v3_sd15_adapter.ckpt -cd ${ROOT}/models/upscale_models && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/upscale_models/RealESRGAN_x2plus.pth -O RealESRGAN_x2plus.pth -cd ${ROOT}/custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife && wget https://github.com/styler00dollar/VSGAN-tensorrt-docker/releases/download/models/rife47.pth -O rife47.pth -cd ${ROOT}/models/animatediff_models && wget https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15_v2.ckpt?download=true -O mm_sd_v15_v2.ckpt -cd ${ROOT}/models/checkpoints && wget https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/zavychromaxl_v80.safetensors -O zavychromaxl_v80.safetensors -cd ${ROOT}/models/animatediff_models && wget https://huggingface.co/hotshotco/Hotshot-XL/resolve/main/hsxl_temporal_layers.f16.safetensors -O hsxl_temporal_layers.f16.safetensors -cd ${ROOT}/models/controlnet/SDXL/controlnet-depth-sdxl-1.0 && wget https://huggingface.co/xinsir/controlnet-depth-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors -O diffusion_pytorch_model.safetensors -cd ${ROOT}/models/controlnet/SDXL/controlnet-canny-sdxl-1.0 && wget https://huggingface.co/xinsir/controlnet-canny-sdxl-1.0/resolve/main/diffusion_pytorch_model_V2.safetensors -O diffusion_pytorch_model_V2.safetensors -cd ${ROOT}/models/ipadapter && wget https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus_sdxl_vit-h.safetensors -O ip-adapter-plus_sdxl_vit-h.safetensors -cd ${ROOT}/models/clip && wget https://huggingface.co/Comfy-Org/mochi_preview_repackaged/resolve/main/split_files/text_encoders/t5xxl_fp8_e4m3fn_scaled.safetensors -O t5xxl_fp8_e4m3fn_scaled.safetensors -cd ${ROOT}/models/vae && wget https://huggingface.co/Comfy-Org/mochi_preview_repackaged/resolve/main/split_files/vae/mochi_vae.safetensors -O mochi_vae.safetensors -cd ${ROOT}/models/diffusion_models && wget https://huggingface.co/Comfy-Org/mochi_preview_repackaged/resolve/main/split_files/diffusion_models/mochi_preview_fp8_scaled.safetensors -O mochi_preview_fp8_scaled.safetensors \ No newline at end of file diff --git a/docker/_oldstuff/video_new/nodes.sh b/docker/_oldstuff/video_new/nodes.sh deleted file mode 100755 index 5d88c98..0000000 --- a/docker/_oldstuff/video_new/nodes.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash - -ROOT=/comfyui-launcher - -mkdir -p ${ROOT}/nodes \ - -cd ${ROOT}/nodes && git clone https://github.com/edenartlab/eden_comfy_pipelines.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt \ -&& echo "OPENAI_API_KEY=${OPENAI_API_KEY}" >> .env; -cd ${ROOT}/nodes && git clone https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/drmbt/comfyui-dreambait-nodes && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/Fannovel16/ComfyUI-Frame-Interpolation && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/crystian/ComfyUI-Crystools && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/BadCafeCode/execution-inversion-demo-comfyui.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/Fannovel16/comfyui_controlnet_aux && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/FizzleDorf/ComfyUI_FizzNodes && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/SeargeDP/SeargeSDXL && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/Ttl/ComfyUi_NNLatentUpscale && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/aiXander/ComfyUI-Manager.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/cubiq/ComfyUI_essentials && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/kijai/ComfyUI-DepthAnythingV2 && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/kijai/ComfyUI-Florence2 && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/jags111/efficiency-nodes-comfyui && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/kijai/ComfyUI-KJNodes && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/rgthree/rgthree-comfy && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/akatz-ai/ComfyUI-Depthflow-Nodes && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/storyicon/comfyui_segment_anything && cd "$(basename "$_" .git)" && pip install -r requirements.txt; - -cd ${ROOT}/nodes && git clone https://github.com/city96/ComfyUI_ExtraModels.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/kijai/ComfyUI-LLaVA-OneVision.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/CosmicLaca/ComfyUI_Primere_Nodes.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/KoreTeknology/ComfyUI-Universal-Styler.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/MushroomFleet/DJZ-Nodes.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/yolain/ComfyUI-Easy-Use.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/chflame163/ComfyUI_LayerStyle.git - -cd ${ROOT}/nodes && git clone https://github.com/kijai/ComfyUI-MochiWrapper.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; -cd ${ROOT}/nodes && git clone https://github.com/logtd/ComfyUI-MochiEdit.git && cd "$(basename "$_" .git)" && pip install -r requirements.txt; \ No newline at end of file diff --git a/docker/_scripts/comfyui b/docker/_scripts/comfyui deleted file mode 100644 index c92ccb8..0000000 --- a/docker/_scripts/comfyui +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -### BEGIN INIT INFO -# Provides: comfyui -# Required-Start: $network -# Required-Stop: $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start ComfyUI -### END INIT INFO - -# Path to your virtual environment -VENV_PATH=/comfyui-launcher/ComfyUI/venv - -# Path to your Python script -SCRIPT_PATH=/comfyui-launcher/ComfyUI/main.py - -PYTHON_PATH=/comfyui-launcher/ComfyUI/venv/bin/python - -# Log Path -LOG_PATH=/tmp/comfyui_debug.log - -case "$1" in - start) - echo "Starting ComfyUI" - echo "Starting ComfyUI at $(date)" >> $LOG_PATH - $PYTHON_PATH $SCRIPT_PATH --listen 0.0.0.0 >> $LOG_PATH 2>&1 & - COMFYUI_PID=$! - echo "ComfyUI started with PID $COMFYUI_PID" >> $LOG_PATH - echo "ComfyUI started with PID $COMFYUI_PID" # Output the PID for debugging - ;; - stop) - echo "Stopping ComfyUI" - pkill -f "/comfyui-launcher/ComfyUI/main.py" - ;; - restart) - $0 stop - $0 start - ;; - *) - echo "Usage: $0 {start|stop|restart|status}" - exit 1 - ;; -esac -exit 0 \ No newline at end of file diff --git a/docker/_scripts/cron.sh b/docker/_scripts/cron.sh deleted file mode 100755 index c9cab69..0000000 --- a/docker/_scripts/cron.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -FOLDER_PATH="/comfyui-launcher/ComfyUI/output" - -# Run the cron job every hour -CRON_JOB="0 * * * * rm -f $FOLDER_PATH/*" - -# Check if the cron job already exists -(crontab -l | grep -q "$CRON_JOB") || (crontab -l; echo "$CRON_JOB") | crontab - diff --git a/docker/_scripts/start.sh b/docker/_scripts/start.sh deleted file mode 100755 index 4e586ed..0000000 --- a/docker/_scripts/start.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash -set -e # Exit immediately if a command exits with a non-zero status -set -o pipefail # Capture errors in pipe chains - -# Logging function -log() { - echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*" -} - -# Error handling function -error_exit() { - log "ERROR: $1" >&2 - exit 1 -} - -# Ensure ROOT is set -: "${ROOT:=/comfyui-launcher}" -log "Using ROOT directory: $ROOT" - - -setup_nginx() { - log "Setting up Nginx configuration..." - sudo rm -rf /etc/nginx - sudo git clone git@github.com:stakeordie/emprops-nginx-conf.git /etc/nginx-repo - sudo ln -s /etc/nginx-repo/node /etc/nginx -} - -setup_comfyui() { - local comfyui_path="${ROOT}/ComfyUI" - - if [ ! -d "$comfyui_path" ]; then - log "Cloning ComfyUI repository..." - git clone https://github.com/comfyanonymous/ComfyUI.git "$comfyui_path" - else - log "ComfyUI directory already exists" - fi - - cd "$comfyui_path" - - # Create virtual environment if not exists - if [ ! -d "venv" ]; then - log "Creating virtual environment..." - python3 -m venv venv - fi - - # Activate virtual environment - # shellcheck disable=SC1091 - source venv/bin/activate - - pip install --upgrade pip - - # Install main requirements - log "Installing ComfyUI requirements..." - cd "$comfyui_path" && ls - pip install -r requirements.txt -} - -install_custom_node_requirements() { - local custom_nodes_path="${ROOT}/ComfyUI/custom_nodes" - - mkdir -p "$custom_nodes_path" - - # Move contents of ~/nodes into custom_nodes if ~/nodes exists and is not empty - if [ -d ${ROOT}/nodes ] && [ "$(ls -A ${ROOT}/nodes)" ]; then - log "Moving contents of ${ROOT}/nodes into ${custom_nodes_path}..." - mv ${ROOT}/nodes/* "$custom_nodes_path/" - - # Optional: Remove the now-empty ~/nodes directory - rmdir ${ROOT}/nodes 2>/dev/null || true - fi - - # Find and install requirements for each custom node - log "Installing custom node requirements..." - - cd $custom_nodes_path - find . -name "requirements.txt" | while read -r req_file; do - log "Installing requirements from $req_file" - pip install -r "$req_file" - done - - pip install "numpy < 2" -} - -install_models() { - /scripts/models.sh -} - -main() { - setup_nginx - setup_comfyui - install_custom_node_requirements - install_models - - # Deactivate virtual environment - deactivate - - # Start ComfyUI or any other required services - - mv /scripts/comfyui /etc/init.d/ - - sudo chmod +x /etc/init.d/comfyui - sudo update-rc.d comfyui defaults - - /etc/init.d/nginx start - - /scripts/cron.sh - - service comfyui start -} - -if [ ! -f "/etc/nginx-repo" ]; then - main || error_exit "Failed to complete startup process" -else - log "Nginx configuration already exists" -fi - -sleep infinity \ No newline at end of file diff --git a/docker/basic/nodes.sh b/docker/basic/nodes.sh deleted file mode 100755 index 1a40529..0000000 --- a/docker/basic/nodes.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -ROOT=/comfyui-launcher - -mkdir -p ${ROOT}/nodes -cd ${ROOT}/nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager -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" -cd ${ROOT}/nodes && git clone https://github.com/crystian/ComfyUI-Crystools && cd "$(basename "$_" .git)" && git reset --hard "ad2e9b8be8c601f17cf04d676a16afe538b89497" -cd ${ROOT}/nodes && git clone https://github.com/alt-key-project/comfyui-dream-project && cd "$(basename "$_" .git)" && git reset --hard "b2ddca87a95881d2b37f4602edfcc7507da39a9c" -cd ${ROOT}/nodes && git clone https://github.com/yolain/ComfyUI-Easy-Use && cd "$(basename "$_" .git)" && git reset --hard "c51d1fdea2edad09e6788eafea4312fcf1a7bb27" -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" -cd ${ROOT}/nodes && git clone https://github.com/cubiq/ComfyUI_essentials && cd "$(basename "$_" .git)" && git reset --hard "64e38fd0f3b2e925573684f4a43727be80dc7d5b" -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" -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" -cd ${ROOT}/nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui && cd "$(basename "$_" .git)" && git reset --hard "b2f12387b2af5aae98d69d785709971c123a10fd" -cd ${ROOT}/nodes && git clone https://github.com/huchenlei/ComfyUI-layerdiffuse -cd ${ROOT}/nodes && git clone https://github.com/Fannovel16/comfyui_controlnet_aux -cd ${ROOT}/nodes && git clone https://github.com/aria1th/ComfyUI-LogicUtils -cd ${ROOT}/nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack -cd ${ROOT}/nodes && git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts -cd ${ROOT}/nodes && git clone --recursive https://github.com/receyuki/comfyui-prompt-reader-node && cd "$(basename "$_" .git)" && git reset --hard 07a1a5314d09dad4a8445d6921914e8ea8250324 -cd ${ROOT}/nodes && git clone https://github.com/edenartlab/eden_comfy_pipelines -cd ${ROOT}/nodes && git clone https://github.com/evanspearman/ComfyMath -cd ${ROOT}/nodes && git clone https://github.com/drmbt/comfyui-dreambait-nodes diff --git a/docker/config/basic/config.json b/docker/config/basic/config.json new file mode 100644 index 0000000..93ec3fd --- /dev/null +++ b/docker/config/basic/config.json @@ -0,0 +1,312 @@ +{ + "comfy_version": "915fdb57454c094391d830cefb4ffdd24ed8088c", + "nodes": [ + { + "name": "ComfyUI-Manager", + "url": "https://github.com/ltdrdata/ComfyUI-Manager", + "requirements": true + }, + { + "name": "ComfyUI-Advanced-ControlNet", + "url": "https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet", + "requirements": true, + "commit": "b9c8bdc6dd47f3eb322c3194bee10afe80c5fbad" + }, + { + "name": "ComfyUI-AutomaticCFG", + "url": "https://github.com/Extraltodeus/ComfyUI-AutomaticCFG", + "requirements": true, + "commit": "2e395317b65c05a97a0ef566c4a8c7969305dafa" + }, + { + "name": "ComfyUI-Crystools", + "url": "https://github.com/crystian/ComfyUI-Crystools", + "requirements": true, + "commit": "ad2e9b8be8c601f17cf04d676a16afe538b89497" + }, + { + "name": "comfyui-dream-project", + "url": "https://github.com/alt-key-project/comfyui-dream-project", + "requirements": true, + "commit": "b2ddca87a95881d2b37f4602edfcc7507da39a9c" + }, + { + "name": "ComfyUI-Easy-Use", + "url": "https://github.com/yolain/ComfyUI-Easy-Use", + "requirements": true, + "commit": "c51d1fdea2edad09e6788eafea4312fcf1a7bb27" + }, + { + "name": "ComfyUI-TiledDiffusion", + "url": "https://github.com/shiimizu/ComfyUI-TiledDiffusion", + "requirements": true, + "commit": "5b2d0d2c4036218c0d6460efc79790e2a54f9a22" + }, + { + "name": "ComfyUI_Comfyroll_CustomNodes", + "url": "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes", + "requirements": true, + "commit": "d78b780ae43fcf8c6b7c6505e6ffb4584281ceca" + }, + { + "name": "ComfyUI_essentials", + "url": "https://github.com/cubiq/ComfyUI_essentials", + "requirements": true, + "commit": "64e38fd0f3b2e925573684f4a43727be80dc7d5b" + }, + { + "name": "ComfyUI_IPAdapter_plus", + "url": "https://github.com/cubiq/ComfyUI_IPAdapter_plus", + "requirements": true, + "commit": "b188a6cb39b512a9c6da7235b880af42c78ccd0d" + }, + { + "name": "eden_comfy_pipelines", + "url": "https://github.com/edenartlab/eden_comfy_pipelines", + "requirements": true, + "commit": "69d7f4f204a38626113686ec6c56281105419f1c" + }, + { + "name": "execution-inversion-demo-comfyui", + "url": "https://github.com/BadCafeCode/execution-inversion-demo-comfyui", + "requirements": true, + "commit": "b0b489659684a1b69221db48cabb9dce5f7bb6fb" + }, + { + "name": "rgthree-comfy", + "url": "https://github.com/rgthree/rgthree-comfy", + "requirements": true, + "commit": "6f82a5c72fdb36ce28b3c09eecd2d7fe493c91a1" + }, + { + "name": "was-node-suite-comfyui", + "url": "https://github.com/WASasquatch/was-node-suite-comfyui", + "requirements": true, + "commit": "b2f12387b2af5aae98d69d785709971c123a10fd" + }, + { + "name": "ComfyUI-layerdiffuse", + "url": "https://github.com/huchenlei/ComfyUI-layerdiffuse", + "requirements": true + }, + { + "name": "comfyui_controlnet_aux", + "url": "https://github.com/Fannovel16/comfyui_controlnet_aux", + "requirements": true + }, + { + "name": "ComfyUI-LogicUtils", + "url": "https://github.com/aria1th/ComfyUI-LogicUtils", + "requirements": true + }, + { + "name": "ComfyUI-Impact-Pack", + "url": "https://github.com/ltdrdata/ComfyUI-Impact-Pack", + "requirements": true + }, + { + "name": "ComfyUI-Custom-Scripts", + "url": "https://github.com/pythongosssss/ComfyUI-Custom-Scripts", + "requirements": true + }, + { + "name": "comfyui-prompt-reader-node", + "url": "https://github.com/receyuki/comfyui-prompt-reader-node", + "recursive": true, + "requirements": true, + "commit": "07a1a5314d09dad4a8445d6921914e8ea8250324" + }, + { + "name": "ComfyMath", + "url": "https://github.com/evanspearman/ComfyMath", + "requirements": true + }, + { + "name": "comfyui-dreambait-nodes", + "url": "https://github.com/drmbt/comfyui-dreambait-nodes", + "requirements": true + } + ], + "models": [ + { + "name": "4xNomosUniDAT_otf.safetensors", + "url": "https://github.com/Phhofm/models/releases/download/4xNomosUniDAT_otf/4xNomosUniDAT_otf.safetensors", + "path": "models/upscale_models/" + }, + { + "name": "4x-UltraSharp.pth", + "url": "https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/4x-UltraSharp.pth", + "path": "models/upscale_models/" + }, + { + "name": "ESRGAN_4x.pth", + "url": "https://huggingface.co/Afizi/ESRGAN_4x.pth/resolve/main/ESRGAN_4x.pth", + "path": "models/upscale_models/" + }, + { + "name": "RealESRGAN_x2plus.pth", + "url": "https://huggingface.co/dtarnow/UPscaler/resolve/main/RealESRGAN_x2plus.pth", + "path": "models/upscale_models/" + }, + { + "name": "RealESRGAN_x4plus.pth", + "url": "https://huggingface.co/kaliansh/sdrep/resolve/main/RealESRGAN_x4plus.pth", + "path": "models/upscale_models/" + }, + { + "name": "RealESRGAN_x4plus_anime_6B.pth", + "url": "https://huggingface.co/kaliansh/sdrep/resolve/main/RealESRGAN_x4plus_anime_6B.pth", + "path": "models/upscale_models/" + }, + { + "name": "SDXLrender_v2.0.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/loras/SDXLrender_v2.0.safetensors", + "path": "models/loras/" + }, + { + "name": "more_details.safetensors", + "url": "https://huggingface.co/digiplay/LORA/resolve/fa075647d8164b327ba07e430bdb3fd02f147a62/more_details.safetensors", + "path": "models/loras/" + }, + { + "name": "SDXL_lora_xander.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/loras/SDXL_lora_xander.safetensors", + "path": "models/loras/" + }, + { + "name": "sd_xl_base_1.0_0.9vae.safetensors", + "url": "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "v1-5-pruned.safetensors", + "url": "https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "v2-1_768-ema-pruned.safetensors", + "url": "https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "juggernautXL_v8Rundiffusion.safetensors", + "url": "https://huggingface.co/JCTN/fav_models/resolve/b6734996c5ee586fa4d7cae9a5bab1406df0521a/juggernautXL_v8Rundiffusion.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "Juggernaut-XI-byRunDiffusion.safetensors", + "url": "https://civitai.com/api/download/models/782002?type=Model&format=SafeTensor&size=full&fp=fp16", + "path": "models/checkpoints/" + }, + { + "name": "juggernaut_reborn.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggernaut_reborn.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "realisticVisionV51_v51VAE.safetensors", + "url": "https://huggingface.co/lllyasviel/fav_models/resolve/main/fav/realisticVisionV51_v51VAE.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "epicphotogasm_v1.safetensors", + "url": "https://civitai.com/api/download/models/429454?type=Model&format=SafeTensor&size=pruned&fp=fp16", + "path": "models/checkpoints/" + }, + { + "name": "sd_xl_turbo_1.0_fp16.safetensors", + "url": "https://huggingface.co/stabilityai/sdxl-turbo/resolve/main/sd_xl_turbo_1.0_fp16.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "Eden_SDXL.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/models/checkpoints/Eden_SDXL.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "ip-adapter-plus_sd15.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/ipadapter/ip-adapter-plus_sd15.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "ip-adapter_sd15.safetensors", + "url": "https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "ip-adapter-plus-face_sd15.safetensors", + "url": "https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-plus-face_sd15.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "ip-adapter-full-face_sd15.safetensors", + "url": "https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter-full-face_sd15.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "ip-adapter_sd15_vit-G.safetensors", + "url": "https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15_vit-G.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "ip-adapter_sdxl_vit-h.safetensors", + "url": "https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl_vit-h.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "ip-adapter-plus_sdxl_vit-h.safetensors", + "url": "https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus_sdxl_vit-h.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "ip-adapter-plus-face_sdxl_vit-h.safetensors", + "url": "https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus-face_sdxl_vit-h.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "ip-adapter_sdxl.safetensors", + "url": "https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "controlnet-canny-sdxl-1.0_diffusion_pytorch_model_V2.safetensors", + "url": "https://huggingface.co/xinsir/controlnet-canny-sdxl-1.0/resolve/main/diffusion_pytorch_model_V2.safetensors", + "path": "models/controlnet/controlnet-canny-sdxl-1.0/" + }, + { + "name": "controlnet-depth-sdxl-1.0_diffusion_pytorch_model.safetensors", + "url": "https://huggingface.co/xinsir/controlnet-depth-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors", + "path": "models/controlnet/controlnet-depth-sdxl-1.0/" + }, + { + "name": "controlnet-scribble-sdxl-1.0_diffusion_pytorch_model.safetensors", + "url": "https://huggingface.co/xinsir/controlnet-scribble-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors", + "path": "models/controlnet/controlnet-scribble-sdxl-1.0/" + }, + { + "name": "controlnet-openpose-sdxl-1.0_diffusion_pytorch_model.safetensors", + "url": "https://huggingface.co/xinsir/controlnet-openpose-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors", + "path": "models/controlnet/controlnet-openpose-sdxl-1.0/" + }, + { + "name": "t2i-adapter-lineart-sdxl-1.0_diffusion_pytorch_model.safetensors", + "url": "https://huggingface.co/TencentARC/t2i-adapter-lineart-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors", + "path": "models/controlnet/t2i-adapter-lineart-sdxl-1.0/" + }, + { + "name": "diffusers_xl_canny_full.safetensors", + "url": "https://huggingface.co/lllyasviel/sd_control_collection/resolve/d1b278d0d1103a3a7c4f7c2c327d236b082a75b1/diffusers_xl_canny_full.safetensors", + "path": "models/controlnet/" + }, + { + "name": "CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/clip_vision/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors", + "path": "models/clip_vision/" + }, + { + "name": "control_v11f1e_sd15_tile_fp16.safetensors", + "url": "https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile_fp16.safetensors", + "path": "models/controlnet/" + } + ] +} diff --git a/docker/config/flux/config.json b/docker/config/flux/config.json new file mode 100644 index 0000000..2730bf0 --- /dev/null +++ b/docker/config/flux/config.json @@ -0,0 +1,100 @@ +{ + "comfy_version": "915fdb57454c094391d830cefb4ffdd24ed8088c", + "nodes": [ + { + "name": "", + "url": "https://github.com/ltdrdata/ComfyUI-Manager", + "commit": "7ec376774f79229e2410935f04018805e2d16d16", + "requirements": true + }, + { + "name": "", + "url": "https://github.com/edenartlab/eden_comfy_pipelines", + "commit": "2d2a676f0e3c709aefb04fbe9a518a0d5c7f99ec", + "requirements": true + }, + { + "name": "", + "url": "https://github.com/kijai/ComfyUI-KJNodes", + "commit": "9bb1e47ba7dd51da90433f03a44b5dd7dbea04f7", + "requirements": true + }, + { + "name": "", + "url": "https://github.com/receyuki/comfyui-prompt-reader-node", + "commit": "07a1a5314d09dad4a8445d6921914e8ea8250324", + "requirements": true, + "recursive": true + }, + { + "name": "", + "url": "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes", + "commit": "d78b780ae43fcf8c6b7c6505e6ffb4584281ceca", + "requirements": true + }, + { + "name": "", + "url": "https://github.com/rgthree/rgthree-comfy", + "commit": "dd534e5384be8cf0c0fa35865afe2126ba75ac55", + "requirements": true + }, + { + "name": "", + "url": "https://github.com/BadCafeCode/execution-inversion-demo-comfyui", + "commit": "b0b489659684a1b69221db48cabb9dce5f7bb6fb", + "requirements": true + }, + { + "name": "", + "url": "https://github.com/ltdrdata/ComfyUI-Impact-Pack", + "commit": "94f30ef317d4607a2d91ac222b2bdf4addb1ea66", + "requirements": true + }, + { + "name": "", + "url": "https://github.com/Fannovel16/comfyui_controlnet_aux", + "commit": "4cd233c5d7afe2e51bf57ee7a5ba7e6fcb9cbb22", + "requirements": true + }, + { + "name": "", + "url": "https://github.com/XLabs-AI/x-flux-comfyui", + "commit": "14cfba14655eb19058963fb0d858b0bdb2d89cf0", + "requirements": true + }, + { + "name": "", + "url": "https://github.com/WASasquatch/was-node-suite-comfyui", + "commit": "ee2e31a1e5fd85ad6f5c36831ffda6fea8f249c7", + "requirements": true + }, + { + "name": "", + "url": "https://github.com/cubiq/ComfyUI_essentials", + "commit": "635322c1e49fac6c23", + "requirements": true + } + ], + "models": [ + { + "name": "flux1-dev-fp8.safetensors", + "url": "https://huggingface.co/Comfy-Org/flux1-dev/resolve/main/flux1-dev-fp8.safetensors", + "path": ["models/unet/", "models/checkpoints/"] + }, + { + "name": "t5xxl_fp8_e4m3fn.safetensors", + "url": "https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp8_e4m3fn.safetensors", + "path": "models/clip/" + }, + { + "name": "ae.safetensors", + "url": "https://huggingface.co/black-forest-labs/FLUX.1-schnell/resolve/main/ae.safetensors", + "path": "models/vae/" + }, + { + "name": "clip_l.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/clip/clip_l.safetensors", + "path": "models/clip/" + } + ] +} diff --git a/docker/config/tester/config.json b/docker/config/tester/config.json new file mode 100644 index 0000000..07f5c56 --- /dev/null +++ b/docker/config/tester/config.json @@ -0,0 +1,12 @@ +{ + "comfy_version": "915fdb57454c094391d830cefb4ffdd24ed8088c", + "nodes": [ + ], + "models": [ + { + "name": "depth_anything_v2_vitl.pth", + "url": "https://huggingface.co/depth-anything/Depth-Anything-V2-Large/resolve/main/depth_anything_v2_vitl.pth", + "path": "custom_nodes/comfyui_controlnet_aux/ckpts/depth-anything/Depth-Anything-V2-Large/" + } + ] +} diff --git a/docker/config/video/config.json b/docker/config/video/config.json new file mode 100644 index 0000000..f88363e --- /dev/null +++ b/docker/config/video/config.json @@ -0,0 +1,380 @@ +{ + "comfy_version": "915fdb57454c094391d830cefb4ffdd24ed8088c", + "nodes": [ + { + "name": "eden_comfy_pipelines", + "url": "https://github.com/edenartlab/eden_comfy_pipelines.git", + "requirements": true, + "env": { + "OPENAI_API_KEY": "${OPENAI_API_KEY}" + } + }, + { + "name": "ComfyUI_ModdedNodes", + "url": "https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes", + "requirements": true + }, + { + "name": "comfyui-dreambait-nodes", + "url": "https://github.com/drmbt/comfyui-dreambait-nodes", + "requirements": true + }, + { + "name": "ComfyUI-Frame-Interpolation", + "url": "https://github.com/Fannovel16/ComfyUI-Frame-Interpolation", + "requirements": true + }, + { + "name": "ComfyUI-Crystools", + "url": "https://github.com/crystian/ComfyUI-Crystools", + "requirements": true + }, + { + "name": "execution-inversion-demo-comfyui", + "url": "https://github.com/BadCafeCode/execution-inversion-demo-comfyui.git", + "requirements": true + }, + { + "name": "comfyui_controlnet_aux", + "url": "https://github.com/Fannovel16/comfyui_controlnet_aux", + "requirements": true + }, + { + "name": "ComfyUI_FizzNodes", + "url": "https://github.com/FizzleDorf/ComfyUI_FizzNodes", + "requirements": true + }, + { + "name": "ComfyUI-Advanced-ControlNet", + "url": "https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet", + "requirements": true + }, + { + "name": "ComfyUI-AnimateDiff-Evolved", + "url": "https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved", + "requirements": true + }, + { + "name": "ComfyUI-VideoHelperSuite", + "url": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite", + "requirements": true + }, + { + "name": "SeargeSDXL", + "url": "https://github.com/SeargeDP/SeargeSDXL", + "requirements": true + }, + { + "name": "ComfyUi_NNLatentUpscale", + "url": "https://github.com/Ttl/ComfyUi_NNLatentUpscale", + "requirements": true + }, + { + "name": "was-node-suite-comfyui", + "url": "https://github.com/WASasquatch/was-node-suite-comfyui", + "requirements": true + }, + { + "name": "ComfyUI-Manager", + "url": "https://github.com/aiXander/ComfyUI-Manager.git", + "requirements": true + }, + { + "name": "ComfyUI_IPAdapter_plus", + "url": "https://github.com/cubiq/ComfyUI_IPAdapter_plus.git", + "requirements": true + }, + { + "name": "ComfyUI_essentials", + "url": "https://github.com/cubiq/ComfyUI_essentials", + "requirements": true + }, + { + "name": "ComfyUI-DepthAnythingV2", + "url": "https://github.com/kijai/ComfyUI-DepthAnythingV2", + "requirements": true + }, + { + "name": "ComfyUI-Florence2", + "url": "https://github.com/kijai/ComfyUI-Florence2", + "requirements": true + }, + { + "name": "efficiency-nodes-comfyui", + "url": "https://github.com/jags111/efficiency-nodes-comfyui", + "requirements": true + }, + { + "name": "ComfyUI-KJNodes", + "url": "https://github.com/kijai/ComfyUI-KJNodes", + "requirements": true + }, + { + "name": "ComfyUI-Manager-ltdrdata", + "url": "https://github.com/ltdrdata/ComfyUI-Manager.git", + "requirements": true + }, + { + "name": "rgthree-comfy", + "url": "https://github.com/rgthree/rgthree-comfy", + "requirements": true + }, + { + "name": "ComfyUI-Depthflow-Nodes", + "url": "https://github.com/akatz-ai/ComfyUI-Depthflow-Nodes", + "requirements": false + }, + { + "name": "comfyui_segment_anything", + "url": "https://github.com/storyicon/comfyui_segment_anything", + "requirements": true + }, + { + "name": "ComfyUI_ExtraModels", + "url": "https://github.com/city96/ComfyUI_ExtraModels.git", + "requirements": true + }, + { + "name": "ComfyUI-Custom-Scripts", + "url": "https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git", + "requirements": true + }, + { + "name": "ComfyUI-LLaVA-OneVision", + "url": "https://github.com/kijai/ComfyUI-LLaVA-OneVision.git", + "requirements": true + }, + { + "name": "ComfyUI_Primere_Nodes", + "url": "https://github.com/CosmicLaca/ComfyUI_Primere_Nodes.git", + "requirements": true + }, + { + "name": "ComfyUI-Universal-Styler", + "url": "https://github.com/KoreTeknology/ComfyUI-Universal-Styler.git", + "requirements": true + }, + { + "name": "DJZ-Nodes", + "url": "https://github.com/MushroomFleet/DJZ-Nodes.git", + "requirements": true + }, + { + "name": "ComfyUI-Easy-Use", + "url": "https://github.com/yolain/ComfyUI-Easy-Use.git", + "requirements": true + }, + { + "name": "ComfyUI_LayerStyle", + "url": "https://github.com/chflame163/ComfyUI_LayerStyle.git", + "requirements": true + }, + { + "name": "ComfyUI-MochiWrapper", + "url": "https://github.com/kijai/ComfyUI-MochiWrapper.git", + "requirements": true + }, + { + "name": "ComfyUI-MochiEdit", + "url": "https://github.com/logtd/ComfyUI-MochiEdit.git", + "requirements": true + } + ], + "models": [ + { + "name": "realismBYSTABLEYOGI_v4LCM.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/realismBYSTABLEYOGI_v4LCM.safetensors", + "path": "models/checkpoints/SD15/LCM/" + }, + { + "name": "Eden_SDXL.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/models/checkpoints/Eden_SDXL.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "A_black_image.jpg", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/assets/A_black_image.jpg", + "path": "input/" + }, + { + "name": "A_white_image.jpg", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/assets/A_white_image.jpg", + "path": "input/" + }, + { + "name": "a_black_video.mp4", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/assets/a_black_video.mp4", + "path": "input/" + }, + { + "name": "depth_anything_v2_vitl_fp16.safetensors", + "url": "https://huggingface.co/Kijai/DepthAnythingV2-safetensors/resolve/main/depth_anything_v2_vitl_fp16.safetensors", + "path": "models/depthanything/" + }, + { + "name": "depth_anything_v2_vitl.pth", + "url": "https://huggingface.co/depth-anything/Depth-Anything-V2-Large/resolve/main/depth_anything_v2_vitl.pth", + "path": "custom_nodes/comfyui_controlnet_aux/ckpts/depth-anything/Depth-Anything-V2-Large/" + }, + { + "name": "NEG_EMBED_STABLE_YOGI_V3.pt", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/embeddings/NEG_EMBED_STABLE_YOGI_V3.pt", + "path": "models/embeddings/" + }, + { + "name": "AnimateLCM_sd15_t2v.ckpt", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/animatediff_models/AnimateLCM_sd15_t2v.ckpt", + "path": "models/animatediff_models/" + }, + { + "name": "v3_sd15_mm.ckpt", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/animatediff_models/v3_sd15_mm.ckpt", + "path": "models/animatediff_models/" + }, + { + "name": "sd15_t2v_beta.ckpt", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/animatediff_models/sd15_t2v_beta.ckpt", + "path": "models/animatediff_models/" + }, + { + "name": "juggernaut_reborn-inpainting.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggernaut_reborn-inpainting.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "juggerxlInpaint_juggerInpaintV8.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggerxlInpaint_juggerInpaintV8.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "juggernaut_reborn.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/juggernaut_reborn.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/clip_vision/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors", + "path": "models/clip_vision/" + }, + { + "name": "adiff_ControlGIF_controlnet.ckpt", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/adiff_ControlGIF_controlnet.ckpt", + "path": "models/controlnet/" + }, + { + "name": "control_v11p_sd15_canny_fp16.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_canny_fp16.safetensors", + "path": "models/controlnet/" + }, + { + "name": "control_v11f1p_sd15_depth.pth", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11f1p_sd15_depth.pth", + "path": "models/controlnet/" + }, + { + "name": "control_v11p_sd15_canny.pth", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_canny.pth", + "path": "models/controlnet/" + }, + { + "name": "control_v11p_sd15_lineart.pth", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_lineart.pth", + "path": "models/controlnet/" + }, + { + "name": "control_v11p_sd15_openpose.pth", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_openpose.pth", + "path": "models/controlnet/" + }, + { + "name": "control_v11p_sd15_scribble.pth", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/control_v11p_sd15_scribble.pth", + "path": "models/controlnet/" + }, + { + "name": "controlnetQRPatternQR_v2Sd15.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/controlnetQRPatternQR_v2Sd15.safetensors", + "path": "models/controlnet/" + }, + { + "name": "v3_sd15_sparsectrl_rgb.ckpt", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/v3_sd15_sparsectrl_rgb.ckpt", + "path": "models/controlnet/" + }, + { + "name": "v3_sd15_sparsectrl_scribble.ckpt", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/v3_sd15_sparsectrl_scribble.ckpt", + "path": "models/controlnet/" + }, + { + "name": "controlnet_checkpoint.ckpt", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/controlnet/controlnet_checkpoint.ckpt", + "path": "models/controlnet/" + }, + { + "name": "ip-adapter-plus_sd15.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/ipadapter/ip-adapter-plus_sd15.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "v3_sd15_adapter.ckpt", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/loras/v3_sd15_adapter.ckpt", + "path": "models/loras/" + }, + { + "name": "RealESRGAN_x2plus.pth", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/upscale_models/RealESRGAN_x2plus.pth", + "path": "models/upscale_models/" + }, + { + "name": "rife47.pth", + "url": "https://github.com/styler00dollar/VSGAN-tensorrt-docker/releases/download/models/rife47.pth", + "path": "custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife/" + }, + { + "name": "mm_sd_v15_v2.ckpt", + "url": "https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15_v2.ckpt", + "path": "models/animatediff_models/" + }, + { + "name": "zavychromaxl_v80.safetensors", + "url": "https://edenartlab-lfs.s3.amazonaws.com/comfyui/models2/checkpoints/zavychromaxl_v80.safetensors", + "path": "models/checkpoints/" + }, + { + "name": "hsxl_temporal_layers.f16.safetensors", + "url": "https://huggingface.co/hotshotco/Hotshot-XL/resolve/main/hsxl_temporal_layers.f16.safetensors", + "path": "models/animatediff_models/" + }, + { + "name": "diffusion_pytorch_model.safetensors", + "url": "https://huggingface.co/xinsir/controlnet-depth-sdxl-1.0/resolve/main/diffusion_pytorch_model.safetensors", + "path": "models/controlnet/SDXL/controlnet-depth-sdxl-1.0/" + }, + { + "name": "diffusion_pytorch_model_V2.safetensors", + "url": "https://huggingface.co/xinsir/controlnet-canny-sdxl-1.0/resolve/main/diffusion_pytorch_model_V2.safetensors", + "path": "models/controlnet/SDXL/controlnet-canny-sdxl-1.0/" + }, + { + "name": "ip-adapter-plus_sdxl_vit-h.safetensors", + "url": "https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter-plus_sdxl_vit-h.safetensors", + "path": "models/ipadapter/" + }, + { + "name": "mochi_preview_fp8_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/mochi_preview_repackaged/resolve/main/split_files/diffusion_models/mochi_preview_fp8_scaled.safetensors", + "path": "models/diffusion_models/" + }, + { + "name": "t5xxl_fp8_e4m3fn_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/mochi_preview_repackaged/resolve/main/split_files/text_encoders/t5xxl_fp8_e4m3fn_scaled.safetensors", + "path": "models/clip/" + }, + { + "name": "mochi_vae.safetensors", + "url": "https://huggingface.co/Comfy-Org/mochi_preview_repackaged/resolve/main/split_files/vae/mochi_vae.safetensors", + "path": "models/vae/" + } + ] +} diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml new file mode 100644 index 0000000..c2a4e55 --- /dev/null +++ b/docker/docker-compose.yml @@ -0,0 +1,84 @@ +services: + comfyui-video: + image: emprops/comfy-video:v6 + build: + context: . + dockerfile: Dockerfile + args: + - CONFIG_TYPE=video + platforms: + - linux/amd64 + volumes: + - ./config/video:/workspace/config + restart: unless-stopped + platform: linux/amd64 + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + + comfyui-flux: + image: emprops/comfy-flux:latest + build: + context: . + dockerfile: Dockerfile + args: + - CONFIG_TYPE=flux + platforms: + - linux/amd64 + volumes: + - ./config/flux:/workspace/config + restart: unless-stopped + platform: linux/amd64 + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + + comfyui-basic: + image: emprops/comfy-basic:v6 + build: + context: . + dockerfile: Dockerfile + args: + - CONFIG_TYPE=basic + platforms: + - linux/amd64 + volumes: + - ./config/basic:/workspace/config + restart: unless-stopped + platform: linux/amd64 + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + + comfyui-tester: + image: emprops/comfy-tester:v1 + build: + context: . + dockerfile: Dockerfile + args: + - CONFIG_TYPE=tester + platforms: + - linux/amd64 + volumes: + - ./config/tester:/workspace/config + restart: unless-stopped + platform: linux/amd64 + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] \ No newline at end of file diff --git a/docker/old/.bash_aliases b/docker/old/.bash_aliases deleted file mode 100644 index ee8de69..0000000 --- a/docker/old/.bash_aliases +++ /dev/null @@ -1,2 +0,0 @@ -alias lh="ls -alFh" -alias plog="pm2 logs --format" \ No newline at end of file diff --git a/docker/scripts/comfyui b/docker/scripts/comfyui new file mode 100644 index 0000000..5c6dfbf --- /dev/null +++ b/docker/scripts/comfyui @@ -0,0 +1,171 @@ +#!/bin/bash +### BEGIN INIT INFO +# Provides: comfyui +# Required-Start: $network +# Required-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start ComfyUI +### END INIT INFO + +# Paths +ROOT="${ROOT:-/workspace}" +COMFYUI_HOME="$ROOT/.comfyui" +LOG_DIR="$COMFYUI_HOME/log" +DEBUG_LOG="$LOG_DIR/debug.log" +OUTPUT_LOG="$LOG_DIR/output.log" + +# ComfyUI specific paths +COMFY_DIR="${COMFY_DIR:-${ROOT}/ComfyUI}" +WORK_DIR="$COMFY_DIR" +SCRIPT_PATH="$COMFY_DIR/main.py" +PID_FILE="$COMFYUI_HOME/comfyui.pid" + +# Ensure log directory exists with correct permissions +prepare_logs() { + mkdir -p "$COMFYUI_HOME/log" + chmod 755 "$COMFYUI_HOME" + chmod 755 "$COMFYUI_HOME/log" +} + +log() { + echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" >> "$DEBUG_LOG" +} + +start() { + # Prepare log directory + prepare_logs + + # Extensive logging + log "=== ComfyUI Service Start Diagnostics ===" + log "Current User: $(whoami)" + log "Current Working Directory: $(pwd)" + log "Script Path: $SCRIPT_PATH" + log "Working Directory: $WORK_DIR" + log "Log Directory: $LOG_DIR" + log "Debug Log: $DEBUG_LOG" + log "Output Log: $OUTPUT_LOG" + + # Validate paths + if [ ! -d "$WORK_DIR" ]; then + log "ERROR: Working directory does not exist: $WORK_DIR" + return 1 + fi + + if [ ! -f "$SCRIPT_PATH" ]; then + log "ERROR: ComfyUI main script not found at $SCRIPT_PATH" + return 1 + fi + + # Verify Python environment + ACTIVE_PYTHON=$(which python) + log "Active Python Path: $ACTIVE_PYTHON" + python --version + + # Check for CUDA availability + CUDA_CHECK=$(python -c " +import torch +try: + cuda_available = torch.cuda.is_available() + device_count = torch.cuda.device_count() + print(f'CUDA_AVAILABLE:{cuda_available}') + print(f'CUDA_DEVICE_COUNT:{device_count}') +except Exception as e: + print(f'CUDA_ERROR:{str(e)}') +") + + # Parse CUDA check results + CUDA_AVAILABLE=$(echo "$CUDA_CHECK" | grep "CUDA_AVAILABLE:" | cut -d: -f2) + CUDA_DEVICE_COUNT=$(echo "$CUDA_CHECK" | grep "CUDA_DEVICE_COUNT:" | cut -d: -f2) + CUDA_ERROR=$(echo "$CUDA_CHECK" | grep "CUDA_ERROR:" | cut -d: -f2) + + # Log CUDA detection results + log "CUDA Check Results:" + log "CUDA Available: $CUDA_AVAILABLE" + log "CUDA Device Count: $CUDA_DEVICE_COUNT" + + # Prepare run command + RUN_COMMAND=(python "$SCRIPT_PATH" --listen 127.0.0.1 --port 8188 --verbose) + + # If no CUDA, force CPU mode + if [ "$CUDA_AVAILABLE" != "True" ] || [ "$CUDA_DEVICE_COUNT" = "0" ]; then + log "No CUDA devices found. Forcing CPU mode." + RUN_COMMAND+=("--cpu") + export CUDA_VISIBLE_DEVICES="" + fi + + # Log the exact command being run + log "Executing ComfyUI start command: ${RUN_COMMAND[@]}" + + # Start ComfyUI as ubuntu user + PYTHONUNBUFFERED=1 \ + "${RUN_COMMAND[@]}" >> "$OUTPUT_LOG" 2>&1 & + local pid=$! + + # Wait a moment to ensure process started + sleep 2 + + # Check if process is running + if kill -0 "$pid" 2>/dev/null; then + echo "$pid" > "$PID_FILE" + log "ComfyUI started with PID $pid. Full command: ${RUN_COMMAND[@]}" + return 0 + else + log "Failed to start ComfyUI. Command used: ${RUN_COMMAND[@]}" + return 1 + fi +} + +stop() { + log "Stopping ComfyUI service..." + + if [ -f "$PID_FILE" ]; then + PID=$(cat "$PID_FILE") + if kill -0 "$PID" 2>/dev/null; then + kill "$PID" + log "Sent termination signal to ComfyUI (PID: $PID)" + else + log "No running ComfyUI process found" + fi + rm -f "$PID_FILE" + else + log "No PID file found" + fi +} + +status() { + if [ -f "$PID_FILE" ]; then + PID=$(cat "$PID_FILE") + if kill -0 "$PID" 2>/dev/null; then + echo "ComfyUI is running (PID: $PID)" + return 0 + else + echo "ComfyUI is not running (stale PID file)" + return 1 + fi + else + echo "ComfyUI is not running" + return 1 + fi +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status + ;; + restart) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|status|restart}" + exit 1 +esac + +exit $? \ No newline at end of file diff --git a/docker/scripts/download_model.py b/docker/scripts/download_model.py new file mode 100755 index 0000000..1cb3112 --- /dev/null +++ b/docker/scripts/download_model.py @@ -0,0 +1,109 @@ +#!/usr/bin/env python3 +import os +import sys +import logging +from typing import Optional +from urllib.parse import urlparse +import subprocess + +# Configure logging +logging.basicConfig( + level=logging.INFO, + format='%(asctime)s - %(levelname)s - %(message)s', + handlers=[ + logging.StreamHandler(sys.stdout), + logging.FileHandler('/tmp/model_download.log') + ] +) +logger = logging.getLogger(__name__) + +def try_huggingface_download(url: str, output_path: str, filename: str) -> bool: + """ + Attempt to download using Hugging Face Hub API. + Returns True if successful, False otherwise. + """ + try: + from huggingface_hub import hf_hub_download + from huggingface_hub.utils import enable_progress_bars + + enable_progress_bars() + + # Parse HF URL to get repo_id and filename + parsed = urlparse(url) + path_parts = [p for p in parsed.path.split('/') if p] + + if len(path_parts) < 4: # Need at least org/repo/resolve/filename + return False + + repo_id = f"{path_parts[0]}/{path_parts[1]}" + revision = path_parts[3] if path_parts[2] in ['resolve', 'raw'] else None + hf_filename = path_parts[-1] + + logger.info(f"Attempting HF download: repo={repo_id}, file={hf_filename}, rev={revision}") + + # Download using hf_hub_download + downloaded_path = hf_hub_download( + repo_id=repo_id, + filename=hf_filename, + revision=revision, + local_dir=output_path + ) + + # Move to final location if needed + final_path = os.path.join(output_path, filename) + if downloaded_path != final_path: + os.rename(downloaded_path, final_path) + + return os.path.exists(final_path) + + except Exception as e: + logger.error(f"HF download failed: {str(e)}") + return False + +def download_with_wget(url: str, output_path: str, filename: str) -> bool: + """ + Download file using wget. + Returns True if successful, False otherwise. + """ + try: + output_file = os.path.join(output_path, filename) + command = ['wget', '--progress=bar:force:noscroll', '-O', output_file, url] + + logger.info(f"Downloading with wget: {url}") + result = subprocess.run(command, capture_output=True, text=True) + + return result.returncode == 0 and os.path.exists(output_file) + + except Exception as e: + logger.error(f"wget download failed: {str(e)}") + return False + +def main(): + if len(sys.argv) != 4: + logger.error("Usage: download_model.py ") + return 1 + + url = sys.argv[1] + output_path = sys.argv[2] + filename = sys.argv[3] + + # Create output directory if it doesn't exist + os.makedirs(output_path, exist_ok=True) + + # Try Hugging Face download first if it's a HF URL + if 'huggingface.co' in url: + if try_huggingface_download(url, output_path, filename): + logger.info("Successfully downloaded using Hugging Face") + return 0 + logger.warning("Hugging Face download failed, falling back to wget") + + # Fall back to wget + if download_with_wget(url, output_path, filename): + logger.info("Successfully downloaded using wget") + return 0 + + logger.error("All download attempts failed") + return 1 + +if __name__ == "__main__": + sys.exit(main()) diff --git a/docker/scripts/start.sh b/docker/scripts/start.sh new file mode 100644 index 0000000..72df61a --- /dev/null +++ b/docker/scripts/start.sh @@ -0,0 +1,389 @@ +#!/bin/bash +set -o pipefail # Capture errors in pipe chains + +ROOT="${ROOT:-/workspace}" +CONFIG_DIR="${CONFIG_DIR:-${ROOT}/config}" +COMFY_DIR="${COMFY_DIR:-${ROOT}/ComfyUI}" +CONFIG_FILE="$CONFIG_DIR/config.json" + +# Setup logging +LOG_FILE="${ROOT}/start.log" +mkdir -p "$(dirname "$LOG_FILE")" +touch "$LOG_FILE" + +log() { + local msg="[$(date +'%Y-%m-%d %H:%M:%S')] $*" + echo "$msg" | tee -a "$LOG_FILE" +} + +check_env_vars() { + if [ -z "$HF_TOKEN" ]; then + log "WARNING: HF_TOKEN environment variable not set" + else + log "HF_TOKEN environment variable set" + fi + if [ -z "$OPENAI_API_KEY" ]; then + log "WARNING: OPENAI_API_KEY environment variable not set" + else + log "OPENAI_API_KEY environment variable set" + fi + if [ -z "$CUT_PK_1" ] || [ -z "$CUT_PK_2" ] || [ -z "$CUT_PK_3" ]; then + log "WARNING: CUT_PK_1, CUT_PK_2, or CUT_PK_3 environment variables are not set" + else + log "CUT_PK_1, CUT_PK_2, and CUT_PK_3 environment variables set" + fi + + if [ ! -d "$COMFY_DIR" ]; then + log "ERROR: Working directory does not exist: $COMFY_DIR" + return 1 + fi +} + +setup_ssh_access() { + log "Starting SSH agent" + eval "$(ssh-agent -s)" + + log "Setting up SSH access..." + + # Check if all key parts are present + if [ -n "$CUT_PK_1" ] && [ -n "$CUT_PK_2" ] && [ -n "$CUT_PK_3" ]; then + # Combine the key parts + full_base64_key="${CUT_PK_1}${CUT_PK_2}${CUT_PK_3}" + + # Decode the base64 key + full_key=$(echo "$full_base64_key" | base64 -d) + + # Reconstruct the full OpenSSH private key (ONLY ON + ssh_key=$full_key + + # Write the key to file + mkdir -p /root/.ssh + echo "$ssh_key" > /root/.ssh/id_ed25519 + chmod 600 /root/.ssh/id_ed25519 + ssh-add /root/.ssh/id_ed25519 + + # Verbose key validation + if ! ssh-keygen -y -f /root/.ssh/id_ed25519; then + log "Detailed SSH Key Validation Failed" + return 1 + fi + + log "SSH key successfully set up" + else + # Detailed logging if key parts are missing + [ -z "$CUT_PK_1" ] && log "Missing CUT_PK_1" + [ -z "$CUT_PK_2" ] && log "Missing CUT_PK_2" + [ -z "$CUT_PK_3" ] && log "Missing CUT_PK_3" + + log "Warning: SSH key parts are missing" + return 1 + fi + + # Add GitHub to known hosts if not present + touch /root/.ssh/known_hosts + ssh-keyscan github.com >> /root/.ssh/known_hosts 2>/dev/null +} + +setup_nginx() { + + ssh-agent bash << 'EOF' + eval "$(ssh-agent -s)" + ssh-add /root/.ssh/id_ed25519 + + git clone git@github.com:stakeordie/emprops-nginx-conf.git /etc/nginx-repo +EOF + + if [ ! -d "/etc/nginx-repo" ]; then + log "Failed to clone nginx repo" + return 1 + fi + + rm -rf /etc/nginx + + ln -s /etc/nginx-repo/node /etc/nginx + + log "Nginx configuration set up" +} + +setup_comfyui() { + # Extract ComfyUI commit from config.json + log "Attempting to extract comfy_version" + COMFY_COMMIT=$(jq -r '.comfy_version // "main"' "$CONFIG_FILE") + + log "Extracted COMFY_COMMIT: $COMFY_COMMIT" + + # Fallback if extraction fails + if [ -z "$COMFY_COMMIT" ] || [ "$COMFY_COMMIT" = "null" ]; then + log "WARNING: No comfy_version found, defaulting to 'main'" + COMFY_COMMIT="main" + else + log "Switching ComfyUI to commit: $COMFY_COMMIT" + + # Change to ComfyUI directory and checkout specified commit + cd "$COMFY_DIR" + git checkout "$COMFY_COMMIT" + fi +} +# Function to download models +download_models() { + if [ ! -f "$CONFIG_FILE" ]; then + log "No config file found at $CONFIG_FILE" + return 0 + fi + + HF_HUB_ENABLE_HF_TRANSFER=1 + + + # Try to import huggingface_hub + if python -c "import huggingface_hub" 2>/dev/null; then + # Login to Hugging Face using environment variable + if [ -n "$HF_TOKEN" ]; then + log "Logging into Hugging Face" + python -c "from huggingface_hub import login; login(token='$HF_TOKEN')" + fi + + else + log "huggingface_hub not found. Falling back to wget downloads." + return 1 + fi + + local models_dir="/home/ubuntu/ComfyUI/models/checkpoints" + mkdir -p "$models_dir" + + # Verbose model parsing + local models=$(jq -c '.models[] | + select(.url != null) | + { + url: .url, + path: (.path // "models/checkpoints/"), + name: .name + }' "$CONFIG_FILE" 2>&1) + + log "Parsed Models:" + echo "$models" >> "$LOG_FILE" + + # Check if models is empty + if [ -z "$models" ]; then + log "No models found in configuration to download" + return 0 + fi + + # Download each model + echo "$models" | jq -r '.url, .name, .path' | while read -r url; read -r name; read -r paths; do + download_model "$name" "$url" "$paths" + done + + return 0 +} + +download_model() { + local filename="$1" + local url="$2" + local paths="$3" # This can now be a JSON array + + # Log the download attempt + log "Downloading model: $filename" + + # Parse paths array (if it's an array, first path is the download location) + local primary_path + local other_paths=() + + if [[ $paths == '['* ]]; then + # It's a JSON array, extract paths + primary_path=$(echo "$paths" | jq -r '.[0]') + readarray -t other_paths < <(echo "$paths" | jq -r '.[1:][]') + else + # Single path + primary_path="$paths" + fi + + # Ensure the primary directory exists + mkdir -p "$COMFY_DIR/$primary_path" + + local target_file="$COMFY_DIR/$primary_path$filename" + + # First, try using Python script for Hugging Face download + if [[ "$url" == *"huggingface.co"* ]]; then + "python" "${ROOT}/scripts/download_model.py" \ + "$url" "$COMFY_DIR/$primary_path" "$filename" >> "$LOG_FILE" 2>&1 + + # Check download result + if [ $? -eq 0 ] && [ -s "$target_file" ]; then + echo "Successfully downloaded $url using Python script" >> "$LOG_FILE" + # Create symlinks if there are additional paths + for additional_path in "${other_paths[@]}"; do + mkdir -p "$COMFY_DIR/$additional_path" + ln -sf "$target_file" "$COMFY_DIR/$additional_path$filename" + log "Created symlink at $COMFY_DIR/$additional_path$filename" + done + return 0 + fi + fi + + # If Python script fails or not a HF URL, try wget + wget \ + --progress=bar:force:noscroll \ + -O "$COMFY_DIR/$primary_path/$filename" \ + "$url" >> "$LOG_FILE" 2>&1 + + # Check wget result + if [ $? -eq 0 ] && [ -s "$target_file" ]; then + echo "Successfully downloaded $url using wget" >> "$LOG_FILE" + # Create symlinks if there are additional paths + for additional_path in "${other_paths[@]}"; do + mkdir -p "$COMFY_DIR/$additional_path" + ln -sf "$target_file" "$COMFY_DIR/$additional_path$filename" + log "Created symlink at $COMFY_DIR/$additional_path$filename" + done + return 0 + fi + + # If both methods fail + echo "Failed to download $url" >> "$LOG_FILE" + return 1 +} + +install_nodes() { + log "Processing custom nodes from config..." + + if [ ! -f "$CONFIG_FILE" ]; then + log "Config not found: $CONFIG_FILE" + return + fi + + cd "$COMFY_DIR/custom_nodes" + + while IFS= read -r node; do + name=$(echo "$node" | jq -r '.name') + url=$(echo "$node" | jq -r '.url') + commit=$(echo "$node" | jq -r '.commit // empty') + install_reqs=$(echo "$node" | jq -r '.requirements') + + if [ "$name" != "null" ] && [ "$url" != "null" ]; then + log "Processing node: $name" + + # Handle environment variables if present + env_vars=$(echo "$node" | jq -r '.env // empty') + if [ ! -z "$env_vars" ]; then + log "Setting environment variables for $name" + while IFS="=" read -r key value; do + if [ ! -z "$key" ]; then + # Expand any environment variables in the value + expanded_value=$(eval echo "$value") + export "$key"="$expanded_value" + log "Set $key" + fi + done < <(echo "$env_vars" | jq -r 'to_entries | .[] | "\(.key)=\(.value)"') + fi + + if [ ! -d "$name" ]; then + log "Installing node: $name" + git clone "$url" "$name" + + if [ ! -z "$commit" ]; then + cd "$name" + git checkout "$commit" + cd .. + fi + + # Install requirements if specified as true + if [ "$install_reqs" = "true" ] && [ -f "$name/requirements.txt" ]; then + log "Installing requirements for $name" + pip install -r "$name/requirements.txt" + fi + else + log "Node already exists: $name" + fi + fi + done < <(jq -c '.nodes[]' "$CONFIG_FILE") +} + +setup_services() { + log "Setting up init.d service and cron..." + + # Setup init.d service + update-rc.d comfyui defaults + + # Setup and start cron if cleanup is needed + if [ -d "${COMFY_DIR}/output" ]; then + log "Setting up cleanup cron job..." + CRON_JOB="0 * * * * rm -f ${COMFY_DIR}/output/*" + (crontab -l 2>/dev/null | grep -v "$COMFY_DIR/output"; echo "$CRON_JOB") | crontab - + + log "Starting cron service..." + service cron start + else + log "Output directory not found, skipping cron setup" + fi +} + +start_nginx() { + log "Starting system services..." + + # Try to start nginx with sudo if needed + log "Attempting to start nginx with root" + service nginx start +} + +main() { + log "Starting setup process..." + + # Check environment variables + check_env_vars + + # SSH Key Setup + setup_ssh_access + + # Initial setup + setup_nginx + setup_comfyui + + # Process config and install components + if [ -f "$CONFIG_FILE" ]; then + install_nodes + download_models + else + log "No config found at: $CONFIG_FILE" + log "Continuing with default configuration..." + fi + + # Setup and start services + setup_services + start_nginx + + # Start ComfyUI service + log "Starting ComfyUI service..." + service comfyui start + + # Monitor service + RESTART_ATTEMPTS=0 + MAX_RESTART_ATTEMPTS=5 + COMFYUI_DEBUG_LOG="$ROOT/.comfyui/log/debug.log" + + while true; do + if ! service comfyui status >/dev/null 2>&1; then + log "ComfyUI service stopped unexpectedly" + log "=== ComfyUI Debug Log ===" + tail -n 50 "$COMFYUI_DEBUG_LOG" + + if [ $RESTART_ATTEMPTS -lt $MAX_RESTART_ATTEMPTS ]; then + log "Attempting to restart ComfyUI service (Attempt $((RESTART_ATTEMPTS+1))/$MAX_RESTART_ATTEMPTS)..." + service comfyui start + RESTART_ATTEMPTS=$((RESTART_ATTEMPTS+1)) + else + log "MAX RESTART ATTEMPTS REACHED. Giving up on ComfyUI service." + break + fi + else + # Reset restart attempts if service is running successfully + RESTART_ATTEMPTS=0 + fi + sleep 30 + done +} + +main + +log "SLEEPING..." + +sleep infinity