Install FluxGym on RTX 5000 series - Train on LOCAL PC
INTRO - Just to be clear:
I'm a total beginner with no experience in training LoRA in general. I still have A LOT to learn.
BUT!
Since I own an RTX 5090 (mostly for composite, video editing, animation etc..) and found no simple solution to train LoRA locally on my PC, I dug all over and did lots of experiments until it worked!
This should work ONLY if you have already installed CUDA 12.8.x (CUDA Toolkit) on your PC and pointed to it via Windows PATH, VS TOOLS, the latest Nvidia drivers, etc.
Sorry, I can't explain the whole preparation steps—these are extras you'll need to install first. If you already have these installed, you can follow this guide👍
If you're like me and struggle to run FluxGym with your RTX 5000 series, this may help you:
I can't guarantee it will work, but I can tell you I wrote this so-called "guide" as soon as I saw that FluxGym trained successfully on my PC.
One more thing, forgive me for my bad English. Also, it's my very first "GUIDE," so please be gentle 🙏
---
I'm using a Windows OS. I don't know how it works on other OS (Mac/Linux), so this is based on Windows 11 in my case.
NOTICE: This is based on the current up-to-date FluxGym GitHub repo. If they update their instructions, this guide may no longer make sense.
LET'S BEGIN!
1️⃣. Create a directory to download the latest version of the official FluxGym.
Example:
D:/FluxGym
2️⃣. Once you're inside your FluxGym type: "CMD" to open command prompt
3️⃣. Once CMD is open,
Visit the official FluxGym github repo and Follow ALL the steps one-by-one... BUT!
BEFORE you do the final step where it tells you: "Finally, install pytorch Nightly"
Instead of what they suggest, copy past this:
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
(notice it's a ONE long line, copy ALL at once)
4️⃣. Now that you're DONE with GluxGym installation we need to tweak something to make it work on RTX 5000:
While still on CMD, go inside this directory:
D:\FluxGym\sd-scripts\
run this:
pip install -U bitsandbytes
5️⃣. The LAST step is a bit tricky, we need to COPY a file and PAST it on a specific directory. I didn't find a direct link beside from ComfyUI itself.
If you already installed Cuda 2.8.x and the Nightly version of ComfyUI you have this file inside ComfyUI.
I will try to attach it in here if possible so you can grab it.
Copy this file:
libbitsandbytes_cuda128.dll
From (Download and Unzip) or from ComfyUI directory:
D:\ComfyUI\venv\lib\site-packages\bitsandbytes\
to:
D:\FluxGym\env\Lib\site-packages\bitsandbytes\
6️⃣ THAT'S IT! let's RUN FluxGym, go to the main directory:
D:\FluxGym\
Type:
python app.py
And start your training, have fun!
7️⃣. BONUS:
Create a batch file to RUN FluxGym in ONE CLICK:
On the MAIN directory of FluxGym: D:\FluxGym\
Run notepad or any text editor and type this:
@echo off
call env\scripts\activate
python app.py
PAUSE
DO NOT Save it as .txt - SAVE it as: .bat
Example:
RUN FluxGym.bat
If you followed all the instructions, you can just DOUBLE CLICK that .bat file to run FluxGym.
I'm aware it might not work for everyone because of the pre-installed CUDA-related requirements and the FILE I mentioned, but I hope this helps some people.
In the meantime, have a nice day! ❤️
Posted Mar 24, 2025, 3:37 AM UTC