This is a command-line interface (CLI) tool for creating a Flux LORA (LoRA: Low-Rank Adaptation) using replicate.com. Flux LORA is a technique for fine-tuning a pre-trained model to learn a new concept.
- Python 3.6 or higher
- A replicate.com account and API token
- A GitHub account
- Clone this repository:
git clone https://github.com/your-username/flux-lora-train-cli.git
cd flux-lora-train-cli
- Install the required Python packages:
pip install -r requirements.txt
- Set your replicate.com API token as an environment variable:
export REPLICATE_API_TOKEN=your-api-token
python main.py owner model_name image_path token
owner
: Your GitHub username.model_name
: The name for your LORA model.image_path
: The path to the zip file containing training images.token
: The token for the concept to be learned.
python main.py my-github-username my-lora-model path/to/images.zip my-token
This project is licensed under the MIT License - see the LICENSE file for details.
- replicate.com for providing the infrastructure for training the LORA model.
- flux-dev-lora-trainer for the LORA training util.