@inproceedings{ruiz2023dreambooth,
title={Dreambooth: Fine tuning text-to-image diffusion models for subject-driven generation},
author={Ruiz, Nataniel and Li, Yuanzhen and Jampani, Varun and Pritch, Yael and Rubinstein, Michael and Aberman, Kfir},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
year={2023}
}
Jittor-DreamBooth-Lora
本项目参考自 HuggingFace的训练指导 。
环境安装
首先按照 JDiffusion 的安装指导安装必要的依赖,除此之外还需要安装
peft
库依赖。训练
train_all.sh
中的BASE_INSTANCE_DIR
设置为数据集对应的目录,GPU_COUNT
设置为对应可用的显卡数量,MAX_NUM
设置为数据集中的风格个数;bash train_all.sh
即可训练。推理
run_all.py
中的dataset_root
修改为数据集对应的目录,将max_num
修改为数据集中的风格个数;python run_all.py
进行训练,对应的图片会输出到output
文件夹。参考文献