First we need to download the repository and create a new python environment. If you want to run this on the server the environment might not be required.
git clone https://github.com/Stability-AI/stablediffusion.git
cd stablediffusion/
python3 -m venv work
source ./work/bin/activate