This is a template repo for training and publishing your own custom DreamBooth model using Replicate and GitHub Actions.
- A paid Replicate account
- A handful of training images
🍿 Like to learn by watching? Check out the video tutorial on YouTube
- 🐣 Create your own copy of this repository by clicking the green "Use this template" button, then "Create a new repository". Name your new repository whatever you like, and choose whether you want to make it public or private.
- 🐕 Remove the cute puppy images in the data directory and replace them with your own images.
- 💾 Commit your changes to git and push to your main branch on GitHub.
- 🕵️♀️ Copy your Replicate API token from replicate.com/account and create a repository secret named
REPLICATE_API_TOKEN
. - 🎬 Trigger the workflow from your GitHub repo page: "Actions" > "Train a model" > "Run workflow".
- Go to the replicate.com homepage. At the top of your list of predictions, you'll see a replicate/dreambooth prediction in progress. This the request to train your model. Click that prediction to see the progress of the training process.
- ☕️ Grab a coffee or a snack and watch the logs roll by! The training process takes a few minutes to run.
Depending on the number of training steps you specified when running the workflow, the training process can take 10-40 minutes to run.
When the training process has completed successfully, it pushes the model to Replicate. You can run it like any other Replicate model, using the website or the API.
To run on the website, go to your dashboard then click on "Models".
Your new model will be private by default, and only visible to you. If you want anyone to be able to see and run your model, you can make it public in the Settings tab on your model page.
To run the model on the web, enter a prompt using the identifier you specified during training, e.g. a pencil sketch of zxz
.
To run the model from your own code, click the API tab on your model page for instructions on running with Python, cURL, etc.
To learn more about running models on Replicate, take a look at the Python getting started guide or the HTTP API reference.
If you have questions, open an issue on this repo or find us in Discord.