Running Locally
You can run the notebooks locally on your own machine by following the steps below.
We recommend using uv
for dependencies as it is much faster and automatically manages a .venv
for you.
However, you can also install dependencies with plain pip
if you prefer.
PyTorch (
torch
) is not included in the installation instructions below. PyTorch wheels differ depending on your system and can be very large if installed incorrectly.Please install the version suitable for your setup by following the official PyTorch installation guide.
1. Cloning the repository
Clone the repository to your machine:
git clone https://github.com/acceleratescience/diffusion-models
cd diffusion-models
2. Installing dependencies with uv
(preferred)
Windows (Powershell)
Install uv if needed:
irm https://astral.sh/uv/install.ps1 | iex
uv sync
.\.venv\Scripts\activate
macOS / Linux
Install uv if needed:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync
source .venv/bin/activate
3. Installing dependencies with pip
(alternative)
Windows (Powershell)
Create and activate an empty virtual environment:
python3 -m diffusion-models .venv
.\.venv\Scripts\activate
pip install .
macOS / Linux
Create and activate an empty virtual environment:
python3 -m diffusion-models .venv
source .venv\bin\activate
pip install .