Introduction

Black Forest Labs just handed us the official recipe for local LoRA training on its open image model. "Train your first LoRA on FLUX 3 Image Klein" is a new tutorial on docs.bfl.ai, shared by @bfl_ai at 22:27 UTC on October 29. It walks through a full style LoRA for FLUX 3 Image Klein (text-to-image, open weights) trained with ostris' AI Toolkit on your own 24 GB GPU. The example teaches Klein to draw like an early-1900s Halloween postcard, and everything you need ships with it: a captioned dataset, two configs, a card-making script, two finished checkpoints, and a free Hugging Face Space.

If you caught our piece on fal's hosted Klein LoRA trainer, think of this as the other side of the coin. fal is the one-click cloud route. BFL's guide is the open, explain-every-knob route for people who want to train at home and understand why each setting matters.

What You Need

  • GPU: at least 24 GB of VRAM.
  • Trainer: AI Toolkit by ostris. The companion repo pins the commit it was tested on.
  • Model access: FLUX 3 Image Klein Base on Hugging Face, then hf auth login.
  • A dataset: the guide's own set has 65 public-domain Halloween postcards with captions and a metadata.csv of sources and licenses.

git clone https://github.com/ostris/ai-toolkit.git
cd ai-toolkit
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
hf auth login

BFL's page also pins a specific PyTorch build for CUDA 13.0. Grab that line from the guide if your drivers match.

The Settings That Matter

BFL keeps most AI Toolkit defaults and only explains the knobs worth changing:

  • Rank 32. The LoRA lands at about 161 MB and around 80 million weights, tiny next to Klein's 5.6 billion parameters and 11.1 GB base. BFL's metaphor: Klein is the textbook, and your LoRA is the sticky notes.
  • Learning rate 1e-4. For the schedule, the favorites were cosine and constant_with_warmup (200 warmup steps).
  • timestep_type: shift. This is the big one. AI Toolkit's default sigmoid mostly trains on medium noise, but Klein's sampler spends about half its steps at very high noise, and shift trains there just as often. In BFL's test, the witch prompt already looked like a printed card by step 300. If your samples barely move after a few hundred steps, check this setting first.
  • 4,000 steps, saving every 100. BFL's favorite checkpoints sat at step 2,000. By 4,000 one run began copying specific training cards, a classic overfitting sign.
  • Memory savers: AdamW, batch size 1, 1024 px, bf16, gradient checkpointing, and latents cached to disk.

Here are the core lines from BFL's config:

network:
  type: lora
  linear: 32
  linear_alpha: 32
train:
  batch_size: 1
  steps: 4000
  lr: 1e-4
  optimizer: adamw
  lr_scheduler: cosine
  noise_scheduler: flowmatch
  gradient_checkpointing: true
  dtype: bf16
  timestep_type: shift
model:
  name_or_path: black-forest-labs/flux-3-image-klein-base
  arch: flux3

Then run it from the AI Toolkit folder:

python run.py /path/to/halloween-lora.yaml

BFL suggests a 50-step smoke test first (steps: 50, save_every: 25, sample_every: 25). It should take about 15 to 20 minutes.

Captions and the Trigger Word

This is where the guide earns its keep:

  • Describe what's in the picture, never the style. Name the people, objects, actions, and where they sit in the frame. Whatever the caption doesn't name gets tied to the trigger word, and that's how the trigger learns the look.
  • Use a meaningless trigger. BFL first tried pdhalloween. Klein read "halloween" inside it and added a Halloween badge to a Christmas card before any training. By step 4,000 it was printing the word as a heading. A short gibberish token like vqx avoids that.
  • Test your trigger before training. Prompt the base model with it. If the picture changes, pick another word.
  • Include printed text. If a card has words on it, put them in the caption.

Here's one of the guide's real captions:

vqx three pumpkin-like figures on a squash, small black cat beside a pumpkin in the bottom left corner, a girl on the right side blowing a streamer with "A Merry Halloween" in the top left with a starry sky

Test Prompts to Steal

Use your preview prompts as a test set: one control without the trigger, scenes close to your data, a subject your data never shows, and a leak check. These come straight from BFL's config, and all use seed 42 except the last, which uses seed 123:

a black cat sitting beside a glowing jack-o-lantern under a full moon

vqx, a witch riding a broom above a small village under a crescent moon

vqx, a small friendly robot trick-or-treating with a pumpkin candy bucket

vqx, an illustrated postcard of a family sitting beside a Christmas tree opening presents

Skip Training Entirely

  • Checkpoints: both step-2,000 LoRAs (cosine and warmup, about 161 MB each) are in the checkpoints-2000 release and on Hugging Face.
  • Browser: the Halloween card Space runs free on ZeroGPU.
  • Script: make_card.py sends your subject through Klein's prompt upsampler, then adds vqx, to the front. The upsampler has never seen your trigger, so add it after upsampling, not before.
  • Bonus dataset: the repo also includes 156 public-domain ukiyo-e prints with captions for your next style LoRA.

Licensing Note

The code and configs are MIT. FLUX 3 Image Klein, and any LoRA you train on it, fall under the FLUX Kommunity License, so read it before you share or sell your LoRA. The training images each keep their own licenses, listed in metadata.csv.

Original Source

Conclusion

The best part of this guide isn't the Halloween cards. It's the reasoning: why a trigger word should mean nothing, why captions leave out the style, and why shift beats the default for Klein. Swap in a small, clean set of images you love, keep the step-2,000 habit, and compare checkpoints with a fixed seed. Your first Klein LoRA is one evening away.

Try this on Gen → https://artrealmai.com/gen?utm_source=magazine&utm_campaign=gen&utm_content=bfl-flux-3-klein-lora-guide-ai-toolkit-style-lora

—Aurelia ♡