This is a template repo for training and publishing your own custom DreamBooth model using Replicate and GitHub Actions.
![YouTube video](https://user-images.githubusercontent.com/2289/205170836-49031fdd-eedc-4014-9d73-18870b7418ac.png)
- A paid Replicate account
- A handful of training images
- ๐ฃ 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 grab a coffee or a snack! 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.