Last active
July 4, 2024 11:41
-
-
Save venetanji/9c000f77ba85512f9cc2e29c686d0f0d to your computer and use it in GitHub Desktop.
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
# Define the installation path | |
INSTALL_PATH="/vast/${USER}/comfyui/" | |
# create directory if it doesn't exist | |
mkdir -p "${INSTALL_PATH}" | |
# create comfyui_models.txt if it doesn't exist | |
if [ ! -f "${INSTALL_PATH}/comfyui_models.txt" ]; then | |
# get the default modles file from gist: https://gist.githubusercontent.com/venetanji/7be194b3f943ff0597fa11f37d14fc1b/raw/881b73837a643db008fc13f503464a746b931eb5/comfyui_models.txt | |
curl -s https://gist.githubusercontent.com/venetanji/7be194b3f943ff0597fa11f37d14fc1b/raw/881b73837a643db008fc13f503464a746b931eb5/comfyui_models.txt > "${INSTALL_PATH}/comfyui_models.txt" | |
fi | |
# Install ComfyUI | |
cd "${INSTALL_PATH}" | |
if [ ! -f "${INSTALL_PATH}/.download-complete" ] ; then | |
echo "########################################" | |
echo "[INFO] Downloading ComfyUI & Manager..." | |
echo "########################################" | |
set -euxo pipefail | |
# ComfyUI | |
git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules \ | |
https://github.com/comfyanonymous/ComfyUI.git "${INSTALL_PATH}/ComfyUI" \ | |
|| (cd "${INSTALL_PATH}/ComfyUI" && git pull) | |
# ComfyUI Manager | |
cd "${INSTALL_PATH}/ComfyUI/custom_nodes" | |
git clone --depth=1 --no-tags --recurse-submodules --shallow-submodules \ | |
https://github.com/ltdrdata/ComfyUI-Manager.git \ | |
|| (cd "${INSTALL_PATH}/ComfyUI/custom_nodes/ComfyUI-Manager" && git pull) | |
echo "########################################" | |
echo "[INFO] Downloading Models..." | |
echo "########################################" | |
# Models | |
cd "${INSTALL_PATH}/ComfyUI" | |
aria2c --input-file="${INSTALL_PATH}/comfyui_models.txt" \ | |
--allow-overwrite=false --auto-file-renaming=false --continue=true \ | |
--max-connection-per-server=5 | |
# Finish | |
touch "${INSTALL_PATH}/.download-complete" | |
fi ; | |
echo "########################################" | |
echo "[INFO] Starting ComfyUI..." | |
echo "########################################" | |
cd ${INSTALL_PATH} | |
python3 ./ComfyUI/main.py --highvram --listen `uname -n` --port 8188 ${CLI_ARGS} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment