Personalized Image Editing in Text-to-Image Diffusion Models via Collaborative Direct Preference Optimization [NeurIPS 2025]
Connor Dunlop, Matthew Zheng*, Kavana Venkatesh*, Pinar Yanardag
* Equal contribution
We introduce C-DPO, the first framework for personalized image editing with diffusion models. Our approach represents users in a dynamic preference graph and leverages collaborative signals from like-minded users to learn personalized preference embeddings. These embeddings are incorporated into a novel preference optimization objective that jointly aligns edits with individual tastes and neighborhood-level consistency, enabling image edits that better reflect each user's unique visual preferences.
1. We first fine-tune a language model so it can generate precise editing instructions. 2. We then introduce a graph-aware DPO objective that leverages collaborative user data to learn individual editing preferences. 3. After training, the system takes an input image and a user profile, produces tailored editing instructions, and outputs the corresponding personalized edit.
conda create -n cdpo python=3.12
conda activate cdpo
cd Personalized-Image-Editing
pip install -e .
To download our dataset and checkpoints you can run:
bash download.sh
The code for initially finetuning our lora with instructpix2pix is located in the sft directory. To train the lora yourself, you can run the following command in that directory:
cd sft
bash run.sh
We include code for this part of our framework under the gnn directory. To run this yourself, first prepare the graph by running:
cd gnn
bash user_graph.sh
Then find the nearest neighors:
cd gnn
bash create_nearest_users.sh
After you prepare the graph, you can run the following to pretrain the GNN:
cd gnn
bash pretrain_gnn.sh
The code for training using C-DPO is located in the cdpo directory. To run training use the following:
cd cdpo
bash run.sh
To edit an image, run:
cd inference
bash infer.sh
If you find our work beneficial for your research, please consider citing!
@inproceedings{dunlop2025cdpo,
author = {Dunlop, Connor and Zheng, Matthew and Venkatesh, Kavana and Yanardag, Pinar},
booktitle = {Advances in Neural Information Processing Systems},
pages = {167742--167771},
publisher = {Curran Associates, Inc.},
title = {Personalized Image Editing in Text-to-Image Diffusion Models via Collaborative Direct Preference Optimization},
url = {https://proceedings.neurips.cc/paper_files/paper/2025/file/f503d55f1b711673591c88e943c59695-Paper-Conference.pdf},
volume = {38},
year = {2025}
}

