The message
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate … (Wan2GP / WanGP)
Affects: Wan2GP (WanGP)
Why is this happening?
Video models like Wan are very large, and every additional second and every pixel needs more memory. Depending on the memory profile, Wan2GP offloads model parts to RAM. A profile that is too generous, a high resolution, or a browser that uses VRAM itself can quickly lead to this error.
How to fix it
- Use memory profile 4 (default, loads model parts only when needed). You can force it at startup with
--profile 4, for example via a fileargs.txtin thescriptsfolder. - Reduce the resolution and number of frames (shorter video) and try again.
- Instead of the 14B model, try a smaller or quantized variant, for example the 1.3B model.
- Free up VRAM: Close other programs that use the graphics card. Wan2GP includes
scripts\start-chrome-no-gpu.batto start Chrome without the graphics card. According to the guide, this saves 1 to 5 GB of VRAM. - If RAM is the bottleneck, use
--profile 5(minimal RAM usage) or limit the reserved RAM with--perc-reserved-mem-max 0.3. - If SageAttention causes problems, start with
--attention sdpafor testing.
Better not: Profile 3 loads the entire model into VRAM and needs 24 GB VRAM for 14B models; don’t use it on normal gaming cards.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- VRAM explained: why it decides everything
How much VRAM does local AI need? Rule of thumb, quantization (Q4, Q8, fp8), context, image and video models, offloading, and which card si…
Terms for this
Similar errors
- Hugging Face download stops or hangs (.incomplete)
- Hugging Face: Cannot access gated repo (401)
- PC restarts or the screen goes black under full GPU load
- The NVIDIA driver on your system is too old
- llama.cpp (Vulkan): vk::Device::allocateMemory: ErrorOutOfDeviceMemory (graphics memory block too large or VRAM full)
Sources
- https://raw.githubusercontent.com/deepbeepmeep/Wan2GP/main/docs/TROUBLESHOOTING.md
- https://raw.githubusercontent.com/deepbeepmeep/Wan2GP/main/docs/CLI.md
- https://raw.githubusercontent.com/deepbeepmeep/Wan2GP/main/README.md
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.