File size: 1,867 Bytes
be4c430 6e50f64 be4c430 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
---
license: creativeml-openrail-m
---
# InstructPix2Pix checkpoint fine-tuned on [RealEdit](https://peter-sushko.github.io/RealEdit/).
## 1. Env Setup
To use the InstructPix2Pix checkpoint fine-tuned on MagicBrush, set up env with following command:
```shell
git clone https://github.com/timothybrooks/instruct-pix2pix.git
cd instruct-pix2pix
mkdir checkpoints
```
Download this checkpoint into `checkpoints` folder via
```shell
cd checkpoints
# wget https://huggingface.co/peter-sushko/RealEdit/resolve/main/realedit_model.ckpt
```
Then go back to the root folder and set up the running env following the [InstructPix2Pix](https://github.com/timothybrooks/instruct-pix2pix) guidelines.
## 2. Launch
### Edit a single image:
```python
python edit_cli.py --input [YOUR_IMG_PATH] --output imgs/output.jpg --edit "EDIT INSTRUCTION" --ckpt checkpoints/MagicBrush-epoch-52-step-4999.ckpt
### Run the interactive editing Gradio app:
```python
python edit_app.py --ckpt checkpoints/realedit_model.ckpt
```
## Citation
If you find this checkpoint useful, please consider citing our paper:
```
@misc{sushko2025realeditredditeditslargescale,
title={REALEDIT: Reddit Edits As a Large-scale Empirical Dataset for Image Transformations},
author={Peter Sushko and Ayana Bharadwaj and Zhi Yang Lim and Vasily Ilin and Ben Caffee and Dongping Chen and Mohammadreza Salehi and Cheng-Yu Hsieh and Ranjay Krishna},
year={2025},
eprint={2502.03629},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2502.03629},
}
```
And prior work:
```
@InProceedings{brooks2022instructpix2pix,
author = {Brooks, Tim and Holynski, Aleksander and Efros, Alexei A.},
title = {InstructPix2Pix: Learning to Follow Image Editing Instructions},
booktitle = {CVPR},
year = {2023},
}
``` |