Pixyz is an open-source deep generative modeling library based on PyTorch, hosted on GitHub with about 510 stars under the MIT license and updates in 2025. Its goal is to make building deep generative models more concise, intuitive, and extendable than wiring them up from raw PyTorch modules.
Deep generative models such as variational autoencoders, generative adversarial networks, and normalizing flows are usually assembled from probability distributions and loss functions, but in code that structure often gets buried. Pixyz lets you define a model by composing distributions and objectives in a way that mirrors the underlying mathematics, so a paper’s formulation translates into code more directly. The library is documented at docs.pixyz.io, ships examples in the repository, and has a companion Pixyzoo repository with ready-made model implementations. It is available on PyPI and as a Docker image.
The library’s vision is that implementing a model should feel like writing the formulas in the paper: distributions and losses are declared in a notation close to the mathematics, which bridges the gap between formulation and code. Explicit likelihood-based models such as variational autoencoders and flow-based models, and implicit models such as GANs, can all be built in the same framework, and even combined with each other in a single model.
Pixyz is free and open source under the MIT license. There are no paid tiers or hosted services; you install the library and run it in your own PyTorch environment.
It suits machine learning researchers and practitioners who prototype deep generative models and want a cleaner abstraction than hand-assembling distributions and losses, especially when translating formulations from research papers into working code.