Update build.sh
Browse files
build.sh
CHANGED
|
@@ -1,91 +1,26 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
set -e
|
| 3 |
|
| 4 |
-
echo "
|
| 5 |
-
echo "ποΈ BUILD PHASE: Installing Dependencies"
|
| 6 |
-
echo "=========================================="
|
| 7 |
-
echo ""
|
| 8 |
|
| 9 |
-
#
|
| 10 |
-
|
| 11 |
-
apt-get update > /dev/null 2>&1
|
| 12 |
-
apt-get install -y git wget curl build-essential cmake > /dev/null 2>&1
|
| 13 |
-
echo "β System deps installed"
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
if [ ! -d "ComfyUI" ]; then
|
| 19 |
-
git clone --depth 1 https://github.com/comfyanonymous/ComfyUI.git
|
| 20 |
-
fi
|
| 21 |
-
cd ComfyUI
|
| 22 |
-
pip install -r requirements.txt -q
|
| 23 |
-
cd ..
|
| 24 |
-
echo "β ComfyUI installed"
|
| 25 |
|
| 26 |
-
#
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
fi
|
| 33 |
-
if [ -f "ComfyUI/custom_nodes/ComfyUI-GGUF/requirements.txt" ]; then
|
| 34 |
-
pip install -r ComfyUI/custom_nodes/ComfyUI-GGUF/requirements.txt -q
|
| 35 |
-
fi
|
| 36 |
-
echo "β ComfyUI-GGUF installed"
|
| 37 |
|
| 38 |
-
#
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
|
| 44 |
-
|
| 45 |
-
URL="https://huggingface.co/unsloth/FLUX.2-klein-4B-GGUF/resolve/main/${MODEL_FILE}"
|
| 46 |
-
|
| 47 |
-
if [ ! -f "models/${MODEL_FILE}" ]; then
|
| 48 |
-
echo " Downloading ${MODEL_FILE}..."
|
| 49 |
-
wget -O "models/${MODEL_FILE}" "${URL}" --progress=bar:force:noscroll --no-check-certificate
|
| 50 |
-
else
|
| 51 |
-
echo " Model already exists"
|
| 52 |
-
fi
|
| 53 |
-
|
| 54 |
-
# Copy to ComfyUI directory
|
| 55 |
-
cp "models/${MODEL_FILE}" "ComfyUI/models/checkpoints/"
|
| 56 |
-
SIZE=$(du -h "models/${MODEL_FILE}" | cut -f1)
|
| 57 |
-
echo "β Model downloaded (${SIZE})"
|
| 58 |
-
|
| 59 |
-
# Step 5: Download VAE and CLIP (needed for Flux workflow)
|
| 60 |
-
echo ""
|
| 61 |
-
echo "[5/5] Downloading supporting models..."
|
| 62 |
-
|
| 63 |
-
# VAE
|
| 64 |
-
VAE_URL="https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/ae.safetensors"
|
| 65 |
-
mkdir -p ComfyUI/models/vae
|
| 66 |
-
if [ ! -f "ComfyUI/models/vae/ae.safetensors" ]; then
|
| 67 |
-
wget -O "ComfyUI/models/vae/ae.safetensors" "$VAE_URL" -q
|
| 68 |
-
fi
|
| 69 |
-
echo "β VAE downloaded"
|
| 70 |
-
|
| 71 |
-
# CLIP Text Encoder (T5)
|
| 72 |
-
CLIP_URL="https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp16.safetensors"
|
| 73 |
-
mkdir -p ComfyUI/models/clip
|
| 74 |
-
if [ ! -f "ComfyUI/models/clip/t5xxl_fp16.safetensors" ]; then
|
| 75 |
-
wget -O "ComfyUI/models/clip/t5xxl_fp16.safetensors" "$CLIP_URL" -q
|
| 76 |
-
fi
|
| 77 |
-
echo "β CLIP encoder downloaded"
|
| 78 |
-
|
| 79 |
-
echo ""
|
| 80 |
-
echo "=========================================="
|
| 81 |
-
echo "β
BUILD COMPLETE!"
|
| 82 |
-
echo "=========================================="
|
| 83 |
-
echo ""
|
| 84 |
-
echo "Installed:"
|
| 85 |
-
echo " β’ ComfyUI"
|
| 86 |
-
echo " β’ ComfyUI-GGUF node"
|
| 87 |
-
echo " β’ Flux model (${MODEL_FILE})"
|
| 88 |
-
echo " β’ VAE (ae.safetensors)"
|
| 89 |
-
echo " β’ CLIP (t5xxl_fp16.safetensors)"
|
| 90 |
-
echo ""
|
| 91 |
-
echo "Ready to generate images!"
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
set -e
|
| 3 |
|
| 4 |
+
echo "π¦ Installing ComfyUI + GGUF support..."
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
# Install ComfyUI dependencies
|
| 7 |
+
pip install -r ComfyUI/requirements.txt -q
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
+
# Install GGUF node
|
| 10 |
+
git clone --depth 1 https://github.com/city96/ComfyUI-GGUF.git ComfyUI/custom_nodes/ComfyUI-GGUF
|
| 11 |
+
pip install -r ComfyUI/custom_nodes/ComfyUI-GGUF/requirements.txt -q
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
# Download model
|
| 14 |
+
mkdir -p models ComfyUI/models/checkpoints
|
| 15 |
+
wget -O models/flux-2-klein-4b-Q4_K_M.gguf \
|
| 16 |
+
"https://huggingface.co/unsloth/FLUX.2-klein-4B-GGUF/resolve/main/flux-2-klein-4b-Q4_K_M.gguf" \
|
| 17 |
+
--progress=bar:force:noscroll -q
|
| 18 |
+
cp models/*.gguf ComfyUI/models/checkpoints/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
# Download VAE + CLIP
|
| 21 |
+
wget -O ComfyUI/models/vae/ae.safetensors \
|
| 22 |
+
"https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/ae.safetensors" -q
|
| 23 |
+
wget -O ComfyUI/models/clip/t5xxl_fp16.safetensors \
|
| 24 |
+
"https://huggingface.co/comfyanonymous/flux_text_encoders/resolve/main/t5xxl_fp16.safetensors" -q
|
| 25 |
|
| 26 |
+
echo "β
Done!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|