https://github.com/brevdev/simple-dreambooth-api
Simple Fast API server that runs Dreambooth fine-tune jobs using Celery workers 🤙
https://github.com/brevdev/simple-dreambooth-api
Last synced: 12 months ago
JSON representation
Simple Fast API server that runs Dreambooth fine-tune jobs using Celery workers 🤙
- Host: GitHub
- URL: https://github.com/brevdev/simple-dreambooth-api
- Owner: brevdev
- License: mit
- Created: 2022-11-20T19:34:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-18T20:26:22.000Z (almost 2 years ago)
- Last Synced: 2025-04-05T10:04:43.461Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 26.8 MB
- Stars: 10
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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](https://console.brev.dev/environment/new?repo=https://github.com/brevdev/simple-dreambooth-api&instance=g5.2xlarge&diskStorage=100)
- 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](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](https://github.com/ShivamShrirao). Huge thanks to him!