Spaces:
Running
Running
Upload 3 files
Browse files- Dockerfile +166 -0
- README.md +6 -5
- requirements.txt +15 -0
Dockerfile
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
|
2 |
+
|
3 |
+
ENV DEBIAN_FRONTEND=noninteractive \
|
4 |
+
TZ=America/Los_Angeles
|
5 |
+
|
6 |
+
ARG USE_PERSISTENT_DATA
|
7 |
+
|
8 |
+
RUN apt-get update && apt-get install -y \
|
9 |
+
git \
|
10 |
+
make build-essential libssl-dev zlib1g-dev \
|
11 |
+
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
|
12 |
+
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git-lfs \
|
13 |
+
ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
|
14 |
+
&& rm -rf /var/lib/apt/lists/* \
|
15 |
+
&& git lfs install
|
16 |
+
|
17 |
+
WORKDIR /code
|
18 |
+
|
19 |
+
COPY ./requirements.txt /code/requirements.txt
|
20 |
+
|
21 |
+
# User
|
22 |
+
RUN useradd -m -u 1000 user
|
23 |
+
USER user
|
24 |
+
ENV HOME=/home/user \
|
25 |
+
PATH=/home/user/.local/bin:$PATH
|
26 |
+
|
27 |
+
# Pyenv
|
28 |
+
RUN curl https://pyenv.run | bash
|
29 |
+
ENV PATH=$HOME/.pyenv/shims:$HOME/.pyenv/bin:$PATH
|
30 |
+
|
31 |
+
ARG PYTHON_VERSION=3.9.17
|
32 |
+
# Python
|
33 |
+
RUN pyenv install $PYTHON_VERSION && \
|
34 |
+
pyenv global $PYTHON_VERSION && \
|
35 |
+
pyenv rehash && \
|
36 |
+
pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
37 |
+
pip install --no-cache-dir \
|
38 |
+
datasets \
|
39 |
+
huggingface-hub "protobuf<4" "click<8.1"
|
40 |
+
|
41 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
42 |
+
|
43 |
+
# Set the working directory to /data if USE_PERSISTENT_DATA is set, otherwise set to $HOME/app
|
44 |
+
WORKDIR $HOME/app
|
45 |
+
|
46 |
+
# Clone the ComfyUI repo (fork with restart button)
|
47 |
+
RUN git clone https://github.com/comfyanonymous/ComfyUI.git . && \
|
48 |
+
pip install --no-cache-dir -r requirements.txt
|
49 |
+
|
50 |
+
# Checkpoints
|
51 |
+
RUN echo "Downloading checkpoints..." && \
|
52 |
+
# Kybalico Models
|
53 |
+
wget -c https://huggingface.co/Kybalico/CandyApple/resolve/main/candyApple_v12.safetensors -P ./models/checkpoints/ && \
|
54 |
+
wget -c https://huggingface.co/Kybalico/CalicoMix/resolve/main/calicoMix_v75.safetensors -P ./models/checkpoints/ && \
|
55 |
+
wget -c https://huggingface.co/Kybalico/CalicoMixDC/resolve/main/calicomix_dcV30.safetensors -P ./models/checkpoints/ && \
|
56 |
+
wget -c https://huggingface.co/Kybalico/AnmitsuMimimi/resolve/main/anmitsuMimimi_v10.safetensors -P ./models/checkpoints/ && \
|
57 |
+
|
58 |
+
# TechnoByte Models
|
59 |
+
wget -c https://huggingface.co/TechnoByte/MilkyWonderland/resolve/main/milkyWonderland_v20.safetensors -P ./models/checkpoints/ && \
|
60 |
+
|
61 |
+
# VAE
|
62 |
+
wget -c https://huggingface.co/RedRayz/MyVAE/resolve/main/CleanVAE.safetensors -P ./models/vae/ && \
|
63 |
+
wget -c https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors -P ./models/vae/ && \
|
64 |
+
#wget -c https://huggingface.co/tuwonga/marblesh/resolve/main/marblesh.safetensors -P ./models/vae/ && \
|
65 |
+
#wget -c https://huggingface.co/SimianLuo/LCM_Dreamshaper_v7/blob/main/LCM_Dreamshaper_v7_4k.safetensors -P ./models/vae/ && \
|
66 |
+
|
67 |
+
# ControlNet
|
68 |
+
wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors -P ./models/controlnet/ && \
|
69 |
+
wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors -P ./models/controlnet/ && \
|
70 |
+
wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_canny_fp16.safetensors -P ./models/controlnet/ && \
|
71 |
+
wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors -P ./models/controlnet/ && \
|
72 |
+
# wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors -P ./models/controlnet/ && \
|
73 |
+
# wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_lineart_fp16.safetensors -P ./models/controlnet/ && \
|
74 |
+
# wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors -P ./models/controlnet/ && \
|
75 |
+
wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors -P ./models/controlnet/ && \
|
76 |
+
wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_openpose_fp16.safetensors -P ./models/controlnet/ && \
|
77 |
+
# wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_scribble_fp16.safetensors -P ./models/controlnet/ && \
|
78 |
+
# wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_seg_fp16.safetensors -P ./models/controlnet/ && \
|
79 |
+
# wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_softedge_fp16.safetensors -P ./models/controlnet/ && \
|
80 |
+
# wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors -P ./models/controlnet/ && \
|
81 |
+
# wget -c https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11u_sd15_tile_fp16.safetensors -P ./models/controlnet/ && \
|
82 |
+
|
83 |
+
# # GLIGEN
|
84 |
+
# wget -c https://huggingface.co/comfyanonymous/GLIGEN_pruned_safetensors/resolve/main/gligen_sd14_textbox_pruned_fp16.safetensors -P ./models/gligen/ && \
|
85 |
+
|
86 |
+
# # ESRGAN upscale model
|
87 |
+
# wget -c https://huggingface.co/konohashinobi4/4xAnimesharp/resolve/main/4x-AnimeSharp.pth -P ./models/upscale_models/ && \
|
88 |
+
# wget -c https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P ./models/upscale_models/ && \
|
89 |
+
# wget -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth -P ./models/upscale_models/ && \
|
90 |
+
# wget -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth -P ./models/upscale_models/ && \
|
91 |
+
|
92 |
+
# motion_lora
|
93 |
+
# wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_PanLeft.ckpt -P ./models/motion_lora/ && \
|
94 |
+
# wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_PanRight.ckpt -P ./models/motion_lora/ && \
|
95 |
+
# wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingAnticlockwise.ckpt -P ./models/motion_lora/ && \
|
96 |
+
# wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingClockwise.ckpt -P ./models/motion_lora/ && \
|
97 |
+
# wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_TiltDown.ckpt -P ./models/motion_lora/ && \
|
98 |
+
# wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_TiltUp.ckpt -P ./models/motion_lora/ && \
|
99 |
+
wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_ZoomIn.ckpt -P ./models/motion_lora/ && \
|
100 |
+
wget -c https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_ZoomOut.ckpt -P ./models/motion_lora/ && \
|
101 |
+
|
102 |
+
|
103 |
+
# loras
|
104 |
+
wget -c https://huggingface.co/stabilityai/control-lora/blob/main/control-LoRAs-rank256/control-lora-canny-rank256.safetensors -P ./models/loras/ && \
|
105 |
+
|
106 |
+
# # Aesthetic scorer models
|
107 |
+
# mkdir ./models/aesthetic && \
|
108 |
+
# wget -c https://github.com/grexzen/SD-Chad/raw/main/chadscorer.pth -P ./models/aesthetic/ && \
|
109 |
+
# wget -c https://github.com/christophschuhmann/improved-aesthetic-predictor/raw/main/ava+logos-l14-linearMSE.pth -P ./models/aesthetic/ && \
|
110 |
+
|
111 |
+
# ComfyUI Manager
|
112 |
+
cd custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager.git && \
|
113 |
+
|
114 |
+
|
115 |
+
git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite && \
|
116 |
+
git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet.git && \
|
117 |
+
git clone https://github.com/FizzleDorf/ComfyUI_FizzNodes && \
|
118 |
+
# git clone https://github.com/ssitu/ComfyUI_UltimateSDUpscale --recursive && \
|
119 |
+
git clone https://github.com/BlenderNeko/ComfyUI_TiledKSampler.git && \
|
120 |
+
# git clone https://github.com/BlenderNeko/ComfyUI_SeeCoder.git && \
|
121 |
+
# git clone https://github.com/JPS-GER/ComfyUI_JPS-Nodes.git && \
|
122 |
+
|
123 |
+
# Install custom nodes
|
124 |
+
echo "Installing custom nodes..."
|
125 |
+
|
126 |
+
# Controlnet Preprocessor nodes by Fannovel16
|
127 |
+
RUN git clone https://github.com/Fannovel16/comfy_controlnet_preprocessors && cd comfy_controlnet_preprocessors && python install.py --no_download_ckpts
|
128 |
+
RUN cd custom_nodes && git clone https://github.com/Fannovel16/comfyui_controlnet_aux && cd comfyui_controlnet_aux && pip install -r requirements.txt
|
129 |
+
RUN cd custom_nodes && git clone https://github.com/Stability-AI/stability-ComfyUI-nodes && cd stability-ComfyUI-nodes && pip install -r requirements.txt
|
130 |
+
|
131 |
+
RUN cd custom_nodes && git clone https://github.com/EllangoK/ComfyUI-post-processing-nodes --depth 1
|
132 |
+
RUN cd custom_nodes && git clone https://github.com/TinyTerra/ComfyUI_tinyterraNodes --depth 1
|
133 |
+
# RUN cd custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack --depth 1 && cd ComfyUI-Impact-Pack && python install.py
|
134 |
+
# RUN cd custom_nodes && git clone https://github.com/TechnoByteJS/comfy-aesthetic-nodes --depth 1 && cd comfy-aesthetic-nodes && pip install -r requirements.txt
|
135 |
+
|
136 |
+
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
|
137 |
+
|
138 |
+
# RUN cd custom_nodes && git clone https://github.com/0xbitches/ComfyUI-LCM.git --depth 1
|
139 |
+
# RUN cd custom_nodes && echo "#Plz don't delete this file, just edit it when neccessary." > ComfyUI-LCM/config.yaml
|
140 |
+
# RUN cd custom_nodes && echo 'ckpts_path: "./ckpts"' >> ComfyUI-LCM/config.yaml
|
141 |
+
# RUN cd custom_nodes && echo 'ops_backend: "taichi" #Either "taichi" or "cupy"' >> ComfyUI-LCM/config.yaml
|
142 |
+
# RUN cd custom_nodes && cd ComfyUI-LCM/ && pip install -r requirements.txt
|
143 |
+
|
144 |
+
RUN cd custom_nodes && git clone https://github.com/WASasquatch/PowerNoiseSuite.git
|
145 |
+
|
146 |
+
RUN cd custom_nodes && git clone https://github.com/Fannovel16/ComfyUI-Frame-Interpolation.git --depth 1 && cd ComfyUI-Frame-Interpolation && python install.py
|
147 |
+
|
148 |
+
RUN cd custom_nodes && git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved
|
149 |
+
|
150 |
+
RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15_v2.ckpt -P ./ComfyUI-AnimateDiff-Evolved/models/
|
151 |
+
RUN cd custom_nodes && wget -c https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15.ckpt -P ./ComfyUI-AnimateDiff-Evolved/models/
|
152 |
+
|
153 |
+
# 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/
|
154 |
+
# 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/
|
155 |
+
# 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/
|
156 |
+
# 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/
|
157 |
+
# 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/
|
158 |
+
# 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/
|
159 |
+
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/
|
160 |
+
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/
|
161 |
+
|
162 |
+
RUN echo "Done"
|
163 |
+
|
164 |
+
CMD ["python", "main.py", "--listen", "0.0.0.0", "--cpu", "--port", "7860", "--use-split-cross-attention", "--output-directory", "${USE_PERSISTENT_DATA:+/data/}"]
|
165 |
+
|
166 |
+
|
README.md
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
---
|
2 |
-
title: ComfyUI
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: docker
|
7 |
-
pinned:
|
|
|
8 |
---
|
9 |
|
10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: ComfyUI - Advanced
|
3 |
+
emoji: ✨
|
4 |
+
colorFrom: pink
|
5 |
+
colorTo: purple
|
6 |
sdk: docker
|
7 |
+
pinned: true
|
8 |
+
duplicated_from: SpacesExamples/ComfyUI
|
9 |
---
|
10 |
|
11 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
requirements.txt
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
--extra-index-url https://download.pytorch.org/whl/cu118
|
2 |
+
opencv-python
|
3 |
+
numexpr
|
4 |
+
simpleeval
|
5 |
+
sampling-utils
|
6 |
+
gitpython
|
7 |
+
python-sample-package
|
8 |
+
samplics
|
9 |
+
simpleeval
|
10 |
+
opencv-python
|
11 |
+
imageio-ffmpeg
|
12 |
+
transformers
|
13 |
+
accelerate
|
14 |
+
taichi
|
15 |
+
optimum
|