Windows:
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt --user
python app.pyMacOS/Linux:
source run_mac.shGet the correct version of Pytorch here: https://pytorch.org/get-started/locally/
OPENAI_API_KEY: API key for OpenAI
When using Docker, you can build the image with the following command:
docker build -t diffusion-backend .Then, you can run the image with the following command:
docker run -p 5000:<local_port> diffusion-backendReplace <local_port> with the port you want to use locally. E.g.:
docker run -p 5000:55000 diffusion-backendIf you want to use Pytorch with CUDA on Windows, you have to install the CUDA version of Pytorch.
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118