kohya-trainer  by Linaqruf

Trainer for Stable Diffusion models, adapted for easier use

Created 2 years ago
1,913 stars

Top 22.8% 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

Inactive

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

Explore Similar Projects

Starred by Patrick von Platen Patrick von Platen(Author of Hugging Face Diffusers; Research Engineer at Mistral), Hanlin Tang Hanlin Tang(CTO Neural Networks at Databricks; Cofounder of MosaicML), and
1 more.

diffusion by mosaicml

0%
707
Diffusion model training code
Created 2 years ago
Updated 8 months ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
5 more.

ai-toolkit by ostris

0.9%
6k
Training toolkit for finetuning diffusion models
Created 2 years ago
Updated 12 hours ago
Feedback? Help us improve.