Official implementation of ResEdit: Residual embeddings for precise generative image editing, published in Computer Graphics Forum, Volume 45 (2026), and presented at EGSR 2026.
ResEdit enables high-fidelity generative editing by isolating image identity in a learned residual image embedding. Unlike traditional inversion methods that struggle with "baked-in" condition features, ResEdit explicitly separates identity from physical conditions, enabling intrinsic-space manipulation of geometry and materials, as well as reference-based relighting. By shifting the burden of reconstruction from the noise latent to this dedicated residual channel, ResEdit balances identity preservation with responsive editability without requiring model surgery.
15.07.2026: We released the code.
01.07.2026: ResEdit was published in Computer Graphics Forum, Volume 45 (2026).
-
Create and activate the conda environment:
conda env create -f environment.yml -y conda activate resedit
-
Stable Diffusion 3.5 Medium is a gated model. Request access on Hugging Face, then authenticate from the terminal:
hf auth login
Pretrained models are available on Hugging Face. The demo downloads the required checkpoints automatically; no separate download is required.
To launch the demo:
python demo.py- Upload the image you want to edit.
- Upload an original condition and its edited version (e.g., an albedo map). Example inputs are provided in
assets/examples/. - Leave the other image inputs blank.
- Select the appropriate adversarial target from the dropdown menu. For example, select "albedo" for an albedo edit.
- Adjust the optimization parameters (e.g., number of steps and adversarial weight) and inversion method (
exactorDDIM), then run the demo.
This repository builds on code from RGB↔X and IntrinsicEdit.
@article{10.1111:cgf.70551,
journal = {Computer Graphics Forum},
title = {{ResEdit: Residual embeddings for precise generative image editing}},
author = {Baykal, Canberk and Deschaintre, Valentin and Hold-Geoffroy, Yannick and Fischer, Michael and Frühstück, Anna and Öztireli, Cengiz and Georgiev, Iliyan},
year = {2026},
publisher = {The Eurographics Association and John Wiley & Sons Ltd.},
ISSN = {1467-8659},
DOI = {10.1111/cgf.70551}
}