Skip to main content

LoRA Training Guide 🧠

Overview​

This guide will help you understand and use LoRA (Low-Rank Adaptation) training with our models. LoRA allows you to fine-tune models for specific styles or subjects while maintaining efficiency.

Available Models​

Basic Usage​

Here's a simple example of how to train a LoRA model:

from flymyai import client

# Initialize the client
fma_client = client(apikey="your-api-key")

# Set the model
model = "flymyai/flux-lora-trainer"

# Prepare the input data
payload = {
"lora_name": "Hello World",
"trigger_word": "Hello World",
"dataset_url": "https://example.com/dataset.zip",
"training_steps": 1000,
"huggingface_model_name": "black-forest-labs/FLUX.1-dev"
}

# Make the prediction
response = fma_client.predict(
model=model,
payload=payload
)

# Get the trained model and config
trained_model = response.output_data["model"]
config = response.output_data["config"]

Parameters​

  • lora_name: Name for your LoRA model
  • trigger_word: Word to activate the LoRA model
  • dataset_url: URL to your training dataset
  • training_steps: Number of training steps
  • huggingface_model_name: Base model to use for training

Best Practices​

  1. Use high-quality training images
  2. Choose appropriate training steps
  3. Use meaningful trigger words
  4. Organize your dataset properly
  5. Test the model after training