Commit
·
6c83c49
1
Parent(s):
2c494da
Update README.md
Browse files
README.md
CHANGED
@@ -20,7 +20,12 @@ Download this checkpoint into `checkpoints` folder via
|
|
20 |
|
21 |
```shell
|
22 |
cd checkpoints
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
24 |
```
|
25 |
|
26 |
Then go back to the root folder and set up the running env following the [InstructPix2Pix](https://github.com/timothybrooks/instruct-pix2pix) guidelines.
|
@@ -30,21 +35,23 @@ Then go back to the root folder and set up the running env following the [Instru
|
|
30 |
### Edit a single image:
|
31 |
|
32 |
```python
|
33 |
-
python edit_cli.py --input [YOUR_IMG_PATH] --output imgs/output.jpg --edit "EDIT INSTRUCTION" --ckpt checkpoints/MagicBrush-epoch-
|
34 |
|
35 |
# Our model is fine-tuned for fine-grained real image editing. Therefore, it may not perform well on style transfer or other editings on large region.
|
36 |
-
# e.g. python edit_cli.py --input imgs/example.jpg --output imgs/output.jpg --edit "let him wear a pair of sun glasses" --ckpt checkpoints/MagicBrush-epoch-
|
37 |
```
|
38 |
|
39 |
<div style="display: flex; justify-content: center;">
|
40 |
<img src="https://s2.loli.net/2023/06/22/BwOuzhFTXCSlZym.jpg" alt="Source Image" style="width:40%; margin-right: 50px;">
|
41 |
-
|
|
|
|
|
42 |
</div>
|
43 |
|
44 |
### Run the interactive editing Gradio app:
|
45 |
|
46 |
```python
|
47 |
-
python edit_app.py --ckpt checkpoints/MagicBrush-epoch-
|
48 |
```
|
49 |
|
50 |
|
|
|
20 |
|
21 |
```shell
|
22 |
cd checkpoints
|
23 |
+
# recent best checkpoint:
|
24 |
+
wget https://huggingface.co/osunlp/InstructPix2Pix-MagicBrush/resolve/main/MagicBrush-epoch-52-step-4999.ckpt
|
25 |
+
# checkpoint in the paper
|
26 |
+
# wget https://huggingface.co/osunlp/InstructPix2Pix-MagicBrush/resolve/main/MagicBrush-epoch-000168.ckpt
|
27 |
+
|
28 |
+
|
29 |
```
|
30 |
|
31 |
Then go back to the root folder and set up the running env following the [InstructPix2Pix](https://github.com/timothybrooks/instruct-pix2pix) guidelines.
|
|
|
35 |
### Edit a single image:
|
36 |
|
37 |
```python
|
38 |
+
python edit_cli.py --input [YOUR_IMG_PATH] --output imgs/output.jpg --edit "EDIT INSTRUCTION" --ckpt checkpoints/MagicBrush-epoch-52-step-4999.ckpt
|
39 |
|
40 |
# Our model is fine-tuned for fine-grained real image editing. Therefore, it may not perform well on style transfer or other editings on large region.
|
41 |
+
# e.g. python edit_cli.py --input imgs/example.jpg --output imgs/output.jpg --edit "let him wear a pair of sun glasses" --ckpt checkpoints/MagicBrush-epoch-52-step-4999.ckpt
|
42 |
```
|
43 |
|
44 |
<div style="display: flex; justify-content: center;">
|
45 |
<img src="https://s2.loli.net/2023/06/22/BwOuzhFTXCSlZym.jpg" alt="Source Image" style="width:40%; margin-right: 50px;">
|
46 |
+
<!-- <img src="https://s2.loli.net/2023/06/27/91oPIE3jlWMB7TF.jpg" alt="Target Image" style="width:40%;"> -->
|
47 |
+
<img src="https://s2.loli.net/2023/07/07/WqxBIRfJhtNOXS8.jpg" alt="Target Image" style="width:40%;">
|
48 |
+
|
49 |
</div>
|
50 |
|
51 |
### Run the interactive editing Gradio app:
|
52 |
|
53 |
```python
|
54 |
+
python edit_app.py --ckpt checkpoints/MagicBrush-epoch-52-step-4999.ckpt
|
55 |
```
|
56 |
|
57 |
|