Skip to content

Repository files navigation

LoRA Studio Icon

LoRA Studio

Open-source LoRA training pipeline — Dataset ingestion, captioning & fine-tuning

Windows Linux macOS Python Next.js FastAPI

EN | ES


LoRA Studio is a fully integrated, zero-to-hero pipeline designed to simplify the creation of LoRA (Low-Rank Adaptation) models for Stable Diffusion. It provides a sleek, modern UI to manage the entire workflow: from scraping images off the web, to automatic intelligent captioning, to running the Kohya-ss training engine, and finally evaluating your generated models.

✨ Features

  • 🔍 Automated Data Ingestion: Scrape images from the web (Bing) automatically. Includes built-in AI face detection (MTCNN) to filter out bad images, ensuring high-quality datasets for character training.
  • 📝 Smart Auto-Captioning: Uses Microsoft's Florence-2 Vision-Language Model to automatically generate highly detailed and accurate text captions for your dataset.
  • 🏋️‍♂️ One-Click Training: Seamlessly integrated with the industry-standard Kohya sd-scripts. Configure learning rates, optimizers (AdamW, AdamW8bit, Lion, Prodigy), and network dimensions through a beautiful UI.
  • 🖼️ Native Evaluation: Test your trained LoRAs immediately without leaving the app. Built-in Diffusers inference engine to generate sample grids and evaluate the quality of your model against the base model.
  • 🗂️ Storage Management: Easily manage your raw datasets, trained LoRA files, and evaluation images with an intuitive built-in file explorer.
  • 🌍 Bilingual UI: Fully localized in English and Spanish.

📸 Walkthrough & Screenshots

1. Ingestion

Quickly build a dataset by downloading and cropping images automatically. Ingestion Demo

2. Captioning

Let Florence-2 describe your images in rich detail for optimal training. Captioning Demo

3. Training

Configure and monitor the Kohya engine right from the dashboard. Training Demo

4. Evaluation

Generate test prompts and compare your LoRA results instantly. Evaluation Demo

5. Storage Management

Easily manage your raw datasets, trained LoRA files, and evaluation images with an intuitive built-in file explorer. Storage Management Demo


🚀 Quick Start (One-Click Install)

We have designed LoRA Studio to be as painless to install as possible. The installer will automatically verify your Python and Node.js versions, create an isolated virtual environment, install PyTorch (with CUDA support if available), download all dependencies, and fetch a base Stable Diffusion model.

Prerequisites

  • Python 3.10+ (Added to PATH)
  • Node.js 18+ (Added to PATH)

Hardware Requirements

To run the full pipeline locally without Out-Of-Memory (OOM) errors, we recommend:

  • Minimum: NVIDIA GPU with 6GB VRAM (Fully capable of SD 1.5 training and Florence-2 captioning).
  • Recommended: NVIDIA GPU with 8GB+ VRAM (Provides faster training times and more memory headroom).
  • SDXL Training: NVIDIA GPU with 12GB+ VRAM.
  • RAM: 16GB+ System RAM.

Windows

  1. Clone or download this repository.
  2. Double-click install.bat. Wait for the process to finish (10-20 minutes depending on your internet connection).
  3. Once installed, double-click start.bat.
  4. Your browser will open automatically at http://localhost:7800.

Linux / macOS

  1. Clone or download this repository.
  2. Open a terminal and grant execution permissions:
    chmod +x install.sh start.sh
  3. Run the installer:
    ./install.sh
  4. Start the application:
    ./start.sh

Note: To stop the servers, simply close the terminal windows (Windows) or press Ctrl+C (Linux/macOS).


🛠️ Tech Stack & Architecture

LoRA Studio is split into two main components:

  • Frontend (/frontend): A modern, responsive dashboard built with Next.js, React, and Tailwind CSS. It uses Context API for state management and localization.
  • Backend (/api): A robust API built with FastAPI. It handles all the heavy lifting:
    • Image scraping and MTCNN face cropping (api/core/image_scraper.py)
    • Florence-2 model loading and caption generation (api/core/captioning.py)
    • Subprocess management for Kohya sd-scripts (api/core/trainer.py)
    • PyTorch/Diffusers inference for evaluation (api/core/inference.py)

📁 Directory Structure

AutoLoRA-Pipeline/
├── api/                    # FastAPI Backend
│   ├── core/               # Business logic (captioning, training, inference)
│   └── routes/             # API Endpoints
├── frontend/               # Next.js UI
│   ├── src/app/            # App Router pages
│   └── src/components/     # Reusable React components
├── data/                   # (Created automatically)
│   ├── raw/                # Scraped image datasets
│   └── eval/               # Generated evaluation images
├── models/                 # (Created automatically)
│   ├── base/               # Base SD models (e.g., Realistic Vision)
│   ├── output/             # Your trained LoRA .safetensors files
│   └── florence2/          # Downloaded Florence-2 cache
├── install.bat / .sh       # Automated environment setup scripts
└── start.bat / .sh         # Automated server launcher scripts

🤝 Contributing

Contributions are welcome! Feel free to open issues or submit Pull Requests for new features, bug fixes, or translations.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

⚠️ Disclaimer

Legal & Copyright Notice: The software and code in this repository are provided under the MIT License. However, the automated ingestion tools, the scraped data, and the resulting AI-generated models/images are entirely the responsibility of the user.

  • Web Scraping: The automated ingestion pipeline retrieves publicly available images from the web. Users are solely responsible for ensuring that their use of downloaded web data complies with local copyright laws, especially if the resulting datasets or models are used commercially.
  • AI-Generated Content: Any evaluation images, screenshots, or sample grids featuring public figures in this documentation are entirely synthetic. They are generated by AI strictly for technical demonstration purposes and do not represent real photographs nor imply any affiliation. Users must be aware of Right of Publicity laws if planning to commercially distribute models trained on specific individuals.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages