Metadata-Version: 2.5
Name: diffusion-model-framework
Version: 1.1.0-rc.2
Project-URL: Documentation, https://www.sachahu.com/docs/diffusion-model-framework/latest/index.html
Project-URL: Repository, https://github.com/sachahu1/Diffusion-Model-Framework
Author-email: Sacha Hu <sachahu@mindsparkai.com>
Requires-Python: <3.13,>=3.10
Requires-Dist: numpy<3,>=2.1.3
Requires-Dist: pillow<12,>=11.0.0
Requires-Dist: tensorboard<3,>=2.18.0
Requires-Dist: torch<3,>=2.5.1
Requires-Dist: torchvision<0.21,>=0.20.1
Requires-Dist: tqdm<5,>=4.66.2
Requires-Dist: transformers<5,>=4.46.1
Description-Content-Type: text/markdown

# Diffusion Model Playground

![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/sachahu1/Diffusion-Model-Framework/run-tests.yaml?branch=main&label=Tests)
![GitHub Release](https://img.shields.io/github/v/release/sachahu1/Diffusion-Model-Framework)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/diffusion-model-framework)
![GitHub Repo stars](https://img.shields.io/github/stars/sachahu1/Diffusion-Model-Framework)

This is a simplified framework to train and run diffusion models.
![](https://github.com/sachahu1/Diffusion-Model-Framework/blob/main/assets/sampling-small.gif?raw=true)

## Getting Started
To get started, simply install the python package from PyPI:
```shell
pip install diffusion-model-framework
```
Then, you're ready to start setting up your own training process. For help 
getting started with that, have a look at some of the [examples](https://github.com/sachahu1/Diffusion-Model-Framework/blob/main/examples).

### Installing the package
Thanks to uv, installing this package is very simple and can be done in a single command. Simply run:
```shell
uv sync
```
That's it, the package is installed. Move to the next section to learn how to use this package.

## Building from source
### Installing uv
This tool uses [uv](https://docs.astral.sh/uv/). If you already have uv installed,
please skip to the next section. Otherwise, run:
```shell
curl -LsSf https://astral.sh/uv/install.sh | sh
```
You can find out more about uv installation [here](https://docs.astral.sh/uv/getting-started/installation/).

That's it, uv is set up.
### Installing and building locally
Installing the package via uv is very simple. Simply run:
```shell
uv sync
```
You can now start using the package to train your diffusion model. For example, try running:
```shell
uv run python3 examples/train_model.py
```

Building a wheel is also possible via:
```shell
uv build
```

## Building the documentation
First you will need to install the dependency group used for documentation.
```shell
uv sync --group documentation
```
Now you can build the documentation using Sphinx by running:
```shell
uv run sphinx-build -M html docs/source/ docs/build
```
