Before running the scripts, make sure you install the library from source:  
```bash
git clone https://github.com/huggingface/diffusers
cd diffusers
pip install .
```  
Then navigate to the example folder containing the training script and install the required dependencies for the script you're using:  
```bash
cd examples/kandinsky2_2/text_to_image
pip install -r requirements.txt
```  
<Tip>