Citing: This codebase is clone of work by Tanishq Abraham. I have cloned for my own learning purpose but it may be useful if you are looking for little more organized code (modular and intuitive variable namings) than the original repo.
This is an implementation of Training Diffusion Models with Reinforcement Learning with only basic features. It currently only implements LAION aesthetic classifier as a reward function.
git clone https://github.com/akashsonowal/ddpo-pytorch.git
cd ddpo-pytorch
pip install -r requirements.txt
It's as simple as running:
python main.py
To save memory (you'll likely need it), use the arguments --enable_attention_slicing
, --enable_xformers_memory_efficient_attention
, and --enable_grad_checkpointing
.