Image-to-Image
Diffusers
StableDiffusionPipeline
peter-sushko commited on
Commit
253189c
·
verified ·
1 Parent(s): 6e50f64

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -30
README.md CHANGED
@@ -1,48 +1,49 @@
1
  ---
2
- license: creativeml-openrail-m
3
  ---
4
 
5
- # InstructPix2Pix checkpoint fine-tuned on [RealEdit](https://peter-sushko.github.io/RealEdit/).
6
 
7
- ## 1. Env Setup
8
 
9
- To use the InstructPix2Pix checkpoint fine-tuned on MagicBrush, set up env with following command:
10
 
11
- ```shell
12
  git clone https://github.com/timothybrooks/instruct-pix2pix.git
13
  cd instruct-pix2pix
14
  mkdir checkpoints
15
  ```
16
 
17
- Download this checkpoint into `checkpoints` folder via
18
 
19
- ```shell
20
  cd checkpoints
21
  # wget https://huggingface.co/peter-sushko/RealEdit/resolve/main/realedit_model.ckpt
22
-
23
  ```
24
 
25
- Then go back to the root folder and set up the running env following the [InstructPix2Pix](https://github.com/timothybrooks/instruct-pix2pix) guidelines.
26
 
27
- ## 2. Launch
28
 
29
- ### Edit a single image:
30
 
31
- ```python
32
- python edit_cli.py --input [YOUR_IMG_PATH] --output imgs/output.jpg --edit "EDIT INSTRUCTION" --ckpt checkpoints/MagicBrush-epoch-52-step-4999.ckpt
33
-
 
 
 
 
34
 
35
- ### Run the interactive editing Gradio app:
36
 
37
- ```python
38
  python edit_app.py --ckpt checkpoints/realedit_model.ckpt
39
  ```
40
 
41
-
42
-
43
  ## Citation
44
 
45
- If you find this checkpoint useful, please consider citing our paper:
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
  ```