Everything below comes from FluxGym's GitHub README, its model list and the app's own source code, plus the README of Kohya's sd-scripts, which does the actual training. We read them all on 3 December 2026.
A LoRA is a small add-on file that teaches an image model a new face, object or style from a handful of your own pictures. Training one for FLUX.1 usually calls for a big graphics card. FluxGym is a free, MIT-licensed web app by cocktailpeanut that was built to bring Flux LoRA training to cards with 12GB, 16GB or 20GB of video memory (VRAM). Its interface is a fork of the Gradio UI made for Ostris AI Toolkit, but the training itself runs on Kohya's sd-scripts. FluxGym says it supports all of sd-scripts' options through a hidden Advanced tab.
What you need
An NVIDIA graphics card with at least 12GB of VRAM. FluxGym's lowest memory preset is 12GB. Cards such as the ASUS RTX 3060 12GB Dual Gaming OC V2 or the ASUS RTX 5060 Ti 16GB Dual OC fall into its 12GB and 16GB presets. The manual install uses NVIDIA's CUDA builds of PyTorch. Our guide to how much VRAM you need explains where each card fits.
Windows or Linux, plus Git and Python if you install by hand. FluxGym also ships a Docker setup.
A set of clear photos of your subject. FluxGym accepts up to 150 images per dataset. Every image needs a caption, so a smaller, varied set is quicker to prepare.
Free disk space for the FLUX.1 model files, which FluxGym downloads automatically the first time you train.
One licence point is worth knowing. FluxGym's model list labels FLUX.1-dev, and the flux-dev2pro model based on it, with Black Forest Labs' FLUX.1 [dev] Non-Commercial License. FLUX.1-schnell is Apache 2.0. Check the licence before you use a LoRA commercially.
Step 1: Install FluxGym
There are two routes.
One-click with Pinokio. The README's first option is the Pinokio launcher, which installs and starts everything for you. If you haven't used it, see our guide to using Pinokio for local AI.
By hand. Open a terminal and clone FluxGym, then clone the sd3 branch of Kohya's sd-scripts inside it:
git clone https://github.com/cocktailpeanut/fluxgym
cd fluxgym
git clone -b sd3 https://github.com/kohya-ss/sd-scripts
Create and activate a virtual environment in the fluxgym folder (python -m venv env, then env\Scripts\activate on Windows or source env/bin/activate on Linux). Install sd-scripts' requirements from inside the sd-scripts folder with pip install -r requirements.txt, go back up a level and run the same command again for FluxGym's own requirements.
Finally, install PyTorch. The README gives a CUDA 12.1 nightly command for most cards. RTX 50-series owners need a different one: install the CUDA 12.8 (cu128) nightly build and update bitsandbytes with pip install -U bitsandbytes. If PyTorch can't see your card afterwards, our guide to fixing "CUDA not available" in PyTorch covers the usual causes.
Step 2: Start the web UI
With the virtual environment active, run python app.py from the fluxgym folder, then open the local address the terminal prints in your browser. The Docker version is at http://localhost:7860.
Step 3: Name the LoRA and pick a VRAM preset
First, set up the job:
The name of your LoRA, which also names its output folder.
Trigger word/sentence, a made-up word you'll type later to call up your subject. FluxGym's own example is "hrld person". Pick something that isn't an ordinary word.
Base model. The list includes flux-dev, flux-schnell and the community flux-dev2pro. The developer says schnell didn't give high-quality results, so stick with flux-dev or flux-dev2pro. You can add other models by editing models.yaml.
VRAM: 20G (the default), 16G or 12G.
Pick the VRAM option that matches your card, as each one changes how sd-scripts trains. FluxGym's source code shows that:
Preset | What FluxGym changes |
|---|
20G | AdamW 8-bit optimiser |
16G | Adafactor optimiser with a constant-with-warmup learning-rate schedule |
12G | Adafactor as above, plus split mode and training only the model's single blocks |
The 12G preset saves the most memory by training less of the model. That's a sensible trade on a 12GB card, but if you have 16GB, use the 16G preset.
Step 4: Set repeats, epochs and resolution
Repeat trains per image defaults to 10.
Max Train Epochs defaults to 16.
Expected training steps fills itself in: epochs × number of images × repeats. Twenty images at the defaults works out at 3,200 steps.
Resize dataset images defaults to 512. Higher values capture more detail but use more memory and take longer.
Step 5: Upload and caption your images
Drag your photos into the upload box. Each image gets a caption box that starts out holding your trigger word. You then have three options:
Write captions yourself, keeping the trigger word in each one.
Click Add AI captions with Florence-2. FluxGym downloads a copy of Microsoft's Florence-2 model and uses it to describe each picture for you. Our JoyCaption vs Florence-2 comparison explains what it's good at.
Upload ready-made .txt caption files with the same names as your images (img0.png and img0.txt). This works well with tools such as TagGUI.
Read the captions before training. Describe what changes from photo to photo (clothes, background, lighting) and leave out what should stay the same, so the trigger word picks up your subject.
Step 6: Check the advanced settings and sample images
Open the advanced settings to see the defaults FluxGym uses:
--learning_rate 8e-4
--network_dim (the LoRA's rank, which affects file size and capacity) 4, adjustable from 4 to 128 in steps of 4
--save_every_n_epochs 4, so you get a checkpoint every four epochs to compare
--seed 42, --timestep_sampling shift and --guidance_scale 1.0
Underneath are all the other sd-scripts launch flags, read automatically from your copy of sd-scripts.
By default FluxGym doesn't create sample images. To watch the LoRA improve, enter a few Sample Image Prompts (one per line, each with your trigger word) and set Sample Image Every N Steps, for example every 200 steps. Add --d 42 to the end of each prompt to fix the seed, so every sample uses the same starting point and you can compare them fairly. The README also lists --w and --h for size, --s for steps, --l for CFG scale and --n for a negative prompt.
Step 7: Train and use the LoRA
Click Start training and follow progress in the Train log, with samples appearing in the gallery. Results go into outputs/<your LoRA name>/. Each saved epoch is a separate LoRA file, so try a few rather than assuming the last one is best: later epochs can overfit and copy your photos too closely.
Copy the .safetensors file into your image app's LoRA folder and load it with your trigger word. Our guide to using LoRAs in ComfyUI shows how. FluxGym can also publish a LoRA to Hugging Face. Your access token is saved in a local file called HF_TOKEN, so don't share the FluxGym folder.
If you run out of memory
Lower the VRAM preset, drop the resize resolution back to 512 and close other GPU-hungry apps. Our guides to checking VRAM usage in Windows and fixing CUDA out-of-memory errors go further.
Is FluxGym still worth using?
Yes, if FLUX.1 is your target. The repository was last updated on 28 July 2026, with installer fixes such as triton-windows for NVIDIA cards on Windows, but its built-in model list still covers only FLUX.1. For FLUX.2, Qwen-Image, Z-Image or video models, look at Ostris AI Toolkit instead (see our AI Toolkit LoRA guide and our FluxGym vs AI Toolkit comparison). Our roundup of the best LoRA training software covers the other options.