Skip to content

Instantly share code, notes, and snippets.

@voxels
Created May 22, 2026 14:26
Show Gist options
  • Select an option

  • Save voxels/db56aa8088defd5ddad081582a0f1371 to your computer and use it in GitHub Desktop.

Select an option

Save voxels/db56aa8088defd5ddad081582a0f1371 to your computer and use it in GitHub Desktop.
Install OpenTrainer for NVidia 3080 Ti
Good β€” this is the right moment to reset. Your current env is in β€œdependency whack-a-mole mode,” so a clean stack will actually save time.
Below is a **known-stable Windows 11 + RTX 3080 Ti + OneTrainer SDXL LoRA setup** that avoids all the version traps you just hit (torch/torchvision/xformers/numpy/diffusers mismatches).
---
# 🧨 CLEAN INSTALL SCRIPT (Windows 11 / SDXL / OneTrainer)
## ⚠️ What this does
* Creates a fresh conda env
* Pins stable PyTorch stack (cu121)
* Installs OneTrainer dependencies correctly
* Avoids NumPy 2 / broken torchvision / broken xformers
* Prevents diffusers conflicts
---
# πŸš€ STEP 1 β€” Create fresh environment
```bash
conda create -n onetrainer_clean python=3.10 -y
conda activate onetrainer_clean
```
---
# πŸš€ STEP 2 β€” Upgrade pip tools
```bash
python -m pip install --upgrade pip setuptools wheel
```
---
# πŸš€ STEP 3 β€” Install stable PyTorch stack (IMPORTANT)
This is the **correct SDXL baseline for RTX 3080 Ti**
```bash
pip install torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 --index-url https://download.pytorch.org/whl/cu121
```
---
# πŸš€ STEP 4 β€” Install core ML dependencies (PINNED)
```bash
pip install numpy==1.26.4
pip install transformers==4.44.2
pip install accelerate==0.33.0
pip install safetensors
pip install pillow
pip install tqdm
```
---
# πŸš€ STEP 5 β€” Install xformers (MATCHED)
```bash
pip install xformers==0.0.23.post1
```
---
# πŸš€ STEP 6 β€” Install diffusers (IMPORTANT: compatible range)
```bash
pip install diffusers==0.30.3
```
(Stable SDXL-compatible version, avoids your `quantizers.gguf` mismatch issues)
---
# πŸš€ STEP 7 β€” Install HuggingFace tooling
```bash
pip install huggingface_hub
```
---
# πŸš€ STEP 8 β€” Clone OneTrainer cleanly
```bash
cd D:\Documents\dev
git clone https://github.com/Nerogar/OneTrainer.git
cd OneTrainer
```
---
# πŸš€ STEP 9 β€” Install OneTrainer requirements
```bash
pip install -r requirements.txt
```
---
# πŸš€ STEP 10 β€” Verify system before running
```bash
python -c "import torch; print(torch.__version__)"
python -c "import torchvision; print(torchvision.__version__)"
python -c "import diffusers; print(diffusers.__version__)"
```
Expected:
```txt
torch 2.1.2
torchvision 0.16.2
diffusers 0.30.3
```
---
# πŸš€ STEP 11 β€” Launch OneTrainer
```bash
python scripts/train_ui.py
```
---
# 🧠 What this fixes (your exact errors)
### βœ” Fixes torchvision errors
* `register_fake`
* `nms missing`
* `GroupName missing`
### βœ” Fixes NumPy crash
* `_ARRAY_API not found`
### βœ” Fixes diffusers import crash
* `diffusers.quantizers.gguf`
### βœ” Fixes xformers mismatch
* compiled extension mismatch errors
### βœ” Prevents future breakage
* no bleeding-edge torch builds
* no NumPy 2.x
* no mixed pip + bundled diffusers
---
# ⚠️ IMPORTANT RULES (don’t skip these)
After this install:
### ❌ NEVER do:
```bash
pip install torch --upgrade
pip install numpy --upgrade
pip install diffusers --upgrade
```
### ❌ NEVER mix:
* pip diffusers + OneTrainer src diffusers
* torch 2.4+ with old xformers
* NumPy 2.x
---
# πŸ’‘ Optional (recommended for your 3080 Ti)
Add VRAM optimizations:
```bash
pip install bitsandbytes
```
and in training config:
* enable gradient checkpointing
* use batch size 1–2
* use 1024 SDXL resolution with bucketing
---
# πŸš€ If you want next step
Once this is working, I can help you:
* tune SDXL LoRA settings for **maximum style fidelity**
* fix captioning pipeline (your earlier script)
* optimize for **16GB VRAM stability**
* or build a ComfyUI inference pipeline for your trained LoRA
Just tell me πŸ‘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment