Wan2GP (WanGP) is an open-source AI video generation platform supporting multiple model families including Wan 2.1/2.2, Hunyuan Video, LTX Video, and Flux. It exposes a Gradio web UI on port 7860 and auto-downloads model weights on first use.
GitHub: https://github.com/deepbeepmeep/Wan2GP
Docker Hub: https://hub.docker.com/r/k8bit/wan2gp-cuda
Two builds are maintained, targeting different GPU architectures:
CUDA (NVIDIA) — k8bit/wan2gp-cuda:latest
Targets RTX-class GPUs. Built on nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04 with PyTorch stable CUDA 12.4 wheels. Tested on dual RTX 3090 (24 GB VRAM each). Triton JIT cache is stable and can be persisted across container restarts.
ROCm (AMD) — local build, wan2gp-rocm:latest
Targets RDNA4 and other supported AMD architectures. Built on rocm/dev-ubuntu-22.04:6.4.3 with PyTorch nightly ROCm 6.4 wheels and PYTORCH_ROCM_ARCH=gfx1201. Tested on AMD Radeon AI PRO R9700 (32 GB VRAM). Triton cache must be pointed to a non-persistent path (/tmp/triton-cache) due to ROCm/Triton 3.7.0 .so stale cache issues on restart.
--gpus all at runtimeNVIDIA_DRIVER_CAPABILITIES=compute,video,utility/dev/kfd and /dev/dri passed through to the containervideo group): --group-add=18--ipc=host, --shm-size=8g, --security-opt seccomp=unconfined are required for ROCm shared memoryHIP_VISIBLE_DEVICES=0 to restrict PyTorch to the discrete GPU onlyHSA_OVERRIDE_GFX_VERSION to an empty string — either set it to a valid version or omit it entirely; an empty value breaks GPU initialisationWanGP separates model weights from application source code. The correct mount targets are:
| Purpose | Container path | Notes |
|---|---|---|
| Model weights (checkpoints) | /app/ckpts | All models download here; can be 10–30 GB each |
| Generated outputs | /app/outputs | Videos and images written here |
| LoRA files | /app/loras | Optional .safetensors fine-tunes |
| HuggingFace + Triton cache | /app/cache | Must exist on host before first start |
Important:
/app/modelsis Python source code, not model weights. Mounting a host directory over it will wipe the application modules and causeModuleNotFoundErroron startup. Always use/app/ckptsfor weights.
The cache directory (/app/cache) must be created on the host before the container starts. If it doesn't exist, Docker mounts an empty directory over it and HuggingFace's file locking will fail with OS error 17 (EEXIST) when attempting to download models.
| Variable | Default | Description |
|---|---|---|
WAN2GP_PROFILE | 1 | Memory profile: 1 = fastest (most VRAM), 5 = lowest VRAM |
AUTO_UPDATE | false | If true, pulls latest Wan2GP from git and reinstalls requirements on each container start (~30s overhead) |
WAN2GP_EXTRA_ARGS | (empty) | Extra command-line arguments passed directly to wgp.py |
HF_HOME | /app/cache | HuggingFace cache root inside the container |
TRITON_CACHE_DIR | /app/cache/triton (CUDA) / /tmp/triton-cache (ROCm) | Triton JIT kernel cache |
OMP_NUM_THREADS | 1 | Keep at 1 for GPU-bound workloads |
CUDA_VISIBLE_DEVICES | (unset) | NVIDIA only: restrict to a specific GPU index |
HIP_VISIBLE_DEVICES | (unset) | AMD only: restrict to a specific GPU index |
NVIDIA_DRIVER_CAPABILITIES | compute,video,utility | NVIDIA only: required for GPU access |
WanGP offers three quantization modes selectable in the web UI:
On ROCm with Triton 3.7.0 and ROCm 6.4.3, Scaled Int8 currently falls back to a Quanto software path because hipDrvLaunchKernelEx is not found in libamdhip64.so. Generation still works but is slower. Using 16-bit mode or the Distilled 1.1 model avoids this fallback. This is a Triton/ROCm compatibility issue expected to be resolved in a future ROCm release.
On CUDA with PyTorch stable, all three modes work correctly. RTX 3090 (24 GB VRAM) comfortably runs profile 1 (fastest) with Scaled Int8.
# Clone or copy the deployment files alongside the Dockerfiles
chmod +x build-and-deploy-cuda.sh
bash build-and-deploy-cuda.sh
The script:
nvidia-smiwan2gp-cuda:latest locallyk8bit/wan2gp-cuda:latest on Docker Hubchmod +x build-and-deploy.sh
bash build-and-deploy.sh
Same flow without the Docker Hub push step (ROCm builds are architecture-specific and not published to a public registry).
# CUDA
docker compose -f docker-compose.cuda.yml up -d
docker compose -f docker-compose.cuda.yml logs -f
# ROCm
docker compose -f docker-compose.rocm.yml up -d
docker compose -f docker-compose.rocm.yml logs -f
The web UI will be available at http://<host-ip>:7860 once WanGP prints Running on local URL.
On first launch WanGP downloads shared model files (~2 GB). The main generation model (Wan 2.1 T2V, ~14 GB) downloads when you first trigger a generation.
Container exits immediately on AMD
Check that /dev/kfd and /dev/dri are passed through and that GID 18 is added. Verify with docker logs <container> — look for the torch.cuda (HIP) check output.
ModuleNotFoundError: No module named 'models.wan'
A host directory has been mounted over /app/models. Remove that mount; model weights belong at /app/ckpts.
OS error 17 (EEXIST) during model download
The cache host directory does not exist. Create it before starting the container: mkdir -p <host-cache-path>.
Triton errors on ROCm restart
Stale compiled .so files in a persistent Triton cache. Delete the cache directory contents and ensure TRITON_CACHE_DIR points to /tmp/triton-cache (ephemeral) rather than a persistent volume.
HSA_OVERRIDE_GFX_VERSION set to empty string
Remove the variable entirely. An empty string is parsed as a malformed GFX version override and prevents ROCm GPU detection.
Both AMD GPUs visible, PyTorch fails
Set HIP_VISIBLE_DEVICES=0 to hide the integrated GPU and expose only the discrete card to the container.
Content type
Image
Digest
sha256:d0ea27f94…
Size
13.2 GB
Last updated
2 months ago
docker pull k8bit/wan2gp