Generative Models is Stability AI’s official open-source codebase for its diffusion model family, including SDXL, SDXL-Turbo, Stable Video Diffusion and the SV3D and SV4D multi-view and 4D generation models. It is the successor to the original latent diffusion codebase, rebuilt around a modular, config-driven design, and it provides both inference and training code. The repository has gathered more than 27,000 stars on GitHub and remains a reference implementation for open image and video diffusion research.
The codebase, built around the sgm package, treats a diffusion model as a combination of interchangeable parts: a conditioner, a network, a loss and a sampler, each defined in YAML configuration files and instantiated from config. That design makes it straightforward to reproduce Stability’s released models, swap components, or build new diffusion models on the same scaffolding. The repository ships sampling scripts and demos for text-to-image generation with SDXL and SDXL-Turbo, image-to-video generation with Stable Video Diffusion, and novel-view and 4D synthesis with SV3D and SV4D 2.0, plus training utilities and an invisible-watermark detection tool for generated content.
The codebase is free and open source under the MIT license. Model weights are released separately under their own model licenses (for example CreativeML Open RAIL++-M for SDXL), which allow broad use with conditions; check the license of each checkpoint before commercial use.
This repository is for researchers, developers and creative technologists who want to run, fine-tune or study Stability AI’s open diffusion models locally, and for teams building image or video generation pipelines on open weights rather than hosted APIs.