This is an api runs Dreambooth fine tuning jobs on a single node and queues requests as they come in
- 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).
conda activate diffusers
redis-server
conda activate diffusers
celery -A main.celery worker --loglevel=info --concurrency=1
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!