Skip to content

Commit

Permalink
added video_new and vid2vid draft
Browse files Browse the repository at this point in the history
  • Loading branch information
the-dusky committed Nov 12, 2024
1 parent 33633b1 commit 5438c2b
Show file tree
Hide file tree
Showing 10 changed files with 5,643 additions and 0 deletions.
Empty file.
Empty file.
Empty file.
843 changes: 843 additions & 0 deletions Components/_draft/vid2vid/ref/workflow_api.json

Large diffs are not rendered by default.

4,616 changes: 4,616 additions & 0 deletions Components/_draft/vid2vid/ref/workflow_full.json

Large diffs are not rendered by default.

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

# ARG DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1

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

ARG GITACCESSKEY

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

ENV ROOT=/comfyui-launcher

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

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

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

RUN pip install opencv-python
RUN pip install --pre onediff onediffx
RUN pip install nexfort

RUN git clone https://github.com/stakeordie/comfy-middleware.git ${ROOT}/comfy-middleware

WORKDIR ${ROOT}

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

RUN /scripts/build.sh

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

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

CMD ["/scripts/start.sh"]
26 changes: 26 additions & 0 deletions docker/video_new/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -Eeuo pipefail

ROOT=/comfyui-launcher

echo $ROOT
ls -lha $ROOT
ls -lha /

echo "Installing pm2..."
apt-get install -y ca-certificates curl gnupg ufw
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
apt-get update
apt-get install -y nodejs git-lfs
npm install -g [email protected]
npm install -g pm2@latest
pip install --ignore-installed websocket-client flask gdown

cd ${ROOT}

apt install -y nvtop

echo "~~READY~~"
64 changes: 64 additions & 0 deletions docker/video_new/models.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#!/bin/bash
ROOT=/comfyui-launcher/ComfyUI

git lfs install

mkdir -p ${ROOT}/models/clip
mkdir -p ${ROOT}/models/LLavacheckpoints
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}/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
31 changes: 31 additions & 0 deletions docker/video_new/nodes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/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)" && git reset --hard "95ce5d22cbc98de5c25205a1b4eee7fefcd00093" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/Derfuu/Derfuu_ComfyUI_ModdedNodes && cd "$(basename "$_" .git)" && git reset --hard "d0905bed31249f2bd0814c67585cf4fe3c77c015" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/drmbt/comfyui-dreambait-nodes && cd "$(basename "$_" .git)" && git reset --hard "1cf1e3648529a52d686c1b3f38f4e9924ab778e8" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/Fannovel16/ComfyUI-Frame-Interpolation && cd "$(basename "$_" .git)" && git reset --hard "483dfe64465369e077d351ed2f1acbf7dc046864" && 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/BadCafeCode/execution-inversion-demo-comfyui.git && cd "$(basename "$_" .git)" && git reset --hard "b0b489659684a1b69221db48cabb9dce5f7bb6fb" && 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/FizzleDorf/ComfyUI_FizzNodes && cd "$(basename "$_" .git)" && git reset --hard "0e30c12400064de068ab599b045b430e3c0ff3cf" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet && cd "$(basename "$_" .git)" && git reset --hard "85d4970caed3e45be9de56c3058c334379fc4894" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved && cd "$(basename "$_" .git)" && git reset --hard "34b7c52617662b1952c29ec91dd2a968f7494f3f" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite && cd "$(basename "$_" .git)" && git reset --hard "6bffe8b90f4464f76f1606bd93b94f1ac8d38041" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/SeargeDP/SeargeSDXL && cd "$(basename "$_" .git)" && git reset --hard "2eb5edbc712329d77d1a2f5f1e6c5e64397a4a83" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/Ttl/ComfyUi_NNLatentUpscale && cd "$(basename "$_" .git)" && git reset --hard "08105da31dbd7a54569661e135835e73bd8064b0" && 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/aiXander/ComfyUI-Manager.git && cd "$(basename "$_" .git)" && git reset --hard "0e3e2a65d8fef205ed12013b9ac227b5a8b24cf3" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus.git && cd "$(basename "$_" .git)" && git reset --hard "ce9b62165b89fbf8dd3be61057d62a5f8bc29e19" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/cubiq/ComfyUI_essentials && cd "$(basename "$_" .git)" && git reset --hard "ed443624baf4784cb8f4b7c8718c7698eef3fbf7" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/kijai/ComfyUI-DepthAnythingV2 && cd "$(basename "$_" .git)" && git reset --hard "047a4ecfd09a951944154c7f3e823566e586c2d5" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/kijai/ComfyUI-Florence2 && cd "$(basename "$_" .git)" && git reset --hard "a253e73ebb96e76e3012c7a11e1da513d587b188" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/jags111/efficiency-nodes-comfyui && cd "$(basename "$_" .git)" && git reset --hard "b471390b88c9ac8a87c34ad9d882a520296b6fd8" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/kijai/ComfyUI-KJNodes && cd "$(basename "$_" .git)" && git reset --hard "bff39a4e9cbcc31ea082ab2af1143bdea19deaa3" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager.git && cd "$(basename "$_" .git)" && git reset --hard "d3654b2ee41fbc9ba61454910a57122ec94409a1" && 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/akatz-ai/ComfyUI-Depthflow-Nodes && cd "$(basename "$_" .git)" && git reset --hard "d46fd57268ca79e45833b807ab731b678ecf9d70" && pip install -r requirements.txt;
cd ${ROOT}/nodes && git clone https://github.com/storyicon/comfyui_segment_anything && cd "$(basename "$_" .git)" && git reset --hard "ab6395596399d5048639cdab7e44ec9fae857a93" && pip install -r requirements.txt;
26 changes: 26 additions & 0 deletions docker/video_new/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

ROOT=/comfyui-launcher

rm -rf /etc/nginx && git clone [email protected]:stakeordie/emprops-nginx-conf.git /etc/nginx-repo && ln -s /etc/nginx-repo/node /etc/nginx
ln -s /etc/nginx-repo/node /etc/nginx

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

/scripts/models.sh

pip install "numpy < 2"

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


git clone https://github.com/stakeordie/comfy-middleware.git ${ROOT}/comfy-middleware
cd ${ROOT}/comfy-middleware && pm2 start --name comfy-middleware "python main.py --port 3001"


/etc/init.d/nginx start

sleep infinity

0 comments on commit 5438c2b

Please sign in to comment.