Install a model with LoRAs in one command
Find a model (language, image and video, robotics or anything else), add the LoRAs made for it and pick a GPU. One command below installs it all.
1. Model
Ready ComfyUI builds
For these families: Comfy-Org's official files at the right precision.
Chosen model: Krea 2
Pick another model2. Main model
3. LoRAs
Tick the ones you want, up to 12.
4. GPU and precision
Precision
The chosen model's file is 12 GB and already compressed: the file sets the precision.
8-bit: weights compressed to 8 bits, half the memory, looks the same as the original. Recommended.
Your command
Needs ≈ 15 GB of GPU memory, you have 24 GB. It fits.
The script starts with token lines: paste yours between the quotes.
Civitai: downloads always need a token, civitai.com/user/account → API Keys.
#!/usr/bin/env bash
# Event Horizon
set -e
# ===== Tokens: paste yours between the quotes =====
export CIVITAI_TOKEN="" # civitai.com/user/account → API Keys, for Civitai LoRAs
# ==========================================
# NVIDIA driver: CUDA 13 needs 580+. If older or missing, the current nvidia-open is installed (keep yours: KEEP_DRIVER=1)
DRV=$(nvidia-smi --query-gpu=driver_version --format=csv,noheader 2>/dev/null | head -1 | cut -d. -f1)
case "$DRV" in ""|*[!0-9]*) DRV=0 ;; esac
if [ "$DRV" -lt 580 ] && [ -z "${KEEP_DRIVER:-}" ]; then
. /etc/os-release && \
curl -fsSLO "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu${VERSION_ID//./}/x86_64/cuda-keyring_1.1-1_all.deb" && \
sudo dpkg -i cuda-keyring_1.1-1_all.deb && rm -f cuda-keyring_1.1-1_all.deb && \
sudo apt-get update && \
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y nvidia-open || \
{ echo "Could not install the NVIDIA driver: see the error above. To keep the current one, run with KEEP_DRIVER=1."; exit 1; }
echo "NVIDIA driver updated. Reboot the machine (sudo reboot) and run this same script again."
exit 0
fi
curl -LsSf https://astral.sh/uv/install.sh | sh
source "$HOME/.local/bin/env"
# CUDA 13+ → int8_convrot (Comfy-Org's advice), else fp8_scaled
CU=$(nvidia-smi | grep -oP 'CUDA Version: \K[0-9]+' || echo 12)
[ "$CU" -ge 13 ] && TORCH=cu130 || TORCH=cu128
[ -d ~/ComfyUI ] || git clone https://github.com/comfyanonymous/ComfyUI ~/ComfyUI
cd ~/ComfyUI
uv venv --python 3.12 --allow-existing && source .venv/bin/activate
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/$TORCH
uv pip install -r requirements.txt "huggingface_hub[cli]"
civitai() { # civitai <model id> <folder>: the newest version of a Civitai model
vid=$(curl -fsSL "https://civitai.com/api/v1/models/$1" | python3 -c 'import json,sys;print(json.load(sys.stdin)["modelVersions"][0]["id"])')
(cd "$2" && curl -fL -OJ -H "Authorization: Bearer $CIVITAI_TOKEN" "https://civitai.com/api/download/models/$vid")
}
# Base files: Krea 2, 8-bit
if [ "$CU" -ge 13 ]; then
hf download Comfy-Org/Krea-2 text_encoders/qwen3vl_4b_int8_convrot.safetensors vae/qwen_image_vae.safetensors --local-dir models
else
hf download Comfy-Org/Krea-2 text_encoders/qwen3vl_4b_fp8_scaled.safetensors vae/qwen_image_vae.safetensors --local-dir models
fi
# Main model: Event Horizon
civitai 1645577 models/diffusion_models
# Start ComfyUI. From your computer: ssh -L 8188:localhost:8188 user@IP, then http://localhost:8188
python main.py --listen 127.0.0.1 --port 8188Once it runs: from your computer ssh -L 8188:localhost:8188 user@machine-IP and open http://localhost:8188.