It is recommended to use a virtual environment for Python, such as Anaconda.
First, we create a virtual environment.
conda create --name diffusion python=3
conda activate diffusion
The second command changes the prompt from $
to (diffusion)$
.
All further commands are assumed to be executed in this new environment.
Next, we install the dependencies.
We use the conda
versions of the major packages as these usually work better.
In addition, the conda
version of numpy
comes with support for the Intel MKL, offering extra speed up on supported systems.
conda install numpy scipy matplotlib
Optionally, one can install IPython
and/or Jupyter
for interactive use.
conda install ipython jupyter
Now, we can install the code in this repository.
pip install git+https://github.com/janniklasrose/diffusion-models.git
Alternatively, from the local clone
d repository, we can execute:
pip install --editable .
The -e
/--editable
flag tells pip
to install
the package path.
This leaves the source files editable.
We provide the file diffusion.yml to quickly create a tested conda
environment.
Simply execute:
conda env create --file diffusion.yml --name diffusion
The file was created using
conda env export --name diffusion > diffusion.yml
and then edited to remove the prefix
key and move pip
requirements to the requirements.txt file.