FLUX.3 Image LoRA trainer
Train a FLUX.3 Image Klein Base LoRA with SimpleTuner on Replicate’s 48 GB L40S.
Prepare your images
Choose one input:
- Upload an archive: put your images and matching
.txtcaptions in a ZIP or tar file. For example,photo01.jpgandphoto01.txt. Include the concept’s trigger in each caption. - Use a Hugging Face dataset: enter its repository in
hf_dataset. Select its caption column withhf_caption_column, or enter a shared caption inhf_instance_promptto use that caption for every image. Private datasets requirehf_token.
For quality-focused training, choose resolution="1024" and use sharp source images with enough detail at that scale. Images retain their aspect ratios; 1024 is an area-based scale rather than a fixed width and height. Avoid enlarging small images just to meet that size.
Set validation_prompt to a prompt containing your trigger. Training produces preview images at each checkpoint so you can compare how the concept develops.
Start training
The defaults load SimpleTuner’s flux3_image-48g.peft-lora preset: rank-32 BF16 LoRA, REPA, gradient checkpointing, 4,000 optimizer updates, and both 512- and 1024-pixel training scales. Images retain their aspect ratios. The default batch size is 9 at 512 and 2 at 1024. Leave train_batch_size blank to keep those settings.
Synthetic regularisation uses half of training updates to help preserve unrelated concepts. Disable use_synthetic_regularisation to use only your images. You can select a single resolution, change the number of updates, and adjust checkpoint frequency in the form.
The trainer checks uploaded and remote images with three NSFW classifiers and requires two votes to reject an image. This check is always enabled.
Training time and cost
A 4,000-step Domokun run with 29 training images took about 5 hours on one 48 GB L40S, with an estimated compute cost of roughly $18 at Replicate’s listed L40S rate of $3.51 per hour.
That run used mixed 512- and 1024-pixel training scales, batch sizes of 9 at 512 and 2 at 1024, rank-32 LoRA, REPA, synthetic regularisation for half of the updates, and checkpoints with preview images every 250 steps. The time includes dataset preparation, caching, training, and previews. Use it as a budgeting reference: dataset size, resolution, settings, and checkpoint frequency affect runtime and cost. A run using only 1024-pixel training has a different workload.
Download or publish your LoRA
The result is a ZIP containing your LoRA, retained checkpoints, and validation images. The ZIP is returned even when publishing is disabled.
To publish to Hugging Face, supply hub_model_id and an hf_token with write access. To publish checkpoints to S3-compatible storage, supply s3_bucket and the relevant endpoint and credential fields. Credentials use Replicate’s secret inputs.
Generate images with your LoRA
Inference model: replicate/flux-3-klein-image-lora.
Download and extract the training result ZIP. The final adapter is the root-level pytorch_lora_weights.safetensors; the checkpoint folders contain earlier versions you can compare using their preview images.
Keep your training trigger in generation prompts. Start with the trigger, then describe the scene, lighting, and composition. For example: 🟫. A photo taken in a sunny garden. If prompt upsampling changes or removes your trigger, turn off upsample_prompt and write the full scene description yourself. To start with the base model used for training, set distilled=false, leave num_inference_steps=0 for 50 steps, and use guidance=3.5.
Domokun example
Use these form values with the remaining defaults:
{
"hf_dataset": "RareConcepts/Domokun",
"hf_revision": "2e4831a72f2a701c080e0046c8f8ec41cb1ccbcf",
"hf_instance_prompt": "🟫",
"validation_prompt": "🟫. A photo taken in a sunny garden."
}