How to Finetune Dreambooth Model
Stable Diffusion APIPublished by
Maria Kostadinova
Published on
Nov 07, 2022
How to finetune dreambooth model to generate different types of your images?
Here is a step-by-step guide:
1. Prepare Training Images
Preparing images you want to train is very important, choosing the right images can generate awesome results. Make sure all images are different and not the same.
You will need 5-10 images of yourself or any item you want to finetune on.
1. Remove any kind of extra background;
2. Crop each image in 512x512 resolution;
3. Prepare around 10 images.
2. Choosing Token Name
Prompting with just your token. ie "adhik" instead of "adhik person"
If you trained with adhik
under the class person
, the model should only know your face as:
adhik person
Example Prompts:
? Incorrect (missing person
following adhik
)
portrait photograph of adhik 35mm film vintage glass
✅ This is right (person
is included after adhik
)
portrait photograph of adhik person 35mm film vintage glass
You might sometimes get someone who kinda looks like you with adhik (especially if you trained for too many steps), but that's only because this current iteration of Dreambooth overtrains that token so much that it bleeds into that token.
Right Instance Prompt:: a photo of adhik person
3. Choosing Training Steps
Having too many steps can lead to bad results, and too few can result in bad results as well.We recommend having 2x steps number of images or keep 2000 steps4. Prepare API
Visit API docs from this link to see API docs,
You can also open API collection using postman,
Change API like this:
All images have to be 512x512
Have a static link, for example, xyz.com/image.png
If the image link has been redirecting, it will not work
All images have to be valid .png images.
Anything above not good will result in failed training.
4. Start Training
Make an API call to start training, if you get an error, make sure you have your subscription activated. it will take 45 minutes to finish the training.