This repo, named Instruct-PG, contains the official PyTorch implementation of our paper Instruct-PG: Enhancing Image Editing with Semantic and Preference Alignment. We are actively updating and improving this repository. If you find any bugs or have suggestions, welcome to raise issues or submit pull requests (PR).
git clone https://github.com/yourusername/Instruct-PG.git
cd Instruct-PG
# create env using conda
conda create -n InstructPG python=3.10
conda activate InstructPG
pip install -r requirements.txt
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu124
# !pip install -U "huggingface_hub[cli]"
huggingface-cli download stable-diffusion-v1-5/stable-diffusion-v1-5
You can download our preference model from here.
python main.py
You can download our Preference Dataset from here. You can also download our Image Editing Instruction Dataset from here.
For any queries or collaboration opportunities, please contact us at [email protected].
Feel free to explore the code, raise issues, or submit pull requests to enhance the framework further. Happy editing!
We are excited to announce that Instruct-PG will be fully open-sourced in the near future! We aim to promote innovation and development within the community by making the source code freely available, thereby advancing image editing technology together.