This repository contains a simple test to measure the speedup provided by the OneDiff algorithm.
Follow these steps to set up and run the test:
-
Set up a Python 3.10 Conda environment
Create a new Conda environment named
onediff-test
with Python 3.10:conda env create -n onediff-test python=3.10
-
Activate the environment
Switch to the new environment:
conda activate onediff-test
-
Install the OneDiff library
Run the provided script to install the OneDiff library with CUDA 11.2 support:
bash install_one_diff_cuda121.bash
This script follows the official OneDiff installation instructions.
-
Verify the OneDiff installation
Verify that the OneDiff library is successfully installed by importing it in Python:
python -c "import onediff"
-
Run the test
Execute the test script:
python onediff_test.py
This script uses the OneDiff library to perform text-to-image inference using a pre-trained model.