Skip to content

DisC-Illustrations/diffusion-backend

Repository files navigation

diffusion-backend

Run the app

Windows:

python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt --user
python app.py

MacOS/Linux:

source run_mac.sh

Get the correct version of Pytorch here: https://pytorch.org/get-started/locally/

Environment variables

  • OPENAI_API_KEY: API key for OpenAI

Docker

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-backend

Replace <local_port> with the port you want to use locally. E.g.:

docker run -p 5000:55000 diffusion-backend

Pytorch and CUDA

If 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

About

provides a custom Python backend to allow HuggingFace based diffusion to be utilized via an API

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors