MosaicML Diffusion is an open-source training codebase from MosaicML for building your own Stable Diffusion models on your own data. It is the code behind the well-known Mosaic Diffusion training runs, released so anyone can reproduce and adapt them. The repository has about 722 stars on GitHub and was updated in 2026.
Built on MosaicML’s Composer training library, the project covers the full pipeline for text-to-image model training: preparing streaming datasets from collections such as LAION-5B or COCO Captions, training Stable Diffusion 2.0 at 256 and 512 resolutions, and training SDXL through its staged resolutions up to 1024. Configuration is YAML-driven, with support for precomputed VAE and CLIP latents to cut training cost. The README publishes detailed throughput benchmarks from 8 to 128 A100 GPUs, and an offline evaluation script computes FID, KID and CLIP scores on checkpoints. It is a research-grade toolkit rather than a point-and-click generator.
During training, generated sample images can be logged automatically to Weights and Biases, so teams can watch output quality evolve across checkpoints and catch problems early without bolting on separate evaluation tooling.
MosaicML Diffusion is free and open source under the Apache-2.0 license. The code costs nothing; your expenses are the GPU hours and storage your training runs consume.
It is for ML engineers and research teams who need to train or fine-tune diffusion models on proprietary or domain-specific imagery. If you just want to generate pictures, use an inference tool instead; this repository is for people building the models themselves.