Last active
January 22, 2024 22:01
-
-
Save mbeltagy/c0dd8edd88f98dafe35e213f0679db6b to your computer and use it in GitHub Desktop.
ComfyUI with selected Models and AnimateDiff models and node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/false | |
# This file will be sourced in init.sh | |
# https://raw.githubusercontent.com/ai-dock/comfyui/main/config/provisioning/animated.sh | |
printf "\n##############################################\n# #\n# Provisioning container #\n# #\n# This will take some time #\n# #\n# Your container will be ready on completion #\n# #\n##############################################\n\n" | |
## Set paths | |
## main paths | |
nodes_dir=/opt/ComfyUI/custom_nodes | |
models_dir=/opt/ComfyUI/models | |
## internal paths | |
checkpoints_dir=${models_dir}/checkpoints | |
vae_dir=${models_dir}/vae | |
controlnet_dir=${models_dir}/controlnet | |
loras_dir=${models_dir}/loras | |
upscale_dir=${models_dir}/upscale_models | |
### Install custom nodes | |
desired_nodes=( | |
"https://github.com/ltdrdata/ComfyUI-Manager" | |
"https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved" | |
"https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet" | |
"https://github.com/ltdrdata/ComfyUI-Impact-Pack" | |
"https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite" | |
"https://github.com/FizzleDorf/ComfyUI_FizzNodes" | |
"https://github.com/crystian/ComfyUI-Crystools" | |
"https://github.com/Fannovel16/comfyui_controlnet_aux" | |
"https://github.com/kijai/ComfyUI-Marigold" | |
"https://github.com/FizzleDorf/ComfyUI-AIT" | |
"https://github.com/space-nuko/ComfyUI-OpenPose-Editor" | |
) | |
animated_diff_checkpoints=( | |
#v2 | |
"https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/mm_sd_v15_v2.ckpt" | |
#v3 | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v3_sd15_mm.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v3_sd15_sparsectrl_rgb.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v3_sd15_sparsectrl_scribble.ckpt" | |
) | |
civitai_checkpoints=( | |
#epicReaslimPureEvolution | |
"https://civitai.com/api/download/models/134065" | |
#epicRealism New Era | |
"https://civitai.com/api/download/models/67990" | |
) | |
## animatediff | |
animated_diff_loras=( | |
# v3_sd15_adapter.ckpt | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v3_sd15_adapter.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_PanLeft.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_PanRight.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_TiltUp.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_TiltDown.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingAnticlockwise.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_RollingClockwise.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_ZoomIn.ckpt" | |
"https://huggingface.co/guoyww/animatediff/resolve/main/v2_lora_ZoomOut.ckpt" | |
) | |
desired_loras=( | |
) | |
vaes=( | |
"https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.ckpt" | |
) | |
desired_controlnets=( | |
"https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_canny-fp16.safetensors" | |
"https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_openpose-fp16.safetensors" | |
"https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile.pth" | |
) | |
## download animated checkpoints | |
function download_animated_ckpts() { | |
wget -q --content-disposition --show-progress -e dotbytes="${3:-4M}" -O "$2" "$1" | |
} | |
## download checkpoints | |
function download_civit_ckpts() { | |
echo "downloading from $1" | |
wget -q --content-disposition --show-progress -e dotbytes="${3:-4M}" -P "$2" "$1" | |
} | |
## download nodes | |
function download_node(){ | |
node_name=$(echo "$1" | awk -F/ '{print $NF}') | |
echo "downloading Node $node_name.........\n" | |
this_node_dir="${nodes_dir}/${node_name}" | |
if [[ ! -d $this_node_dir ]]; then | |
git clone "$1" "$this_node_dir" | |
else | |
(cd "$this_node_dir" && git pull) | |
fi | |
} | |
for node in "${desired_nodes[@]}"; do | |
download_node "$node" | |
done | |
for ckpt in "${civitai_checkpoints[@]}"; do | |
download_civit_ckpts "$ckpt" "${checkpoints_dir}" | |
done | |
for animated_ckpt in "${animated_diff_checkpoints[@]}"; do | |
ckpt_name=$(echo "$animated_ckpt" | awk -F/ '{print $NF}') | |
echo "downloading $animated_ckpt........." | |
download_animated_ckpts "$animated_ckpt" "${nodes_dir}/ComfyUI-AnimateDiff-Evolved/models/${ckpt_name}" | |
done | |
for lora in "${animated_diff_loras[@]}"; do | |
lora_name=$(echo "$lora" | awk -F/ '{print $NF}') | |
echo "downloading $lora........." | |
download_animated_ckpts "$lora" "${loras_dir}/${lora_name}" | |
done | |
for cnet in "${desired_controlnets[@]}"; do | |
cnet_name=$(echo "$cnet" | awk -F/ '{print $NF}') | |
echo "downloading $cnet........." | |
download_animated_ckpts "$cnet" "${controlnet_dir}/${cnet_name}" | |
done | |
for vae in "${vaes[@]}"; do | |
vae_name=$(echo "$vae" | awk -F/ '{print $NF}') | |
echo "downloading $vae........." | |
download_animated_ckpts "$vae" "${vae_dir}/${vae_name}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment