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
9 changes: 9 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
- os: windows-latest
python: '3.12'
artifact_name: PhotoSort-Windows-x64
onnx_runtime: onnxruntime
- os: windows-latest
python: '3.12'
artifact_name: PhotoSort-Windows-x64-CUDA
onnx_runtime: onnxruntime-gpu
- os: macos-13 # Intel
python: '3.12'
artifact_name: PhotoSort-macOS-Intel
Expand Down Expand Up @@ -82,6 +87,10 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Override ONNX Runtime with matrix-specified package
if [ "$RUNNER_OS" = "Windows" ]; then
pip install --force-reinstall ${{ matrix.onnx_runtime }}
fi
# Build tools
pip install pyinstaller

Expand Down
41 changes: 14 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,36 +34,15 @@ PhotoSort is a powerful desktop application focused on speed designed to streaml

### Hardware Acceleration (Optional, Recommended)

For significantly faster AI-powered features like **Rotation Detection** and **Similarity Analysis**, it is highly recommended to install the appropriate ONNX Runtime package for your hardware. The application will automatically use the best available hardware (GPU > CPU).

First, uninstall the basic CPU package to avoid conflicts:

```bash
pip uninstall onnxruntime
```

Then, install the package corresponding to your hardware:
For significantly faster AI-powered features like **Rotation Detection** and **Similarity Analysis**, use the appropriate requirements file for your hardware.

#### For NVIDIA GPUs (CUDA)
Use [`requirements-cuda.txt`](requirements-cuda.txt) which includes `onnxruntime-gpu`. Requires NVIDIA CUDA Toolkit & cuDNN.

```bash
# Requires NVIDIA CUDA Toolkit & cuDNN
pip install onnxruntime-gpu
```

#### For Apple Silicon (M1/M2/M3)

```bash
# Uses Apple's Metal Performance Shaders (MPS)
pip install onnxruntime-silicon
```
#### For CPU (Default)
Use [`requirements.txt`](requirements.txt) which includes the standard `onnxruntime` package.

#### For AMD GPUs (ROCm) - Untested

```bash
# Requires AMD ROCm driver/libraries
pip install onnxruntime-rocm
```
> **Note**: These packages are mutually exclusive. If switching between CPU and CUDA versions, create separate virtual environments or uninstall the current onnx package before installing the other.

### AI Model Setup (Required for Rotation Detection)

Expand Down Expand Up @@ -91,11 +70,19 @@ The application will automatically detect and load the model when you use the ro
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. **Install dependencies:**
Ensure your [`requirements.txt`](requirements.txt) is up-to-date with all necessary packages (PyQt6, Pillow, rawpy, opencv-python, sentence-transformers, scikit-learn, numpy, send2trash, pyexiv2, onnxruntime).
Choose the appropriate requirements file based on your hardware:

#### For CPU (Default)
```bash
pip install -r requirements.txt
```

#### For NVIDIA CUDA GPU Acceleration
```bash
pip install -r requirements-cuda.txt
```

> **Note**: The CUDA version requires NVIDIA CUDA Toolkit and cuDNN to be installed on your system.
4. **Run the application:**
The main entry point is [`src/main.py`](src/main.py).

Expand Down
14 changes: 14 additions & 0 deletions requirements-cuda.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PyQt6
rawpy
Pillow
Pillow-heif
sentence-transformers
scikit-learn
torch
diskcache
send2trash
opencv-python
pyexiv2
piexif
onnxruntime-gpu
torchvision