ComfyUI: Advanced AI Setup Guide
Jonathan Thomas edited this page 2026-04-15 23:53:50 -05:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Overview

This guide sets up ComfyUI as an AI server for OpenShot on Ubuntu 24.04. This is intended as a step by step installation guide. To learn more you can also view our user-guide.


Minimum System Requirements

Minimum:

  • NVIDIA RTX 5070 (12GB VRAM minimum)
  • AMD Ryzen 9 5900 class CPU
  • 32GB RAM
  • SSD storage

Recommended:

  • 16GB+ VRAM GPU
  • 64GB RAM
  • Dedicated machine for ComfyUI

Tested Cloud Configuration (AWS)

  • Cloud Provider: AWS EC2
  • Instance Type: g6.4xlarge
  • GPU: 1× NVIDIA L4 (24GB VRAM)
  • vCPU: 8
  • System RAM: 32GB
  • OS: Ubuntu 24.04 Server (fresh install)
  • User: ubuntu

Environment Assumptions

  • Brand new Ubuntu 24.04 server
  • No NVIDIA drivers installed
  • No Python environments configured
  • SSH access as ubuntu

1. Update Base System

sudo apt update
sudo apt -y upgrade
sudo apt install -y git wget curl unzip aria2 ffmpeg \
  python3 python3-venv python3-pip build-essential

2. Install NVIDIA Driver

sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers devices
sudo ubuntu-drivers install
sudo reboot

3. Verify GPU

nvidia-smi

4. Install ComfyUI

cd ~
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip wheel
pip install -r requirements.txt

5. Verify PyTorch CUDA Support

python -c "import torch; print(torch.cuda.is_available())"

If the command above returns False, reinstall torch with a CUDA build:

pip uninstall -y torch torchvision torchaudio || true
pip install --index-url https://download.pytorch.org/whl/cu124 torch torchvision torchaudio
python -c "import torch; print(torch.cuda.is_available())"

6. Install Custom Nodes

  • comfyui_controlnet_aux
  • ComfyUI-Frame-Interpolation
  • ComfyUI-VideoHelperSuite
  • ComfyUI-Video-Segmentation
  • ComfyUI-Whisper
  • OpenShot-ComfyUI
cd ~/ComfyUI/custom_nodes

git clone https://github.com/Fannovel16/comfyui_controlnet_aux.git
git clone https://github.com/Fannovel16/ComfyUI-Frame-Interpolation.git
git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git
git clone https://github.com/miaoshouai/ComfyUI-Video-Segmentation.git
git clone https://github.com/yuvraj108c/ComfyUI-Whisper.git
git clone https://github.com/OpenShot/OpenShot-ComfyUI.git
cd ~/ComfyUI
source venv/bin/activate

for d in custom_nodes/*; do
  if [ -f "$d/requirements.txt" ]; then
    echo "Installing requirements for $d"
    pip install -r "$d/requirements.txt"
  fi
done

Install SAM2 manually:

cd ~/ComfyUI
source venv/bin/activate

python -m pip install git+https://github.com/facebookresearch/sam2.git
python -c "import sam2; print('sam2 import OK')"

7. Download / Place Models

7.1 Set your Hugging Face token

export HF_TOKEN="YOUR_HF_TOKEN"

7.2 Install the Hugging Face CLI

cd ~/ComfyUI
source venv/bin/activate

pip install -U "huggingface_hub[cli]"

7.3 Create model folders

cd ~/ComfyUI
mkdir -p models/checkpoints
mkdir -p models/clip_vision
mkdir -p models/diffusion_models
mkdir -p models/grounding-dino
mkdir -p models/sam2
mkdir -p models/stt/whisper
mkdir -p models/text_encoders
mkdir -p models/TTS/Ace-Step1.5/acestep-v15-turbo
mkdir -p models/upscale_models
mkdir -p models/vae
mkdir -p models/VLM/transnetv2-pytorch-weights
mkdir -p custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife

7.4 Download the models

cd ~/ComfyUI
source venv/bin/activate

# SDXL
hf download stabilityai/stable-diffusion-xl-base-1.0 sd_xl_base_1.0.safetensors --local-dir ~/ComfyUI/models/checkpoints
hf download stabilityai/stable-diffusion-xl-refiner-1.0 sd_xl_refiner_1.0.safetensors --local-dir ~/ComfyUI/models/checkpoints

# Stable Audio Open
hf download stabilityai/stable-audio-open-1.0 model.safetensors --local-dir ~/ComfyUI/models/checkpoints
mv ~/ComfyUI/models/checkpoints/model.safetensors ~/ComfyUI/models/checkpoints/stable-audio-open-1.0.safetensors

# CLIP Vision
hf download comfyanonymous/clip_vision_g clip_vision_g.safetensors --local-dir ~/ComfyUI/models/clip_vision

# WAN 2.1 VACE (used by Change Video Style)
wget -O ~/ComfyUI/models/diffusion_models/wan2.1_vace_1.3B_fp16.safetensors https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/diffusion_models/wan2.1_vace_1.3B_fp16.safetensors?download=true
wget -O ~/ComfyUI/models/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors?download=true
wget -O ~/ComfyUI/models/vae/wan_2.1_vae.safetensors https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors?download=true

# WAN 2.2 image-to-video
wget -O ~/ComfyUI/models/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors?download=true
wget -O ~/ComfyUI/models/vae/wan2.2_vae.safetensors https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan2.2_vae.safetensors?download=true

# GroundingDINO
hf download ShilongLiu/GroundingDINO groundingdino_swint_ogc.pth --local-dir ~/ComfyUI/models/grounding-dino

# SAM2 / SAM2.1
hf download facebook/sam2.1-hiera-base-plus sam2.1_hiera_base_plus.pt --local-dir ~/ComfyUI/models/sam2
hf download facebook/sam2.1-hiera-small sam2.1_hiera_small.pt --local-dir ~/ComfyUI/models/sam2
hf download facebook/sam2.1-hiera-tiny sam2.1_hiera_tiny.pt --local-dir ~/ComfyUI/models/sam2
hf download facebook/sam2-hiera-small sam2_hiera_small.pt --local-dir ~/ComfyUI/models/sam2
hf download Kijai/sam2-safetensors sam2.1_hiera_small-fp16.safetensors --local-dir ~/ComfyUI/models/sam2
hf download Kijai/sam2-safetensors sam2.1_hiera_tiny-fp16.safetensors --local-dir ~/ComfyUI/models/sam2

# Whisper
hf download XHY-DY/whisper-large-v3 large-v3.pt --local-dir ~/ComfyUI/models/stt/whisper
wget -O ~/ComfyUI/models/stt/whisper/medium.pt https://openaipublic.azureedge.net/main/whisper/models/345ae4da62f9b3d59415adc60127b97c714f32e89e936602e85993674d08dcb1/medium.pt

# Text encoder (T5 base)
hf download google-t5/t5-base model.safetensors --local-dir ~/ComfyUI/models/text_encoders
mv ~/ComfyUI/models/text_encoders/model.safetensors ~/ComfyUI/models/text_encoders/t5-base.safetensors

# Upscaler
hf download GraydientPlatformAPI/safetensor-upscalers RealESRGAN_x4plus.safetensors --local-dir ~/ComfyUI/models/upscale_models

# TransNetV2 weights
hf download ByteDance/shot2story transnetv2-pytorch-weights.pth --local-dir ~/ComfyUI/models/VLM/transnetv2-pytorch-weights

8. Launch ComfyUI

cd ~/ComfyUI
source venv/bin/activate
python main.py --listen 0.0.0.0 --port 8188

9. Run ComfyUI under Supervisor

sudo apt install -y supervisor
sudo tee /etc/supervisor/conf.d/comfyui.conf > /dev/null <<'EOF'
[program:comfyui]
directory=/home/ubuntu/ComfyUI
command=/home/ubuntu/ComfyUI/venv/bin/python /home/ubuntu/ComfyUI/main.py --listen 0.0.0.0 --port 8188
user=ubuntu
autostart=true
autorestart=true
stopsignal=INT
stopasgroup=true
killasgroup=true
stdout_logfile=/var/log/comfyui.out.log
stderr_logfile=/var/log/comfyui.err.log
environment=HOME="/home/ubuntu",USER="ubuntu"
EOF
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start comfyui
sudo supervisorctl status comfyui
sudo tail -n 200 /var/log/comfyui.out.log
sudo tail -n 200 /var/log/comfyui.err.log

Final Check

  • open http://SERVER_IP:8188
  • confirm the custom nodes load without errors
  • test a simple workflow in the browser first
  • then point OpenShot Preferences->Advanced at the server URL (http://SERVER_IP:8188) and click Check

Thanks / Upstream Projects

A big thank you to the maintainers, contributors, and researchers behind the open-source repos and model releases used by OpenShot-ComfyUI.

Core upstream repos used by these nodes: