This is an implementation of DreamBooth based on Stable Diffusion.
diffusers
! Less than 14 GB memeory is required!Dreambooth results from original paper:
The reproduced results:
batch_size
set to 4.Create conda environment with pytorch>=1.11.
conda env create -f environment.yaml
conda activate stable-diffusion
python sample.py # Generate class samples.
python train.py # Finetune stable diffusion model.
The generation results are in logs/dog_finetune
.
data/mydata/instance
folder.sample.py
.
sample.py
. The prompt
should be like "a {class}". And the save_dir
should be changed to data/mydata/class
.python sample.py
train.py
. python train.py
python inference.py --prompt "photo of a [V] dog in a dog house" --checkpoint_dir logs/dogs_finetune
Generated images are in outputs
by default.