This repository is a collection of diffusion inversion methods. We implemented all mentioned methods in the repository using diffusers.
NOTE that this repository is only build for inversion, applications to downstream tasks (e.g. image editing, image variation, image inpainting, and rare concept generation, etc) are not included.
Create and activate a conda environment:
conda create -n diffusion-inversion python=3.10
conda activate diffusion-inversionClone this Repository:
git clone https://github.com/wmchen/diffusion-inversion.git
cd diffusion-inversionInstall PyTorch:
pip install -r requirements/torch.txtInstall other packages:
pip install -r requirements/build.txtPlease refer to examples/ for a quick start.
| Method | Publication | Paper | Official repo. | Ours imp. |
|---|---|---|---|---|
| DDIM Inversion | ICLR 2021 | paper | ours | |
| Negative Prompt Inversion (NPI) | ArXiv 2023 | paper | ours | |
| Null-Text Inversion (NTI) | CVPR 2023 | paper | official | ours |
| Exact Diffusion Inversion via Coupled Transformations (EDICT) | CVPR 2023 | paper | official | ours |
| Accelerated Iterative Diffusion Inversion (AIDI) | ICCV 2023 Oral | paper | ours | |
| Prompt Tuning Inversion (PTI) | ICCV 2023 | paper | ours | |
| Real-world Image Variation by ALignment (RIVAL) | NeurIPS 2023 Spotlight | paper | official | ours |
| Fixed-Point Inversion (FPI) | ArXiv 2023 | paper | official | ours |
| On Exact Inversion of DPM-solvers | CVPR 2024 | paper | official | ours |
| Tuning-free Inversion-enhanced Control (TIC) | AAAI 2024 | paper | ours | |
| Bi-Directional Integration Approximation (BDIA) | ECCV 2024 Oral | paper | official | ours |
| ReNoise | ECCV 2024 | paper | official | ours |
| Bidirectional Explicit Linear Multi-step (BELM) | NeurlPS 2024 | paper | official | ours |
| Guided Newton Raphson Inversion (GNRI) | ICLR 2025 | paper | official | ours |
All methods above support Stable Diffusion v1, v2 and SDXL in our implementations. The following versions of diffusion model are fully tested:
| Method | Publication | Paper | Official repo. | Ours imp. |
|---|---|---|---|---|
| RF-Inversion | ICLR 2025 | paper | official | ours |
| RF-Solver | ICML 2025 | paper | official | ours |
| FireFlow | ICML 2025 | paper | official | ours |
CLAIM: The implementation of RF-Inversion is copy from diffusers.
If you use this codebase in your research, please cite our repository and the corresponding papers.
@misc{chen2024inversion,
title = {Diffusion Inversion Methods},
author = {Chen, Weiming},
howpublished = {https://github.com/wmchen/diffusion-inversion},
year = {2024},
}We appreciate all the contributors who add new features or fix bugs, as well as the users who offer valuable feedback. We welcome all contributors, feel free to create an issue or file a pull request and join us! ❤️
Weiming Chen 🤔 💻 📆 🔬 |
liuqifan67 🤔 🔬 |
llsysysy 🤔 🔬 |
TANG 🤔 🔬 |
nkdailab 💵 |
|
|
||||
This project is intended for research use only, licensed under the Apache-2.0 license.