This guide covers manual installation for different GPU generations and operating systems. Alternatively you may use the 1 click install / update scripts (please check the repo readme for instructions).
It is recommended to use Python 3.10.9, PyTorch 2.7.1 with Cuda 12.8 for GTX 10XX and Python 3.11.14, PyTorch 2.10 with Cuda 13.0/13.1 for RTX 30XX - RTX 50XX as both these configs are well-tested and stable.
It is not recommended to use either PytTorch 2.8.0 as some System RAM memory leaks have been observed when switching models or 2.9.0 which has some Convolution 3D perf issues (VAE VRAM requirements explode).
If you want to use the NV FP4 optimized kernels for RTX 50xx, you will need to upgrade to Python 3.11, PyTorch 2.10 with Cuda 13.0 if you are still using the old install setup based on cuda 12.8.
You need to install anaconda or miniconda first (https://www.anaconda.com/download/success?reg=skipped)
you must install Cuda 13.1: https://developer.nvidia.com/cuda-13-1-0-download-archive
Then open a Terminal Window get in the parent folder where you would to install WanGP and then type in:
git clone https://github.com/deepbeepmeep/Wan2GP.git
cd Wan2GP
conda create -n wan2gp python=3.11.14
conda activate wan2gp
pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://download.pytorch.org/whl/cu130
pip install -r requirements.txtyou must install Cuda 12.8: https://developer.nvidia.com/cuda-12-8-0-download-archive
Then open a Terminal Window get in the parent folder where you would to install WanGP and then type in:
git clone https://github.com/deepbeepmeep/Wan2GP.git
cd Wan2GP
conda create -n wan2gp python=3.10.9
conda activate wan2gp
pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 --index-url https://download.pytorch.org/whl/test/cu128
pip install -r requirements.txtThe Triton library is required for Pytorch compilation and Sage Attention and by various kernels to accelerate tensors processing.
pip install -U "triton-windows<3.3"
pip install triton-windows
Triton library should be automatically installed when installing pytorch.
Sage Attention accelerates a Video / Image Generation up to x2 with very little quality loss. Sage doesnt support GTX 10xx.
Only Sage attention 1 is supported for these GPUs
pip install sageattention==1.0.6
pip install https://github.com/woct0rdho/SageAttention/releases/download/v2.2.0-windows.post4/sageattention-2.2.0+cu130torch2.9.0andhigher.post4-cp39-abi3-win_amd64.whl
Only Sage attention 1 is supported for these GPUs
pip install sageattention==1.0.6
python -m pip install "setuptools<=75.8.2" --force-reinstall
git clone https://github.com/thu-ml/SageAttention
cd SageAttention
pip install -e .
Sparge Attention (spas_sage_attn) provides the optimized sparse attention kernels used by FlashVSR. Install it after Pytorch and Triton.
pip install https://github.com/woct0rdho/SpargeAttn/releases/download/v0.1.0-windows.post4/spas_sage_attn-0.1.0%2Bcu130torch2.9.0andhigher.post4-cp39-abi3-win_amd64.whl
pip install https://github.com/woct0rdho/SpargeAttn/releases/download/v0.1.0-windows.post3/spas_sage_attn-0.1.0%2Bcu128torch2.7.1.post3-cp39-abi3-win_amd64.whl
python -m pip install ninja wheel packaging
python -m pip install --no-build-isolation git+https://github.com/woct0rdho/SpargeAttn.git
Flash attention is not as fast as Sage for Generating Videos or Images but it preserves quality. However when used with a Language Model (prompt enhancer, Text to Speech, Deepy) it can offer a significant speedup.
pip install https://github.com/deepbeepmeep/kernels/releases/download/Flash2/flash_attn-2.8.3-cp311-cp311-win_amd64.whl
pip install https://github.com/Redtash1/Flash_Attention_2_Windows/releases/download/v2.7.0-v2.7.4/flash_attn-2.7.4.post1+cu128torch2.7.0cxx11abiFALSE-cp310-cp310-win_amd64.whl
pip install flash-attn==2.7.2.post1
These kernels are used to accelerate GGUF models. Wheel 1.0.11 provides optimized FP16/BF16 modes, CUDA-graph-safe Stream-K, and quantized KV-cache attention on Windows and Linux.
-
Windows
pip install https://github.com/deepbeepmeep/kernels/releases/download/GGUF_Kernels/llamacpp_gguf_cuda-1.0.11+torch210cu130py311-cp311-cp311-win_amd64.whl -
Linux
pip install https://github.com/deepbeepmeep/kernels/releases/download/GGUF_Kernels/llamacpp_gguf_cuda-1.0.11+torch210cu130py311-cp311-cp311-linux_x86_64.whl
-
Windows
pip install https://github.com/deepbeepmeep/kernels/releases/download/GGUF_Kernels/llamacpp_gguf_cuda-1.0.11+torch271cu128py310-cp310-cp310-win_amd64.whl -
Linux
pip install https://github.com/deepbeepmeep/kernels/releases/download/GGUF_Kernels/llamacpp_gguf_cuda-1.0.11+torch271cu128py310-cp310-cp310-linux_x86_64.whl
The default automatic policy keeps GGUF weights packed and uses native BF16 MMQ when BF16 is requested. To select a policy explicitly, set WGP_GGUF_LLAMACPP_CUDA_MATMUL_MODE before starting WanGP:
fast: use MMQ for small workloads and materialize larger matrices directly as FP16 or BF16 for cuBLAS.low_vram: always multiply from packed GGUF weights with MMQ, without materializing a full dense weight matrix.
For example, in Windows Command Prompt:
set WGP_GGUF_LLAMACPP_CUDA_MATMUL_MODE=fast
python wgp.py
Or in PowerShell:
$env:WGP_GGUF_LLAMACPP_CUDA_MATMUL_MODE = "low_vram"
python wgp.py
Or on Linux:
export WGP_GGUF_LLAMACPP_CUDA_MATMUL_MODE=low_vram
python wgp.py
The setting is read when the kernel package loads. If it is changed inside an already-running Python process, call llamacpp_gguf_cuda.refresh_env() before the next generation. Set WGP_GGUF_LLAMACPP_CUDA_BF16_FP16=1 only to restore the legacy behavior that computes automatic BF16 requests through FP16 cuBLAS. To disable the GGUF CUDA package entirely, set WGP_GGUF_LLAMACPP_CUDA=0 before starting WanGP.
Stream-K is enabled by default and reuses a persistent 16 MiB workspace, so it does not allocate memory while a CUDA graph is being recorded. Set WGP_GGUF_LLAMACPP_CUDA_STREAM_K=0 to disable Stream-K without disabling the rest of the GGUF kernels. Set WGP_GGUF_LLAMACPP_CUDA_STREAM_K_BUFFER_MB to change the workspace size; 0 also disables Stream-K.
These variables are cached when the package loads. After changing either one in a running process, call llamacpp_gguf_cuda.refresh_env() before the next generation. Existing CUDA graphs must be captured again to use the new setting.
These kernels will offer optimized INT4 / FP4 dequantization.
Please Note FP4 support is hardware dependent and will work only with RTX 50xx / sm120+ GPUs
-
Windows
pip install https://github.com/deepbeepmeep/kernels/releases/download/Light2xv/lightx2v_kernel-0.0.2+torch2.10.0-cp311-abi3-win_amd64.whl -
Linux
pip install https://github.com/deepbeepmeep/kernels/releases/download/Light2xv/lightx2v_kernel-0.0.2+torch2.10.0-cp311-abi3-linux_x86_64.whl
-
Windows
pip install https://github.com/nunchaku-ai/nunchaku/releases/download/v1.2.1/nunchaku-1.2.1+cu13.0torch2.10-cp311-cp311-win_amd64.whl -
Linux
pip install https://github.com/nunchaku-ai/nunchaku/releases/download/v1.2.1/nunchaku-1.2.1+cu13.0torch2.10-cp311-cp311-linux_x86_64.whl
-
Windows
pip install https://github.com/deepbeepmeep/kernels/releases/download/v1.2.0_Nunchaku/nunchaku-1.2.0+torch2.7-cp310-cp310-win_amd64.whl -
Linux (Pytorch 2.7.1 / Cuda 12.8)
pip install https://github.com/deepbeepmeep/kernels/releases/download/v1.2.0_Nunchaku/nunchaku-1.2.0+torch2.7-cp310-cp310-linux_x86_64.whl
These kernels accelerate bitsandbytes 4-bit / NF4 checkpoints. Install them after Pytorch; pip will pick the matching Windows or Linux wheel automatically.
pip install bitsandbytes==0.49.2