# Train a FLUX LoRA on Your Own GPU with FluxGym

> Published 2026-09-04 · https://www.promptzone.com/sofia_tahir/train-a-flux-lora-on-your-own-gpu-with-fluxgym-19mi

Training a [LoRA](/tara_suzuki/best-flux-loras-in-2026-for-realism-and-how-to-stack-them-1mck) used to mean renting a cloud GPU and reading a shell script you did not write. For FLUX it no longer has to. By the end of this you should be able to assemble a dataset, caption it, run a local training job through FluxGym, and read the results well enough to know whether to retrain or ship.

This is about the decisions, not the install. The install is a README; the reason most first LoRAs are bad is the dataset and the captions.

## What a LoRA is, in one paragraph

A LoRA is a low-rank adapter. Instead of updating the billions of weights in the base model, you train a small pair of matrices that sit alongside selected layers and nudge their output. The base model stays frozen, the trained file is small enough to share, and you can load several at once at different strengths. For FLUX the adapter normally targets the transformer blocks; the text encoders are left alone.

That is why local training is realistic at all: you are optimising a few million parameters, not a few billion.

![Contact sheet of many small portrait photographs laid out in a grid](https://cdn.stocksnap.io/img-thumbs/960w/FSVA6VJ2XI.jpg)

## Where FluxGym fits

[FluxGym](https://github.com/cocktailpeanut/fluxgym) is a Gradio front end that wraps Kohya's sd-scripts, the training backend a large share of the community already uses. You get a browser form for dataset upload, captioning, trigger word and the handful of hyperparameters that matter, and the proven trainer does the work underneath. The project ships VRAM presets aimed at consumer cards, advertising configurations down to 12 GB.

The practical consequence is that you are not choosing between an easy tool and a good one. You are getting a form in front of the same trainer the command-line users run.

One thing to settle before you invest GPU hours: licensing. FLUX.1 [dev] is released under a non-commercial licence, while FLUX.1 [schnell] is Apache 2.0. Adapters you train inherit the constraints of the base they are trained against, so decide which base you need before, not after.

## The dataset decides the outcome

1. **Collect deliberately.** For a person or a character, a couple of dozen images is a reasonable target; for a style, plan on more, because a style has to survive across subjects it has never seen.
2. **Vary everything except the concept.** Different angles, lighting, distances, backgrounds and clothing. Whatever stays constant across the whole set becomes part of what the model learns. Twenty photos taken in one session teach the model that room.
3. **Cut the near-duplicates.** Ten frames from one burst count as one image and quietly triple that pose's weight.
4. **Fix resolution and crops first.** Train at a resolution your card can hold. Crop so the concept is genuinely present in every frame rather than a detail in the corner.
5. **Reject the bad ones.** Blurry, heavily compressed, watermarked and filtered images all teach exactly what they show. A set of fifteen clean images beats forty mixed ones.

## Captioning: describe what varies

FluxGym can auto-caption a folder for you, which is a fine starting point and a poor finishing point. The rule that matters is counterintuitive: **caption what you want to be able to change, not what you want the model to learn.**

If every caption says *a photograph of sks_person wearing a red jacket*, the red jacket becomes controllable. If you never mention the jacket, and it appears in most images, it fuses into the concept and shows up whether you ask or not.

Pick a trigger word that does not already mean something to the model. An invented token works; a common word will collide with everything the base model already associates with it.

![Close-up of a graphics card with its cooling fans and heatsink visible](https://images.rawpixel.com/editor_1024/cHJpdmF0ZS9sci9pbWFnZXMvd2Vic2l0ZS8yMDIyLTA2L3Vwd2s2MjMzOTUxMy13aWtpbWVkaWEtaW1hZ2Uta293bWlwcTMuanBn.jpg)

## Settings worth understanding

| Setting | What it controls | How to think about it |
| --- | --- | --- |
| Rank (dim) | Adapter capacity | Low ranks for a face or a simple style; raise it only when the result is clearly underfitting |
| Alpha | Effective scaling of the adapter | Usually tied to rank; leave the default until you have a reason |
| Learning rate | Step size | The single biggest cause of fried LoRAs. Halve it before you raise it |
| Repeats and epochs | Total training steps | More images means fewer repeats each for the same total exposure |
| Resolution | Training image size | Higher captures fine detail and costs VRAM and time |
| Save every N epochs | Checkpoint frequency | Save often. The best checkpoint is frequently not the last one |

That last row is the one people skip and regret. Saving intermediate checkpoints turns a failed run into a set of candidates.

## Reading the failure

**Overfitting** looks like the training set leaking out: the same background, the same pose, the same crop, regardless of prompt. Flexibility drops — the concept refuses to move to a new setting. Fix it with an earlier checkpoint, a lower learning rate, or a more varied dataset.

**Underfitting** looks like the concept only half arriving. The face is nearly right, the style is a suggestion. Fix it with more steps or a higher rank, in that order.

**Contamination** is the subtler one: something you never intended is welded on. A colour cast, a watermark, a logo, a background. This is always a dataset or caption problem, never a hyperparameter problem.

![Black and white portrait of a gorilla lit with strong directional light](https://cdn.stocksnap.io/img-thumbs/960w/SPQ6DQLFLF.jpg)

## Testing the result properly

Use a fixed control prompt that has nothing to do with your training images, generate it at several adapter weights, and compare. A LoRA that only looks right at full strength is usually overfitted; a good one degrades gracefully and still contributes something around half weight.

A detailed portrait prompt makes a good control because it stresses lighting, texture and expression at once. This one is written for FLUX, which handles comma-separated descriptive clauses well:

```plaintext
A gorilla wearing a black suit and tie, with sunglasses, serious expression,
professional black-and-white portrait, dramatic lighting, high contrast,
cinematic photography, ultra-detailed, sharp focus
```

Run it with the adapter off, then at increasing weights, keeping the seed fixed. What changes tells you what the LoRA actually learned, which is often not what you thought you were teaching it.

## Takeaway

Spend your effort in this order: dataset, captions, learning rate, everything else. Vary every attribute you do not want baked in, caption every attribute you want to keep controllable, pick a trigger word the model has no prior opinion about, and save checkpoints often so a long run yields several candidates instead of one verdict. Test with a fixed seed and a control prompt across a range of weights. FluxGym removes the friction of running the trainer; it cannot remove the need to curate thirty good images, and that is still where the quality comes from.

## Related reading

- [AI Background Removal: How Matting Models Work and Fail](/hyun_arellano/ai-background-removal-how-matting-models-work-and-fail-o85)
- [Steampunk Prompt Tokens for Stable Diffusion and FLUX](/kabir_kovac/steampunk-prompt-tokens-for-stable-diffusion-and-flux-16i6)
- [Photorealistic Portraits with Stable Diffusion XL](/shreya_alvarez/photorealistic-portraits-with-stable-diffusion-xl-5blg)
