Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build Windows Release

# on:
# push:
# tags:
# - 'v*.*.*' # tag with vMAJOR.MINOR.PATCH

jobs:
build-win:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Build web
working-directory: web
run: |
npm ci
npm run build

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Python deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller packaging

- name: Build exe
run: |
pyinstaller -y packaging/Umaplay.spec

- name: Archive artifact
shell: pwsh
run: |
Compress-Archive -Path dist/Umaplay/* -DestinationPath Umaplay-Windows.zip

- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: Umaplay-Windows.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ datasets/uma/*
datasets/uma/raw/*
models/base/*

README.gpu.md
README.ai.md
README.train.md

config.json
build
dist
93 changes: 93 additions & 0 deletions README.gpu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# GPU Setup Guide for PyTorch

If you want to use **GPU acceleration** with PyTorch, follow these steps:

---

## 1. Install CUDA Drivers
You need an **NVIDIA Graphics Card** and the corresponding CUDA Toolkit.
👉 Download here: [CUDA Downloads](https://developer.nvidia.com/cuda-downloads)

Validate your installation by running in CMD:

```bash
nvcc --version
nvidia-smi
```

---

## 2. Uninstall Existing Torch

Remove any previous CPU-only PyTorch installations:

```bash
pip uninstall torch torchvision torchaudio -y
```

---

## 3. Reinstall Torch with CUDA Support

Use the [official PyTorch installation guide](https://pytorch.org/get-started/locally/) to find the right command for your CUDA version.

For example, since my CUDA is **12.9**, I installed with:

```bash
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu129
```

---

## 4. Validate GPU Availability

Run the following test in Python:

```python
import torch

print("CUDA available:", torch.cuda.is_available())
print("Current device:", torch.cuda.current_device() if torch.cuda.is_available() else "CPU")
print("Device name:", torch.cuda.get_device_name(torch.cuda.current_device()) if torch.cuda.is_available() else "CPU")
```

If everything is set up correctly, you should see the name of your NVIDIA GPU.

---

## ⚠️ Troubleshooting

Here are some common issues and fixes:

### 🔹 `torch.cuda.is_available()` returns `False`

* Your NVIDIA drivers may be outdated → [Update drivers](https://www.nvidia.com/Download/index.aspx).
* CUDA Toolkit version doesn’t match the installed PyTorch build.
Example: If you installed `cu129` but your drivers only support CUDA 12.2, you’ll get `False`.
👉 Run `nvidia-smi` to check the **driver-supported CUDA version**.

### 🔹 `nvcc` not found

* CUDA Toolkit is not in your PATH. Add this to your environment variables:

```bash
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
```

(For Windows, add `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vXX.X\bin` to the system PATH.)

### 🔹 `nvidia-smi` not found

* NVIDIA drivers are not installed properly. Reinstall from [NVIDIA Drivers](https://www.nvidia.com/Download/index.aspx).

### 🔹 Python environment conflicts

* Make sure you’re using a clean environment (e.g., `venv` or `conda`) to avoid version clashes.
* Sometimes you need to uninstall and reinstall again:

```bash
pip uninstall torch torchvision torchaudio -y
pip cache purge
pip install torch torchvision --index-url https://download.pytorch.org/whl/cuXXX
```
Loading