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​
- flux-lora-trainer - Train custom LoRA 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 modeltrigger_word
: Word to activate the LoRA modeldataset_url
: URL to your training datasettraining_steps
: Number of training stepshuggingface_model_name
: Base model to use for training
Best Practices​
- Use high-quality training images
- Choose appropriate training steps
- Use meaningful trigger words
- Organize your dataset properly
- Test the model after training