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 diffusionThe 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 matplotlibOptionally, one can install IPython and/or Jupyter for interactive use.
conda install ipython jupyterNow, we can install the code in this repository.
pip install git+https://github.com/janniklasrose/diffusion-models.gitAlternatively, from the local cloned 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 diffusionThe file was created using
conda env export --name diffusion > diffusion.ymland then edited to remove the prefix key and move pip requirements to the requirements.txt file.