Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Personalized Image Editing in Text-to-Image Diffusion Models via Collaborative Direct Preference Optimization [NeurIPS 2025]

Project Website arXiv

Connor Dunlop, Matthew Zheng*, Kavana Venkatesh*, Pinar Yanardag


* Equal contribution

Image

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.

Overview

Image

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.

Installation

conda create -n cdpo python=3.12
conda activate cdpo

cd Personalized-Image-Editing
pip install -e .

Usage

To download our dataset and checkpoints you can run:

bash download.sh

Supervised Fine Tuning:

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

Preparing the Graph and pretraining the GNN:

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

Collaborative DPO:

The code for training using C-DPO is located in the cdpo directory. To run training use the following:

cd cdpo
bash run.sh

Inference

To edit an image, run:

cd inference
bash infer.sh

Citation

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}
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages