Update README.md
Browse files
README.md
CHANGED
@@ -1,48 +1,49 @@
|
|
1 |
---
|
2 |
-
license:
|
3 |
---
|
4 |
|
5 |
-
# InstructPix2Pix checkpoint
|
6 |
|
7 |
-
## 1
|
8 |
|
9 |
-
|
10 |
|
11 |
-
```
|
12 |
git clone https://github.com/timothybrooks/instruct-pix2pix.git
|
13 |
cd instruct-pix2pix
|
14 |
mkdir checkpoints
|
15 |
```
|
16 |
|
17 |
-
Download
|
18 |
|
19 |
-
```
|
20 |
cd checkpoints
|
21 |
# wget https://huggingface.co/peter-sushko/RealEdit/resolve/main/realedit_model.ckpt
|
22 |
-
|
23 |
```
|
24 |
|
25 |
-
|
26 |
|
27 |
-
## 2
|
28 |
|
29 |
-
### Edit a single image
|
30 |
|
31 |
-
```
|
32 |
-
python edit_cli.py
|
33 |
-
|
|
|
|
|
|
|
|
|
34 |
|
35 |
-
###
|
36 |
|
37 |
-
```
|
38 |
python edit_app.py --ckpt checkpoints/realedit_model.ckpt
|
39 |
```
|
40 |
|
41 |
-
|
42 |
-
|
43 |
## Citation
|
44 |
|
45 |
-
If you find this checkpoint
|
46 |
|
47 |
```
|
48 |
@misc{sushko2025realeditredditeditslargescale,
|
@@ -55,14 +56,3 @@ If you find this checkpoint useful, please consider citing our paper:
|
|
55 |
url={https://arxiv.org/abs/2502.03629},
|
56 |
}
|
57 |
```
|
58 |
-
|
59 |
-
And prior work:
|
60 |
-
|
61 |
-
```
|
62 |
-
@InProceedings{brooks2022instructpix2pix,
|
63 |
-
author = {Brooks, Tim and Holynski, Aleksander and Efros, Alexei A.},
|
64 |
-
title = {InstructPix2Pix: Learning to Follow Image Editing Instructions},
|
65 |
-
booktitle = {CVPR},
|
66 |
-
year = {2023},
|
67 |
-
}
|
68 |
-
```
|
|
|
1 |
---
|
2 |
+
license: mit
|
3 |
---
|
4 |
|
5 |
+
# InstructPix2Pix checkpoint finetuned with the [RealEdit](https://peter-sushko.github.io/RealEdit/) dataset
|
6 |
|
7 |
+
## 1 · Environment preparation
|
8 |
|
9 |
+
Clone the repository and set up the directory structure:
|
10 |
|
11 |
+
```bash
|
12 |
git clone https://github.com/timothybrooks/instruct-pix2pix.git
|
13 |
cd instruct-pix2pix
|
14 |
mkdir checkpoints
|
15 |
```
|
16 |
|
17 |
+
Download the fine-tuned checkpoint into the `checkpoints` directory:
|
18 |
|
19 |
+
```bash
|
20 |
cd checkpoints
|
21 |
# wget https://huggingface.co/peter-sushko/RealEdit/resolve/main/realedit_model.ckpt
|
|
|
22 |
```
|
23 |
|
24 |
+
Return to the repo root and follow the [InstructPix2Pix installation guide](https://github.com/timothybrooks/instruct-pix2pix) to set up the environment.
|
25 |
|
26 |
+
## 2 · Running the model
|
27 |
|
28 |
+
### Edit a single image
|
29 |
|
30 |
+
```bash
|
31 |
+
python edit_cli.py \
|
32 |
+
--input [YOUR_IMG_PATH] \
|
33 |
+
--output imgs/output.jpg \
|
34 |
+
--edit "YOUR EDIT INSTRUCTION" \
|
35 |
+
--ckpt checkpoints/realedit_model.ckpt
|
36 |
+
```
|
37 |
|
38 |
+
### Launch the Gradio interface
|
39 |
|
40 |
+
```bash
|
41 |
python edit_app.py --ckpt checkpoints/realedit_model.ckpt
|
42 |
```
|
43 |
|
|
|
|
|
44 |
## Citation
|
45 |
|
46 |
+
If you find this checkpoint helpful, please cite:
|
47 |
|
48 |
```
|
49 |
@misc{sushko2025realeditredditeditslargescale,
|
|
|
56 |
url={https://arxiv.org/abs/2502.03629},
|
57 |
}
|
58 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|