Spaces:
Running
Running
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 | |
ENV DEBIAN_FRONTEND=noninteractive \ | |
TZ=America/Los_Angeles | |
ARG USE_PERSISTENT_DATA | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
make build-essential libssl-dev zlib1g-dev \ | |
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \ | |
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git-lfs \ | |
ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& git lfs install | |
WORKDIR /code | |
COPY ./requirements.txt /code/requirements.txt | |
# User | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV HOME=/home/user \ | |
PATH=/home/user/.local/bin:$PATH | |
# Pyenv | |
RUN curl https://pyenv.run | bash | |
ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH | |
ARG PYTHON_VERSION=3.9.17 | |
# Python | |
RUN pyenv install $PYTHON_VERSION && \ | |
pyenv global $PYTHON_VERSION && \ | |
pyenv rehash && \ | |
pip install --no-cache-dir --upgrade pip setuptools wheel && \ | |
pip install --no-cache-dir \ | |
datasets \ | |
huggingface-hub "protobuf<4" "click<8.1" | |
#pip install huggingface_hub["cli"] && \ | |
#huggingface-cli delete-cache | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
RUN pip install lpips insightface | |
# Set the working directory to /data if USE_PERSISTENT_DATA is set, otherwise set to $HOME/app | |
WORKDIR $HOME/app | |
# Clone the ComfyUI repo (fork with restart button) | |
RUN git clone https://github.com/comfyanonymous/ComfyUI.git . && \ | |
pip install --no-cache-dir -r requirements.txt | |
# Checkpoints | |
RUN echo "Downloading checkpoints..." | |
RUN echo "Installing custom nodes..." | |
# ComfyUI Manager | |
RUN cd custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager.git && \ | |
git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite && \ | |
git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet && \ | |
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack && \ | |
pip install basicsr && \ | |
git clone https://github.com/Gourieff/comfyui-reactor-node && \ | |
git clone https://github.com/FizzleDorf/ComfyUI_FizzNodes && \ | |
# git clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale --recursive && \ | |
# git clone https://github.com/BlenderNeko/ComfyUI_TiledKSampler && \ | |
# git clone https://github.com/BlenderNeko/ComfyUI_SeeCoder && \ | |
pip install lpips && \ | |
git clone https://github.com/mav-rik/facerestore_cf && \ | |
git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus && \ | |
# git clone https://github.com/SLAPaper/ComfyUI-Image-Selector && \ | |
git clone https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes && \ | |
# git clone https://github.com/jags111/efficiency-nodes-comfyui && \ | |
# git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes && \ | |
git clone https://github.com/Stability-AI/stability-ComfyUI-nodes && \ | |
git clone https://github.com/Fannovel16/comfyui_controlnet_aux | |
# Install custom nodes | |
#echo "Installing custom nodes..." | |
# Controlnet Preprocessor nodes by Fannovel16 | |
# RUN git clone https://github.com/Fannovel16/comfy_controlnet_preprocessors && cd comfy_controlnet_preprocessors && python install.py --no_download_ckpts | |
# RUN cd custom_nodes && git clone https://github.com/Stability-AI/stability-ComfyUI-nodes && cd stability-ComfyUI-nodes && pip install -r requirements.txt | |
# RUN cd custom_nodes && git clone https://github.com/EllangoK/ComfyUI-post-processing-nodes --depth 1 | |
# RUN cd custom_nodes && git clone https://github.com/TinyTerra/ComfyUI_tinyterraNodes --depth 1 | |
# RUN cd custom_nodes && git clone https://github.com/TechnoByteJS/comfy-aesthetic-nodes --depth 1 && cd comfy-aesthetic-nodes && pip install -r requirements.txt | |
RUN cd custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui.git --depth 1 && cd was-node-suite-comfyui && pip install -r requirements.txt | |
# RUN cd custom_nodes && git clone https://github.com/0xbitches/ComfyUI-LCM.git --depth 1 | |
# RUN cd custom_nodes && echo "#Plz don't delete this file, just edit it when neccessary." > ComfyUI-LCM/config.yaml | |
# RUN cd custom_nodes && echo 'ckpts_path: "./ckpts"' >> ComfyUI-LCM/config.yaml | |
# RUN cd custom_nodes && echo 'ops_backend: "taichi" #Either "taichi" or "cupy"' >> ComfyUI-LCM/config.yaml | |
# RUN cd custom_nodes && cd ComfyUI-LCM/ && pip install -r requirements.txt | |
# RUN cd custom_nodes && git clone https://github.com/WASasquatch/PowerNoiseSuite.git | |
# RUN cd custom_nodes && git clone https://github.com/YMC-GitHub/ymc-node-suite-comfyui.git && cd ymc-node-suite-comfyui && pip install -r requirements.txt | |
# RUN cd custom_nodes && git clone https://github.com/Fannovel16/ComfyUI-Frame-Interpolation.git --depth 1 && cd ComfyUI-Frame-Interpolation && python install.py | |
RUN cd custom_nodes && git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved | |
RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15_v2.ckpt -P ./ComfyUI-AnimateDiff-Evolved/models/ | |
RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15.ckpt -P ./ComfyUI-AnimateDiff-Evolved/models/ && \ | |
wget -c https://huggingface.co/Kybalico/CandyApple/resolve/main/candyApple_v12.safetensors -P ./models/checkpoints/ && \ | |
wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_canny_fp16.safetensors -P ./models/controlnet/ && \ | |
wget -c https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors -P ./models/vae/ | |
# RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_PanLeft.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/ | |
# RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_PanRight.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/ | |
# RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingAnticlockwise.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/ | |
RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingClockwise.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/ | |
# RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_TiltDown.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/ | |
# RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_TiltUp.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/ | |
# RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_ZoomIn.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/ | |
# RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_ZoomOut.ckpt -P ./custom_nodes/ComfyUI-AnimateDiff-Evolved/motion_lora/ | |
RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingAnticlockwise.ckpt -P ./models/motion_lora/ | |
RUN echo "Done" | |
CMD ["python", "main.py", "--listen", "0.0.0.0", "--cpu", "--port", "7860", "--use-split-cross-attention", "--output-directory", "${USE_PERSISTENT_DATA:+/data/}"] | |