Python
Revise AMD installation guide
DELUXA80a76df479ad
diff --git a/docs/AMD-INSTALLATION.md b/docs/AMD-INSTALLATION.mdindex 4f05589..b122770 100644--- a/docs/AMD-INSTALLATION.md+++ b/docs/AMD-INSTALLATION.md@@ -1,44 +1,48 @@-# Installation Guide+# AMD Installation Guide for Windows (TheRock)-This guide covers installation for specific RDNA3 and RDNA3.5 AMD CPUs (APUs) and GPUs-running under Windows.+This guide covers installation for AMD GPUs and APUs running under Windows using TheRock's official PyTorch wheels.-tl;dr: Radeon RX 7900 GOOD, RX 9700 BAD, RX 6800 BAD. (I know, life isn't fair).+## Supported GPUs-Currently supported (but not necessary tested):+Based on [TheRock's official support matrix](https://github.com/ROCm/TheRock/blob/main/SUPPORTED_GPUS.md), the following GPUs are supported on Windows:-**gfx110x**:+### **gfx110X-all** (RDNA 3):+* AMD RX 7900 XTX (gfx1100)+* AMD RX 7800 XT (gfx1101)+* AMD RX 7700 XT (gfx1101)+* AMD RX 7700S / Framework Laptop 16 (gfx1102)+* AMD Radeon 780M Laptop iGPU (gfx1103)-* Radeon RX 7600-* Radeon RX 7700 XT-* Radeon RX 7800 XT-* Radeon RX 7900 GRE-* Radeon RX 7900 XT-* Radeon RX 7900 XTX+### **gfx1150** (RDNA 3.5 APU)+* AMD Radeon 890M (Ryzen AI 9 HX 370 - Strix Point)-**gfx1151**:+### **gfx1151** (RDNA 3.5 APU):+* AMD Strix Halo APUs-* Ryzen 7000 series APUs (Phoenix)-* Ryzen Z1 (e.g., handheld devices like the ROG Ally)+### **gfx120X-all** (RDNA 4):+* AMD RX 9060 XT (gfx1200)+* AMD RX 9060 (gfx1200)+* AMD RX 9070 XT (gfx1201)+* AMD RX 9070 (gfx1201)-**gfx1201**:--* Ryzen 8000 series APUs (Strix Point)-* A [frame.work](https://frame.work/au/en/desktop) desktop/laptop+### Also supported:+* **gfx103X-dgpu**: (RDNA 2)+**Note:** If your GPU is not listed above, it is not supported by TheRock on Windows. Support status and future updates can be found in the [official documentation](https://github.com/ROCm/TheRock/blob/main/SUPPORTED_GPUS.md).## Requirements-- Python 3.11 (3.12 might work, 3.10 definately will not!)+- Python 3.11 (recommended for Wan2GP - TheRock currently supports Python 3.11, 3.12, and 3.13).+- Windows 10/11## Installation Environment-This installation uses PyTorch 2.7.0 because that's what currently available in-terms of pre-compiled wheels.+This installation uses PyTorch wheels built by TheRock.### Installing Python-Download Python 3.11 from [python.org/downloads/windows](https://www.python.org/downloads/windows/). Hit Ctrl+F and search for "3.11". Dont use this direct link: [https://www.python.org/ftp/python/3.11.9/python-3.11.9-amd64.exe](https://www.python.org/ftp/python/3.11.9/python-3.11.9-amd64.exe) -- that was an IQ test.+Download Python 3.11 from [python.org/downloads/windows](https://www.python.org/downloads/windows/). Press Ctrl+F and search for "3.11.".+Alternatively, you can use this direct link: [Python 3.11.9 (64-bit)](https://www.python.org/ftp/python/3.11.9/python-3.11.9-amd64.exe).After installing, make sure `python --version` works in your terminal and returns 3.11.x@@ -57,16 +61,14 @@ C:\Users\YOURNAME\AppData\Local\Programs\Python\Python311\Scripts\C:\Users\YOURNAME\AppData\Local\Programs\Python\Python311\```-If that doesnt work, scream into a bucket.-### Installing Git-Get Git from [git-scm.com/downloads/win](https://git-scm.com/downloads/win). Default install is fine.+Download Git from [git-scm.com/downloads/windows](https://git-scm.com/downloads/windows) and install it. The default installation options are fine.-## Install (Windows, using `venv`)+## Install (Windows, using a Python `venv`)-### Step 1: Download and Set Up Environment+### Step 1: Download and set up Wan2GP Environment```cmd:: Navigate to your desired install directory@@ -76,71 +78,146 @@ cd \your-path-to-wan2gpgit clone https://github.com/deepbeepmeep/Wan2GP.gitcd Wan2GP-:: Create virtual environment using Python 3.10.9+:: Create virtual environmentpython -m venv wan2gp-env:: Activate the virtual environmentwan2gp-env\Scripts\activate```-### Step 2: Install PyTorch+### Step 2: Install ROCm/PyTorch by TheRock++**IMPORTANT:** Choose the correct index URL for your GPU family!++#### For gfx110X-all (RX 7900 XTX, RX 7800 XT, etc.):++```cmd+pip install --pre torch torchaudio torchvision --index-url https://rocm.nightlies.amd.com/v2/gfx110X-all/+```++#### For gfx120X-all (RX 9060, RX 9070, etc.):++```cmd+pip install --pre torch torchaudio torchvision --index-url https://rocm.nightlies.amd.com/v2/gfx120X-all/+```++#### For gfx1151 (Strix Halo iGPU):-The pre-compiled wheels you need are hosted at [scottt's rocm-TheRock releases](https://github.com/scottt/rocm-TheRock/releases). Find the heading that says:+```cmd+pip install --pre torch torchaudio torchvision --index-url https://rocm.nightlies.amd.com/v2/gfx1151/+```-**Pytorch wheels for gfx110x, gfx1151, and gfx1201**+#### For gfx1150 (Radeon 890M - Strix Point):-Don't click this link: [https://github.com/scottt/rocm-TheRock/releases/tag/v6.5.0rc-pytorch-gfx110x](https://github.com/scottt/rocm-TheRock/releases/tag/v6.5.0rc-pytorch-gfx110x). It's just here to check if you're skimming.+```cmd+pip install --pre torch torchaudio torchvision --index-url https://rocm.nightlies.amd.com/v2-staging/gfx1150/+```-Copy the links of the closest binaries to the ones in the example below (adjust if you're not running Python 3.11), then hit enter.+#### For gfx103X-dgpu (RDNA 2):```cmd-pip install ^- https://github.com/scottt/rocm-TheRock/releases/download/v6.5.0rc-pytorch-gfx110x/torch-2.7.0a0+rocm_git3f903c3-cp311-cp311-win_amd64.whl ^- https://github.com/scottt/rocm-TheRock/releases/download/v6.5.0rc-pytorch-gfx110x/torchaudio-2.7.0a0+52638ef-cp311-cp311-win_amd64.whl ^- https://github.com/scottt/rocm-TheRock/releases/download/v6.5.0rc-pytorch-gfx110x/torchvision-0.22.0+9eb57cd-cp311-cp311-win_amd64.whl+pip install --pre torch torchaudio torchvision --index-url https://rocm.nightlies.amd.com/v2-staging/gfx103X-dgpu/```-### Step 3: Install Dependencies+This will automatically install the latest PyTorch, torchaudio, and torchvision wheels with ROCm support.++### Step 3: Install Wan2GP Dependencies```cmd:: Install core dependenciespip install -r requirements.txt```+### Step 4: Verify Installation++```cmd+python -c "import torch; print('PyTorch:', torch.__version__); print('ROCm available:', torch.cuda.is_available()); print('Device:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'No GPU')"+```++Expected output example:+```+PyTorch: 2.11.0+rocm7.12.0+ROCm available: True+Device: AMD Radeon RX 9070 XT+```+## Attention Modes-WanGP supports several attention implementations, only one of which will work for you:+WanGP supports multiple attention implementations via [triton-windows](https://github.com/woct0rdho/triton-windows/).++First, install `triton-windows` in your virtual environment.+If you have an older version of Triton installed, uninstall it first:++```cmd+pip uninstall triton+pip install triton-windows+```-- **SDPA** (default): Available by default with PyTorch. This uses the built-in aotriton accel library, so is actually pretty fast.+### Supported attention implementations-## Performance Profiles+- **Sageattention V1** (Requires the `.post26` wheel or newer):-Choose a profile based on your hardware:+```cmd+pip install "sageattention <2"+```++- **FlashAttention-2** (Only the Triton backend is supported):+```cmd+git clone https://github.com/Dao-AILab/flash-attention.git+cd flash-attention+pip install ninja+# Install FlashAttention-2 with the Triton backend enabled+set FLASH_ATTENTION_TRITON_AMD_ENABLE=TRUE && python setup.py install+```-- **Profile 3 (LowRAM_HighVRAM)**: Loads entire model in VRAM, requires 24GB VRAM for 8-bit quantized 14B model-- **Profile 4 (LowRAM_LowVRAM)**: Default, loads model parts as needed, slower but lower VRAM requirement+- **SDPA** (default): Available by default in PyTorch on post-RDNA3 GPUs.## Running Wan2GP-In future, you will have to do this:+For future sessions, activate the environment:```cmd-cd \path-to\wan2gp-wan2gp\Scripts\activate.bat+cd \path-to\Wan2GP+wan2gp-env\Scripts\activatepython wgp.py```-For now, you should just be able to type `python wgp.py` (because you're already in the virtual environment)-## Troubleshooting-- If you use a HIGH VRAM mode, don't be a fool. Make sure you use VAE Tiled Decoding.+### GPU Not Detected++If `torch.cuda.is_available()` returns `False`:++1. **Verify your GPU is supported** - Check the [Supported GPUs](#supported-gpus) list above+2. **Check AMD drivers** - Ensure you have the latest AMD Adrenalin drivers installed+3. **Verify correct index URL** - Make sure you used the right GPU family index URL++### Installation Errors++**"Could not find a version that satisfies the requirement":**+- Double-check that you're using the correct `--index-url` for your GPU family. You can also try adding the `--pre` flag or replacing `/v2/` in the URL with `/v2/staging/`+- Ensure you're using Python 3.11+- Try adding `--pre` flag if not already present++**"No matching distribution found":**+- Your GPU architecture may not be supported+- Check that you've activated your virtual environment++### Performance Issues++- **Monitor VRAM usage** - Reduce batch size if running out of memory+- **Close GPU-intensive apps** - Discord hardware acceleration, browsers, etc.++### Known Issues++Windows packages are new and may be unstable!-### Memory Issues+Known issues are tracked at: https://github.com/ROCm/TheRock/issues/808-- Use lower resolution or shorter videos-- Enable quantization (default)-- Use Profile 4 for lower VRAM usage-- Consider using 1.3B models instead of 14B models+## Additional Resources-For more troubleshooting, see [TROUBLESHOOTING.md](TROUBLESHOOTING.md)+- [TheRock GitHub Repository](https://github.com/ROCm/TheRock/)+- [TheRock Releases Documentation](https://github.com/ROCm/TheRock/blob/main/RELEASES.md)+- [Supported GPU Architectures](https://github.com/ROCm/TheRock/blob/main/SUPPORTED_GPUS.md)+- [TheRock Roadmap](https://github.com/ROCm/TheRock/blob/main/ROADMAP.md)+- [ROCm Documentation](https://rocm.docs.amd.com/)