Text-to-image The text-to-image script is experimental, and it’s easy to overfit and run into issues like catastrophic forgetting. Try exploring different hyperparameters to get the best results on your dataset. Text-to-image models like Stable Diffusion are conditioned to generate images given a text prompt. Training a model can be taxing on your hardware, but if you enable gradient_checkpointing and mixed_precision, it is possible to train a model on a single 24GB GPU. If you’re training with larger batch sizes or want to train faster, it’s better to use GPUs with more than 30GB of memory. You can reduce your memory footprint by enabling memory-efficient attention with xFormers. JAX/Flax training is also supported for efficient training on TPUs and GPUs, but it doesn’t support gradient checkpointing, gradient accumulation or xFormers. A GPU with at least 30GB of memory or a TPU v3 is recommended for training with Flax. This guide will explore the train_text_to_image.py training script to help you become familiar with it, and how you can adapt it for your own use-case. Before running the script, make sure you install the library from source:   Copied git clone https://github.com/huggingface/diffusers