Skip to content

Simple Fast API server that runs Dreambooth fine-tune jobs using Celery workers 🤙

Notifications You must be signed in to change notification settings

zhyshchynskyi/simple-dreambooth-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

Simple Fast API server that runs Dreambooth fine-tune jobs using Celery workers 🤙

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.4%
  • Shell 5.6%