Train Custom LoRAs on Flux Models with FluxGym on RunPod
Workflow

Train Custom LoRAs on Flux Models with FluxGym on RunPod

Sep 27, 2024 · The Local Lab

Flux models (Schnell and Dev) changed the game for AI image generation when they dropped — producing images with a level of realism and prompt adherence that set a new bar. But what if you want to go further and teach Flux your own style, your own subject, or your own character? That's where LoRA training comes in.

In this guide we're using FluxGym — a streamlined training UI built on the Cocktail Peanut repository — running on RunPod cloud GPUs. The result: custom LoRA training for under $0.50 a run, no beefy local GPU required.

What Is a LoRA?

LoRA stands for Low-Rank Adaptation. Think of it as a small add-on file that plugs into a base model and shifts its outputs in a specific direction — without retraining the entire model. You can train a LoRA to:

LoRA files are small (usually 50–200MB), easy to share, and plug directly into ComfyUI or any other Flux-compatible frontend. Once trained, you just drop the file into your models folder and reference it in your workflow.

Why FluxGym on RunPod?

Training locally requires a high-end GPU — ideally an RTX 4090 or better. Most people don't have one sitting around. RunPod solves this by giving you on-demand access to cloud GPUs by the hour. FluxGym is a pre-configured RunPod template that handles all the environment setup automatically, so you go from zero to training in minutes rather than hours of environment troubleshooting.

Cost breakdown: A typical LoRA training run on RunPod using an A40 or similar GPU takes 10–20 minutes and costs under $0.50 at current rates. You only pay while the pod is running — spin it up, train, download your LoRA, shut it down.

What You'll Need

Preparing Your Training Images

Image quality matters more than quantity for LoRA training. A focused set of 15–20 well-captioned images will outperform 100 poorly curated ones. Here's what to aim for:

Tip: Include a unique trigger word in your captions (e.g. sks person or a made-up word like zxqstyle). This gives you a reliable way to activate the LoRA in prompts without it bleeding into everything you generate.

Step-by-Step: Training with FluxGym on RunPod

1
Deploy the FluxGym template on RunPod

Log into RunPod, go to Explore Templates, and search for FluxGym — or use the direct template link below. Select it and choose a GPU — an A40 (48GB VRAM) is a reliable option. Click Deploy and wait ~2 minutes for the pod to spin up.

2
Open the FluxGym UI

Once the pod is running, click Connect → HTTP Service to open the FluxGym web interface in your browser. You'll see a clean UI with tabs for training configuration, image upload, and captions.

3
Upload your training images

Drag and drop your prepared images into the upload area. FluxGym will display them in a grid. You can click individual images to review or remove them before training begins.

4
Auto-caption with Florence 2

Click Caption Images to run Florence 2 over your dataset. It generates a text description for each image automatically. Review them — you'll want to add your trigger word to each caption if it's not already there.

5
Configure training settings

For most use cases, the defaults are solid. Key settings to pay attention to: Steps (1000–1500 is a good starting range), Learning Rate (leave at default unless you know what you're doing), and Base Model (choose Flux Schnell for speed, Flux Dev for quality).

6
Start training and monitor progress

Hit Start Training. FluxGym shows a live progress bar and sample images at checkpoints so you can see how the LoRA is developing. A full run typically completes in 10–20 minutes on an A40.

7
Download your LoRA and terminate the pod

Once complete, download the .safetensors LoRA file from the output directory. Then terminate the pod immediately — you stop paying the moment it's terminated. Drop the file into your ComfyUI models/loras folder and load it in your workflow.

Testing Your LoRA in ComfyUI

Load Flux Dev or Schnell in ComfyUI, add a LoRA loader node pointing to your new file, set the strength to around 0.8–1.0, and include your trigger word in the prompt. Start with a simple prompt that describes your subject plus the trigger word — you want to isolate whether the LoRA is firing correctly before adding complexity.

If the outputs look too "burnt in" (the LoRA is overpowering the base model), lower the strength. If the style or subject isn't showing up clearly, increase it or consider retraining with more steps.

What's Changed Since This Guide Was Written

The Flux ecosystem has moved quickly. A few updates worth knowing if you're reading this in 2025:

Bottom line: FluxGym on RunPod remains one of the most accessible entry points into LoRA training. If you've never trained a LoRA before, this is the workflow to start with. Watch the video above for the full hands-on walkthrough.

Resources & Downloads

Want to run Flux locally?

Check out our one-click ComfyUI installer — gets you up and running with Flux in under 5 minutes.

Get the Installer ← More Articles