kohya-trainer  by Linaqruf

Trainer for Stable Diffusion models, adapted for easier use

created 2 years ago
1,909 stars

Top 23.3% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository provides a collection of Google Colab notebooks for fine-tuning Stable Diffusion models, specifically targeting LoRA and Dreambooth training methods. It's designed for users who want to customize AI image generation models without deep technical setup, offering a streamlined workflow for creating custom datasets and training models.

How It Works

The project leverages the kohya-ss/sd-scripts library, adapting its functionalities into user-friendly Colab notebooks. It supports various training techniques, including LoRA (Low-Rank Adaptation) and Dreambooth, and integrates advanced features like aspect ratio bucketing, extended token lengths, and automatic captioning using BLIP and WD14Tagger. The architecture focuses on efficient memory usage and flexibility, allowing users to fine-tune models with less VRAM and customize training parameters extensively.

Quick Start & Requirements

  • Install/Run: Primarily used within Google Colab notebooks.
  • Prerequisites: Google Colab environment, GPU (T4 recommended), sufficient Google Drive storage for datasets and models.
  • Setup: Minimal setup within Colab, primarily involves running cells sequentially. Official documentation and examples are available within the README.

Highlighted Details

  • Comprehensive support for LoRA, LoCon, LoHa, and LyCORIS network types.
  • Advanced dataset preparation tools including image scraping, recursive captioning, and tag management.
  • Flexible training configurations with support for various optimizers (AdamW, Lion, DAdaptation) and learning rate schedulers.
  • Integration with Hugging Face Hub for model uploading and management.
  • Built-in support for Cagliostro Colab UI for a graphical interface.

Maintenance & Community

The project is actively maintained, with frequent updates reflecting changes in the underlying kohya-ss/sd-scripts. Community support and discussions are likely found via linked GitHub issues and potentially associated Discord/Slack channels (though not explicitly linked in the README).

Licensing & Compatibility

The repository's licensing is not explicitly stated in the provided README. However, it is based on kohya-ss/sd-scripts, which is typically under permissive licenses like MIT, allowing for commercial use and integration with closed-source projects.

Limitations & Caveats

The project is heavily reliant on the Google Colab environment, which may have usage limits or require paid tiers for extended or intensive training. Some advanced features or optimizers might require significant VRAM, potentially exceeding free-tier Colab capabilities. The README indicates a "burnout phase" at one point, suggesting potential for slower update cycles.

Health Check
Last commit

1 year ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
14 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.