EveryDream-trainer/doc/MICROMODELS.MD

36 lines
1.8 KiB
Plaintext
Raw Normal View History

# Micro models
Micro models allow training quickly on a small data set in minimal time. The technique is simply training on the new data with no preservation. If you add too much data or train for too long you will damage the model notably, but it is an easy and quick way to get one character into a model.
2022-11-12 12:23:06 -07:00
To train a micro model, just place your 20-50 images into a training root folder
Example:
2022-11-12 12:23:06 -07:00
/training_samples/ted_bennett/a close up of ted bennett in a suit and tie.jpg
2022-11-12 12:24:06 -07:00
/training_samples/ted_bennett/ted bennett sitting on a couch next to mark wahlkberg.jpg
etc
2022-11-12 12:23:06 -07:00
Training root in this example will be "/training_samples/ted_bennett".
## Example
You can recreate the above model by downloading the dataset or try your own.
2022-10-29 07:43:35 -06:00
Dataset: https://huggingface.co/panopstor/ff7r-stable-diffusion/blob/main/ted_bennett.zip
2022-10-29 07:43:35 -06:00
Model: https://huggingface.co/panopstor/ff7r-stable-diffusion/blob/main/ted_bennett_259step_13minutes.ckpt
Unzip the file into your /training_samples folder. It will create a subfolder on its own to work with the trainer.
On the command line, use v1-finetune_micro.yaml which is setup for this case. You may wish to slightly change the REPEATS for your data set, with 31 images and repeasts 50 the output is fairly good and completes in just 13 minutes on an RTX 3090:
2022-10-31 22:18:27 -06:00
python main.py --base configs/stable-diffusion/v1-finetune_micro.yaml -t --actual_resume sd_v1-5_vae.ckpt -n ted --gpus 0, --data_root training_samples\ted_bennett
2022-12-10 13:36:17 -07:00
Prompt is simply "ted bennett" as "ted bennett" is in all the training images plus captions for the rest of the scene.
2022-11-12 12:24:57 -07:00
Some examples of output (ted bennet in a ballet skirt on stage, etc):
2022-11-10 23:42:22 -07:00
![ted bennett as ironman](../demo/ted_bennett_ballet.png)
![ted bennett as ironman](../demo/ted_bennett_ironman.png)
2022-11-12 12:23:06 -07:00
![ted bennett as ironman](../demo/ted_bannett_superman.png)