Training a LoRA Model (Visual Identity)
To ensure your virtual influencer maintains a consistent face across thousands of generated images, you must train a LoRA (Low-Rank Adaptation) adapter for the FLUX.1 model.
Why LoRA?
Standard models (DALL-E 3, SDXL) handle "a blonde woman" generically. Every generation produces a different person. A LoRA creates a mathematical fingerprint of your specific character.
Prerequisites
- Replicate Account (with credit card added).
- Dataset: 15-20 high-quality images of your subject (see Synthetic Dataset Guide).
Step-by-Step Training
1. Select the Trainer
We recommend using the Ostris FLUX Dev LoRA Trainer on Replicate.
* Model: ostris/flux-dev-lora-trainer
2. Configure Parameters
- input_images: Upload a
.zipfile containing your dataset. - trigger_word:
TOK(This is the standard token used by most trainers). - steps:
1000to1500(Higher is usually better for likeness). - lora_rank:
16(Standard depth).
3. Launch Training
Click Create Training. It will take about 15-20 minutes and cost ~$2-4.
4. Integration
Once completed, copy your new Model ID (e.g., your-username/sienna-fox:version-hash).
Update your .env file:
Now, every image prompt generated by the bot will include the trigger word TOK and use your custom face.