DreamBooth training example DreamBooth is a method to personalize text2image models like stable diffusion given just a few(3~5) images of a subject. The train dreambooth.py script shows how to implement the training procedure and adapt it for stable diffusion. Running locally with PyTorch Installing the dependencies Before running the scripts, make sure to install the library's training dependencies: Important To make sure you can successfully run the latest versions of the example scripts, we highly recommend installing from source and keeping the install up to date as we update the example scripts frequently and install some example specific requirements. To do this, execute the following steps in a new virtual environment: Then cd in the example folder and run And initialize an 🤗Accelerate environment with: Or for a default accelerate configuration without answering questions about your environment Or if your environment doesn't support an interactive shell e.g. a notebook When running accelerate config , if we specify torch compile mode to True there can be dramatic speedups. Note also that we use PEFT library as backend for LoRA training, make sure to have peft =0.6.0 install…
We use cookies for essential functionality and analytics. You can accept or reject analytics cookies.Cookie policy