Views
No views yet
1git clone https://github.com/timothybrooks/instruct-pix2pix.git
2cd instruct-pix2pix
3mkdir checkpointscheckpoints folder via1cd checkpoints
2# recent best checkpoint:
3wget https://huggingface.co/osunlp/InstructPix2Pix-MagicBrush/resolve/main/MagicBrush-epoch-52-step-4999.ckpt
4# checkpoint in the paper
5# wget https://huggingface.co/osunlp/InstructPix2Pix-MagicBrush/resolve/main/MagicBrush-epoch-000168.ckpt
6
71python edit_cli.py --input [YOUR_IMG_PATH] --output imgs/output.jpg --edit "EDIT INSTRUCTION" --ckpt checkpoints/MagicBrush-epoch-52-step-4999.ckpt
2
3# 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.
4# 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

python edit_app.py --ckpt checkpoints/MagicBrush-epoch-52-step-4999.ckpt@inproceedings{Zhang2023MagicBrush,
title={MagicBrush: A Manually Annotated Dataset for Instruction-Guided Image Editing},
author={Kai Zhang and Lingbo Mo and Wenhu Chen and Huan Sun and Yu Su},
booktitle={Advances in Neural Information Processing Systems},
year={2023}
}@InProceedings{brooks2022instructpix2pix,
author = {Brooks, Tim and Holynski, Aleksander and Efros, Alexei A.},
title = {InstructPix2Pix: Learning to Follow Image Editing Instructions},
booktitle = {CVPR},
year = {2023},
}