itsandbytes 8-bit optimizer and gradient checkpointing to optimize your training run. Install bitsandbytes:   Copied pip install bitsandbytes Then, add the following parameter to your training command:   Copied accelerate launch train_controlnet.py \
  --gradient_checkpointing \
  --use_8bit_adam \  PyTorch Flax    Copied export MODEL_DIR="runwayml/stable-diffusion-v1-5"
export OUTPUT_DIR="path/to/save/model"

accelerate launch train_controlnet