Trainer for generative models, supporting diverse configurations
Top 84.8% on sourcepulse
Naifu is a PyTorch Lightning-based framework for training generative models, primarily diffusion models and large language models. It targets researchers and developers looking for a flexible, configuration-driven approach to fine-tune or train models like Stable Diffusion XL, Stable Cascade, Pixart-Alpha, and various LLMs. The framework aims to simplify complex training setups with a unified interface.
How It Works
Naifu leverages PyTorch Lightning for distributed training and efficient checkpointing. It uses YAML configuration files to define training parameters, model architectures, datasets, and optimization strategies. This approach allows users to easily switch between different model types (e.g., SDXL, LLMs) and training techniques (e.g., LyCORIS, DPO, LCM) without modifying core code.
Quick Start & Requirements
git clone --depth 1 https://github.com/mikubill/naifu
cd naifu && pip install -r requirements.txt
lycoris_lora
, toml
, fairscale
). GPU with CUDA is highly recommended for practical training.python trainer.py --config <config_file>
Highlighted Details
sgm
, sd3
, hydit
).Maintenance & Community
The main
branch is under active development. The repository is maintained by Mikubill. Community links are not explicitly provided in the README.
Licensing & Compatibility
The repository does not explicitly state a license in the README. Users should verify licensing for commercial use or integration into closed-source projects.
Limitations & Caveats
The main
branch is under development and subject to change. Some specialized branches (e.g., sd3
) are noted as experimental or potentially producing undesired results. Specific model training configurations may require careful tuning of parameters like resolution and beta values.
7 months ago
Inactive