Downloads · 30 days
0
gravis778/wan2gp-video-generator
wan2gp-video-generator is a machine learning model from gravis778. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A reproducible pipeline for generating videos using custom LoRA modules, TorchInductor, and CUDA 12.8. Built for portability, disaster recovery, and clean builds across systems.
Downloads · 30 days
0
Access
Public
Updated Oct 11, 2025
Repo size
3.5 GB
Likes
1
Public
Click a slice to open those files.
.whl3.5 GB · 100%
From the Hugging Face model README
A reproducible pipeline for generating videos using custom LoRA modules, TorchInductor, and CUDA 12.8. Built for portability, disaster recovery, and clean builds across systems.
Here’s a successful run showing model pinning, async shuttle setup, and Torch compilation:

This project requires a clean environment with Python 3.10, CUDA 12.8, and Visual Studio Build Tools 2022.
Required to compile TorchInductor kernels, xformers, and transformer modules.
(Run all commands in the x64 Native Tools Command Prompt for VS 2022)
conda create -n wan2gp python=3.10
conda activate wan2gp
Clone the base pipeline from deepbeepmeep's GitHub:
git clone https://github.com/deepbeepmeep/wan2gp.git
cd wan2gp
pip install -r requirements.txt
(Continue in the same x64 Native Tools Command Prompt for VS 2022)
Install the following wheels in this exact order to ensure compatibility.
Visit the wheels_for_windows directory and manually download each .whl file to a local folder (e.g., C:\wan2gp\wheels_for_windows). (right click and save as)
Open your x64 Native Tools Command Prompt for VS 2022, activate your conda enviornment, navigate to the folder containing the wheels, and run:
pip install triton_windows-3.4.0.post20-cp310-cp310-win_amd64.whl
pip install torch-2.9.0.dev20250909-cu128-cp310-cp310-win_amd64.whl
pip install torchvision-0.24.0.dev20250909-cu128-cp310-cp310-win_amd64.whl
pip install torchaudio-2.8.0.dev20250909-cu128-cp310-cp310-win_amd64.whl
pip install flash_attn-2.8.3-cp310-cp310-win_amd64.whl
pip install xformers-0.0.33-f2043594.d20251008-cp39-abi3-win_amd64.whl
wgp.py and Enable CompilationBefore launching, follow these steps to enable Torch compilation and apply your patched wgp.py:
Launch the program once:
python wgp.py
Go to Configuration → Performance
Enable ✅ Compile Transformers
Click Apply Settings, then exit the program
Overwrite the default wgp.py with your patched version (from this repo)
Relaunch:
python wgp.py
Add the following lines to the top of wgp.py:
import torch._dynamo
torch._dynamo.config.accumulated_recompile_limit = 512 # or higher
torch._dynamo.config.verbose = True
torch._dynamo.config.suppress_errors = True
def compile_or_fallback(model, example_inputs):
try:
print("🧪 Attempting Torch compile...")
compiled_model = torch.compile(model, backend="inductor")
try:
compiled_model(*example_inputs)
except Exception as runtime_error:
print("⚠️ Runtime error during dry run. Falling back to eager mode.")
print("Runtime error:", runtime_error)
return model
print("✅ Compilation succeeded.")
return compiled_model
except Exception as compile_error:
print("⚠️ Compilation failed. Falling back to eager mode.")
print("Compile error:", compile_error)
return model
This ensures graceful fallback and verbose diagnostics during Torch compilation.
If you upgrade the WAN2GP codebase (e.g., by pulling updates from GitHub):
pip install -r requirements.txt to install any new dependencieswgp.py unless deepbeepmeep integrates these changes upstreamLaunch the pipeline using:
python wgp.py
Important: Always run from the x64 Native Tools Command Prompt for VS 2022 to ensure compiler visibility (cl.exe) and proper environment variables.
outputs/ with timestamped filenamesIf you encounter WinError 10055 (socket buffer exhaustion), apply these registry tweaks:
| Registry Key | Type | Value |
|---|---|---|
MaxUserPort | DWORD | 65534 |
TcpTimedWaitDelay | DWORD | 30 |
Location:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
Reboot required after applying.