ComfyUI/scripts/comfy-node-install.sh
warby d2ed468e80
[ENV-4] Add Nano Banana installation support and fix entrypoint venv check
- Fix venv creation check to look for bin/activate instead of directory
- Add INSTALL_NANO_BANANA env var to entrypoint for automatic installation
- Add COMFYUI_ARGS support to pass arguments to ComfyUI (e.g., --cpu)
- Configure CPU mode for testing without GPU
- Update comfy-node-install to disable git terminal prompts

Note: Nano Banana repository URL needs verification (current URL returns 404)
2025-12-12 23:41:59 -06:00

53 lines
1.4 KiB
Bash

#!/bin/bash
# comfy-node-install - Install ComfyUI custom nodes from GitHub repositories
# Usage: comfy-node-install <repo-url> [repo-url2 ...]
set -e
COMFYUI_DIR="${COMFYUI_DIR:-/app/ComfyUI}"
CUSTOM_NODES_DIR="${COMFYUI_DIR}/custom_nodes"
# Ensure custom_nodes directory exists
mkdir -p "${CUSTOM_NODES_DIR}"
install_node() {
local repo_url="$1"
if [ -z "$repo_url" ]; then
echo "Error: Repository URL is required"
return 1
fi
# Extract repository name from URL
local repo_name=$(basename "${repo_url}" .git)
# Handle full GitHub URLs or just repo paths
if [[ "$repo_url" != http* ]]; then
repo_url="https://github.com/${repo_url}"
fi
local target_dir="${CUSTOM_NODES_DIR}/${repo_name}"
echo "Installing custom node: ${repo_name} from ${repo_url}"
# Remove existing installation if it exists
if [ -d "${target_dir}" ]; then
echo " Removing existing installation..."
rm -rf "${target_dir}"
fi
# Clone the repository
if [ -n "${GIT_LFS_SKIP_SMUDGE}" ]; then
GIT_TERMINAL_PROMPT=0 GIT_LFS_SKIP_SMUDGE=1 git clone --depth 1 "${repo_url}" "${target_dir}"
else
GIT_TERMINAL_PROMPT=0 git clone --depth 1 "${repo_url}" "${target_dir}"
fi
echo " Successfully installed ${repo_name}"
}
# Install all provided repositories
for repo_url in "$@"; do
install_node "${repo_url}"
done