Skip to content

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

  1. Replicate Account (with credit card added).
  2. 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 .zip file containing your dataset.
  • trigger_word: TOK (This is the standard token used by most trainers).
  • steps: 1000 to 1500 (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:

REPLICATE_MODEL_VERSION=your-username/sienna-fox:version-hash

Now, every image prompt generated by the bot will include the trigger word TOK and use your custom face.