Image Editing As Programs with Diffusion Models
Yujia Hu, Songhua Liu, ZhenXiong Tan, Xingyi Yang, and Xinchao Wang
xML Lab, National University of Singapore

Pipeline:

conda create -n ieap python=3.10
conda activate ieap
conda install pytorch==2.3.1 torchvision==0.18.1 pytorch-cuda=12.1 cuda -c pytorch -c "nvidia/label/cuda-12.1.0" -c "nvidia/label/cuda-12.1.1"
pip install -r requirements.txt
Start with:
python main.py image_path editing_instructions
For example:
python main.py "assets/a12.jpg" "Change the action of the woman to running and minify the woman."
If you have already had a json file for editing:
python main_json.py image_path json_path
For example:
python main_json.py "assets/a12.jpg" "instructions.json"
We sincerely thank the excellent open-source projects: OminiControl and Sa2VA.
@article{hu2025ieap,
title={Image Editing As Programs with Diffusion Models},
author={Hu, Yujia and Liu, Songhua and Tan, Zhenxiong and Yang, Xingyi and Wang, Xinchao},
journal={NeurIPS},
year={2025}
}
23 commits
2 commits
Python
71.8%
JavaScript
16.8%
HTML
7.0%
CSS
3.4%
Shell
1.1%
Image Editing As Programs with Diffusion Models
Yujia Hu, Songhua Liu, ZhenXiong Tan, Xingyi Yang, and Xinchao Wang
xML Lab, National University of Singapore

Pipeline:

conda create -n ieap python=3.10
conda activate ieap
conda install pytorch==2.3.1 torchvision==0.18.1 pytorch-cuda=12.1 cuda -c pytorch -c "nvidia/label/cuda-12.1.0" -c "nvidia/label/cuda-12.1.1"
pip install -r requirements.txt
Start with:
python main.py image_path editing_instructions
For example:
python main.py "assets/a12.jpg" "Change the action of the woman to running and minify the woman."
If you have already had a json file for editing:
python main_json.py image_path json_path
For example:
python main_json.py "assets/a12.jpg" "instructions.json"
We sincerely thank the excellent open-source projects: OminiControl and Sa2VA.
@article{hu2025ieap,
title={Image Editing As Programs with Diffusion Models},
author={Hu, Yujia and Liu, Songhua and Tan, Zhenxiong and Yang, Xingyi and Wang, Xinchao},
journal={NeurIPS},
year={2025}
}
23 commits
2 commits
Python
71.8%
JavaScript
16.8%
HTML
7.0%
CSS
3.4%
Shell
1.1%