Skip to content

Instantly share code, notes, and snippets.

@subhashhhhhh
Created December 13, 2025 13:26
Show Gist options
  • Select an option

  • Save subhashhhhhh/1945366b507f6b144dfee5fe3232e9af to your computer and use it in GitHub Desktop.

Select an option

Save subhashhhhhh/1945366b507f6b144dfee5fe3232e9af to your computer and use it in GitHub Desktop.
Provisioning Script to setup ComfyUI with Wan 2.2 I2V 14B
#!/bin/bash
# 1. Define Paths (Standard for ai-dock images)
COMFY_DIR="/opt/ComfyUI"
MODELS_DIR="${COMFY_DIR}/models"
CUSTOM_NODES="${COMFY_DIR}/custom_nodes"
# 2. Install the Wan Wrapper Node (Crucial for Wan 2.2 support)
# This node by Kiijai is the standard for running Wan in ComfyUI
echo "Installing ComfyUI-WanVideoWrapper..."
cd "$CUSTOM_NODES"
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper.git
cd ComfyUI-WanVideoWrapper
pip install -r requirements.txt
# 3. Download Models (Wan 2.2 I2V 14B)
# We use HuggingFace links. These are large downloads!
# A. The Main Diffusion Model (14B parameters) -> Goes to 'diffusion_models'
echo "Downloading Wan 2.2 I2V 14B Model..."
mkdir -p "${MODELS_DIR}/diffusion_models"
cd "${MODELS_DIR}/diffusion_models"
wget -nc https://huggingface.co/Wan-AI/Wan2.2-I2V-A14B/resolve/main/wan2.2_i2v_a14b.safetensors
# B. The Text Encoder (UMT5-XXL) -> Goes to 'text_encoders'
# Required for understanding your prompt.
echo "Downloading Text Encoder (UMT5)..."
mkdir -p "${MODELS_DIR}/text_encoders"
cd "${MODELS_DIR}/text_encoders"
wget -nc https://huggingface.co/Comfy-Org/Wan_2.1_WanVideo_repackaged/resolve/main/umt5_xxl_fp8_e4m3fn_scaled.safetensors
# C. The VAE -> Goes to 'vae'
echo "Downloading VAE..."
mkdir -p "${MODELS_DIR}/vae"
cd "${MODELS_DIR}/vae"
wget -nc https://huggingface.co/Wan-AI/Wan2.1-I2V-14B-720P/resolve/main/Wan2.1_VAE.pth
# D. CLIP Vision (For Image-to-Video) -> Goes to 'clip_vision'
echo "Downloading CLIP Vision..."
mkdir -p "${MODELS_DIR}/clip_vision"
cd "${MODELS_DIR}/clip_vision"
wget -nc https://huggingface.co/Comfy-Org/Wan_2.1_WanVideo_repackaged/resolve/main/clip_vision_h.safetensors
echo "Provisioning Complete! Wan 2.2 is ready."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment