Diffusion model training code
Top 49.6% on sourcepulse
This repository provides code for training custom Stable Diffusion models on user-provided datasets. It is targeted at researchers and developers needing to fine-tune or retrain diffusion models for specific applications, offering a framework for efficient, large-scale training.
How It Works
The project leverages the MosaicML Composer library for distributed training, enabling efficient scaling across multiple GPUs. It supports training Stable Diffusion v1 and v2, as well as SDXL models, with configurations for different resolutions (256x256, 512x512, 1024x1024) and aspect ratio bucketing. The framework allows for pre-computation of VAE and CLIP latents to optimize training throughput.
Quick Start & Requirements
pip install -e .
after cloning the repository.mosaicml/pytorch:2.1.2_cu121-python3.10-ubuntu20.04
).SD-2-base-256.yaml
) to specify dataset paths and training parameters.composer run.py --config-path yamls/hydra-yamls --config-name <config_name>.yaml
.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The README does not specify a license, which may impact commercial adoption. The provided cost and time estimates are based on specific hardware (A100 GPUs) and may vary significantly on different configurations.
6 months ago
1 week