Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 1.22 KB

README.md

File metadata and controls

33 lines (23 loc) · 1.22 KB

This is an api runs Dreambooth fine tuning jobs on a single node and queues requests as they come in

Setup:

  • To create the same deployable Brev environment that runs this API click here
  • If you want to run it on your own machine, the .brev/setup.sh script will install everything you need (in the diffusers conda environment).

Start the Redis Server:

conda activate diffusers
redis-server

Run the Celery worker:

conda activate diffusers
celery -A main.celery worker --loglevel=info --concurrency=1

Start the Fast API server:

conda activate diffusers
huggingface-cli login
uvicorn main:app --reload

Then head over to http://127.0.0.1:8000/docs to run the api. The finetune route takes in a zip file of images which is used to fine tune Stable Diffusion.

In the Brev console, you can forward ports. If you go ahead and forward port 8000 - you'll get a public URL and have created your own Dreambooth API!

Much of the code in this implementation was borrowed from Shivam Shrirao. Huge thanks to him!