ReNoise-Inversion  by garibida

Real image inversion for diffusion models

Created 1 year ago
254 stars

Top 99.1% on SourcePulse

GitHubView on GitHub
Project Summary

ReNoise addresses the challenge of faithfully inverting real-world images into the latent space of pretrained text-guided diffusion models, particularly for accelerated models. It offers a high quality-to-operation ratio, enhancing reconstruction accuracy and speed without increasing computational load. This project is beneficial for researchers and developers seeking robust image inversion techniques for subsequent manipulation and editing tasks.

How It Works

The core of ReNoise lies in reversing the diffusion sampling process, augmented by an iterative renoising mechanism applied at each inversion step. This approach refines the approximation of a point along the forward diffusion trajectory by repeatedly applying the pretrained diffusion model and averaging its predictions. This iterative refinement allows for improved reconstruction accuracy and a better approximation of the original image's latent representation.

Quick Start & Requirements

Environment setup requires the diffusers library. Installation can be done via conda env create -f environment.yaml followed by conda activate renoise_inversion, or by running pip install -r requirements.txt. A local demo is available by running gradio gradio_app.py. Usage examples for Stable Diffusion, SDXL, and SDXL Turbo are provided in the examples/ directory. Typical diffusion model hardware (GPU) is implicitly required.

Highlighted Details

  • Supports inversion for Stable Diffusion, SDXL, and SDXL Turbo models.
  • Evaluated effectiveness across various sampling algorithms and accelerated diffusion models.
  • Preserves image editability, demonstrated through text-driven editing on real images.
  • Offers fine-grained control over inversion parameters, including num_inference_steps, num_inversion_steps, guidance_scale, num_renoise_steps, and averaging strategies.

Maintenance & Community

The project builds upon the diffusers library and incorporates code from Pix2PixZero and sdxl_inversions. No specific community channels (e.g., Discord, Slack) or detailed roadmap information are provided in the README.

Licensing & Compatibility

The provided README does not explicitly state the project's license. This omission requires further investigation for commercial use or integration into closed-source projects.

Limitations & Caveats

No specific limitations, known bugs, or alpha status are mentioned in the provided README.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
6 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Clement Delangue Clement Delangue(Cofounder of Hugging Face), and
37 more.

diffusers by huggingface

0.2%
31k
PyTorch/Flax library for diffusion model research and applications
Created 3 years ago
Updated 9 hours ago
Feedback? Help us improve.