Skip to content

Latest commit

 

History

History
87 lines (74 loc) · 3.08 KB

installing.md

File metadata and controls

87 lines (74 loc) · 3.08 KB

Install ComfyUI on your Network Volume

  1. Create a RunPod Account.
  2. Create a RunPod Network Volume.
  3. Attach the Network Volume to a Secure Cloud GPU pod.
  4. Select the RunPod Pytorch 2 template.
  5. Deploy the GPU Cloud pod.
  6. Once the pod is up, open a Terminal and install the required dependencies. This can either be done by using the installation script, or manually.

Automatic Installation Script

You can run this automatic installation script which will automatically install all of the dependencies that get installed manually below, and then you don't need to follow any of the manual instructions.

wget https://raw.githubusercontent.com/ashleykleynhans/runpod-worker-comfyui/main/scripts/install.sh
chmod +x install.sh
./install.sh

Manual Installation

You only need to complete the steps below if you did not run the automatic installation script above.

  1. Install the ComfyUI:
# Clone the repo
cd /workspace
git clone --depth=1 https://github.com/comfyanonymous/ComfyUI.git

# Upgrade Python
apt update
apt -y upgrade

# Ensure Python version is 3.10.12
python3 -V

# Create and activate venv
cd ComfyUI
python -m venv /workspace/venv
source /workspace/venv/bin/activate

# Install Torch and xformers
pip3 install --no-cache-dir torch==2.1.2+cu118 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip3 install --no-cache-dir xformers==0.0.23.post1+cu118 --index-url https://download.pytorch.org/whl/cu118

# Install ComfyUI
pip3 install -r requirements.txt

# Installing ComfyUI Manager
git clone https://github.com/ltdrdata/ComfyUI-Manager.git custom_nodes/ComfyUI-Manager
cd custom_nodes/ComfyUI-Manager
pip3 install -r requirements.txt
  1. Install the Serverless dependencies:
pip3 install huggingface_hub runpod
  1. Download some checkpoints:
cd /workspace/ComfyUI/models/checkpoints
wget https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors
wget https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors
wget https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/resolve/main/sd_xl_refiner_1.0.safetensors
wget -O deliberate_v2.safetensors https://huggingface.co/XpucT/Deliberate/resolve/main/Deliberate_v2.safetensors
  1. Download VAEs for SD 1.5 and SDXL:
cd /workspace/ComfyUI/models/vae
wget https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors
wget https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/resolve/main/sdxl_vae.safetensors
  1. Download ControlNet models, for example canny for SD 1.5 as well as SDXL:
cd /workspace/ComfyUI/models/controlnet
wget https://huggingface.co/lllyasviel/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny.pth
wget https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/diffusers_xl_canny_full.safetensors
  1. Create logs directory:
mkdir -p /workspace/logs