From e757013a142fe1a80172c57053da7cb6c26851d3 Mon Sep 17 00:00:00 2001 From: Artiprocher Date: Mon, 10 Mar 2025 17:47:14 +0800 Subject: [PATCH] vram optimization --- examples/wanvideo/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/wanvideo/README.md b/examples/wanvideo/README.md index 51ceb3f..de3be03 100644 --- a/examples/wanvideo/README.md +++ b/examples/wanvideo/README.md @@ -155,6 +155,10 @@ CUDA_VISIBLE_DEVICES="0" python examples/wanvideo/train_wan_t2v.py \ --use_gradient_checkpointing ``` +If you wish to train the 14B model, please separate the safetensor files with a comma. For example: `models/Wan-AI/Wan2.1-T2V-14B/diffusion_pytorch_model-00001-of-00006.safetensors,models/Wan-AI/Wan2.1-T2V-14B/diffusion_pytorch_model-00002-of-00006.safetensors,models/Wan-AI/Wan2.1-T2V-14B/diffusion_pytorch_model-00003-of-00006.safetensors,models/Wan-AI/Wan2.1-T2V-14B/diffusion_pytorch_model-00004-of-00006.safetensors,models/Wan-AI/Wan2.1-T2V-14B/diffusion_pytorch_model-00005-of-00006.safetensors,models/Wan-AI/Wan2.1-T2V-14B/diffusion_pytorch_model-00006-of-00006.safetensors`. + +For LoRA training, the Wan-1.3B-T2V model requires 16G of VRAM for processing 81 frames at 480P, while the Wan-14B-T2V model requires 60G of VRAM for the same configuration. To further reduce VRAM requirements by 20%-30%, you can include the parameter `--use_gradient_checkpointing_offload`. + Step 5: Test Test LoRA: