ccelerator.unwrap_model(text_encoder),
)

# Perform inference, or save, or push to the hub
pipeline.save_pretrained("dreambooth-pipeline")

Optimizations for different GPU sizes
	
Depending on your hardware, there are a few different ways to optimize DreamBooth on GPUs from 16GB to just 8GB! 

xFormers
	
xFormers is a toolbox for optimizing Transformers, and it includes a memory-efficient attention mechanism that is used in 🧨 Diffusers. You’ll 