Skip to content

Commit f037e79

Browse files
committed
update README installation instructions.
1 parent 2b2e76e commit f037e79

File tree

1 file changed

+28
-0
lines changed
  • examples/research_projects/instructpix2pix_lora

1 file changed

+28
-0
lines changed

examples/research_projects/instructpix2pix_lora/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,34 @@
22
This extended LoRA training script was authored by [Aiden-Frost](https://github.com/Aiden-Frost).
33
This is an experimental LoRA extension of [this example](https://github.com/huggingface/diffusers/blob/main/examples/instruct_pix2pix/train_instruct_pix2pix.py). This script provides further support add LoRA layers for unet model.
44

5+
## Running locally with PyTorch
6+
### Installing the dependencies
7+
8+
Before running the scripts, make sure to install the library's training dependencies:
9+
10+
**Important**
11+
12+
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:
13+
```bash
14+
git clone https://github.com/huggingface/diffusers
15+
cd diffusers
16+
pip install .
17+
```
18+
19+
Then cd in the example folder and run
20+
```bash
21+
pip install -r requirements.txt
22+
```
23+
24+
And initialize an [🤗Accelerate](https://github.com/huggingface/accelerate/) environment with:
25+
26+
```bash
27+
accelerate config
28+
```
29+
30+
Note also that we use PEFT library as backend for LoRA training, make sure to have `peft>=0.6.0` installed in your environment.
31+
32+
533
## Training script example
634

735
```bash

0 commit comments

Comments
 (0)