SimpleTuner  by bghira

Fine-tuning kit for diffusion models

created 2 years ago
2,476 stars

Top 19.2% on sourcepulse

GitHubView on GitHub
Project Summary

SimpleTuner is a versatile, academic-focused fine-tuning toolkit for diffusion models, designed for simplicity and ease of understanding. It supports a wide array of diffusion models, including Stable Diffusion variants, PixArt, HiDream, and video models like Wan 2.1 and LTX, catering to researchers and power users needing flexible training capabilities.

How It Works

SimpleTuner prioritizes simplicity with sensible defaults and incorporates only proven, cutting-edge features. It employs aspect bucketing for varied data sizes and includes advanced techniques like quantised LoRA/LyCORIS training (NF4/INT8/FP8), EMA weights for stability, and DeepSpeed integration for memory efficiency, enabling full U-Net training on as little as 12GB VRAM.

Quick Start & Requirements

  • Install: pip install . (from cloned repo)
  • Prerequisites: Python 3.10+, PyTorch, Hugging Face libraries. NVIDIA GPUs recommended; AMD and Apple Silicon (M-series) are supported with caveats. CUDA 11.8+ or ROCm 5.6+ for AMD.
  • Resources: Training SDXL on 12GB VRAM is possible with DeepSpeed but slow. 16GB+ VRAM is recommended for most models, with 24GB+ ideal for higher resolutions and full U-Net training.
  • Docs: Tutorial, Quick Start, DeepSpeed, Toolkit

Highlighted Details

  • Supports LoRA/LyCORIS, full U-Net, and ControlNet training for various models.
  • Features like masked loss, MoE, and prior regularization enhance training quality.
  • Direct S3-compatible storage integration (Cloudflare R2, Wasabi) for scalable data handling.
  • Webhook support for training progress notifications (e.g., Discord).

Maintenance & Community

  • Community support via Discord (Terminus Research Group).
  • Contributions are welcome.

Licensing & Compatibility

  • License: MIT.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

  • Scripts have the potential to damage training data; backups are essential.
  • Some models have limited support (e.g., text encoder or ControlNet training not supported for Wan Video, PixArt Sigma, NVLabs Sana).
  • Apple Silicon (MPS) support may encounter random bugs.
Health Check
Last commit

3 days ago

Responsiveness

1 day

Pull Requests (30d)
125
Issues (30d)
18
Star History
226 stars in the last 90 days

Explore Similar Projects

Starred by Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera) and Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake).

InternEvo by InternLM

1.0%
402
Lightweight training framework for model pre-training
created 1 year ago
updated 1 week ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Georgios Konstantopoulos Georgios Konstantopoulos(CTO, General Partner at Paradigm), and
2 more.

mflux by filipstrand

0.7%
2k
MLX port of FLUX for local image generation on Macs
created 11 months ago
updated 14 hours ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Jiayi Pan Jiayi Pan(Author of SWE-Gym; AI Researcher at UC Berkeley), and
5 more.

Liger-Kernel by linkedin

0.6%
5k
Triton kernels for efficient LLM training
created 1 year ago
updated 1 day ago
Starred by Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), Michael Han Michael Han(Cofounder of Unsloth), and
1 more.

ktransformers by kvcache-ai

0.4%
15k
Framework for LLM inference optimization experimentation
created 1 year ago
updated 2 days ago
Starred by George Hotz George Hotz(Author of tinygrad; Founder of the tiny corp, comma.ai), Anton Bukov Anton Bukov(Cofounder of 1inch Network), and
16 more.

tinygrad by tinygrad

0.1%
30k
Minimalist deep learning framework for education and exploration
created 4 years ago
updated 18 hours ago
Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake), and
12 more.

DeepSpeed by deepspeedai

0.2%
40k
Deep learning optimization library for distributed training and inference
created 5 years ago
updated 1 day ago
Feedback? Help us improve.