Follow these steps to set up StreamDiffusion in your environment.
1. Clone the repository
git clone https://github.com/cumulo-autumn/StreamDiffusion.git
2. Create an environment
Using Conda:
conda create -n streamdiffusion python=3.10
conda activate streamdiffusion
Or using venv:
python -m venv .venv
# Windows
.\.venv\Scripts\activate
# Linux
source .venv/bin/activate
3. Install PyTorch
Install the version matching your CUDA setup:
CUDA 11.8:
pip3 install torch==2.1.0 torchvision==0.16.0 xformers --index-url https://download.pytorch.org/whl/cu118
CUDA 12.1:
pip3 install torch==2.1.0 torchvision==0.16.0 xformers --index-url https://download.pytorch.org/whl/cu121
4. Install StreamDiffusion
For Users (Recommended):
To install the latest version with TensorRT support:
pip install git+https://github.com/cumulo-autumn/StreamDiffusion.git@main#egg=streamdiffusion[tensorrt]
To install the stable version:
pip install streamdiffusion[tensorrt]
After installation, install the TensorRT extension:
python -m streamdiffusion.tools.install-tensorrt
Note: On Windows, if you installed the stable version, you may need to install pywin32 manually:
pip install --force-reinstall pywin32
For Developers:
python setup.py develop easy_install streamdiffusion[tensorrt]
python -m streamdiffusion.tools.install-tensorrt
git clone https://github.com/cumulo-autumn/StreamDiffusion.git
conda create -n streamdiffusion python=3.10
conda activate streamdiffusion
pip3 install torch==2.1.0 torchvision==0.16.0 xformers --index-url https://download.pytorch.org/whl/cu121
pip install git+https://github.com/cumulo-autumn/StreamDiffusion.git@main#egg=streamdiffusion[tensorrt]
python -m streamdiffusion.tools.install-tensorrt