enkeejunior1 / Diffusion-Pullback

Official Implementation of understanding the latent space of diffusion models through the lens of riemannian geometry (NeurIPS 2023)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Diffusion-Pullback

Official Implementation of understanding the latent space of diffusion models through the lens of riemannian geometry (NeurIPS 2023)

  • examples

unsupervised editing celeba sd_without_prompt

weekly-supervised editing (text-conditioned) sd_with_prompt

Environment

conda create -n pullback python=3.10
pip install -r requirements.txt

Experiemtns

  • unconditional diffusion model

Currently, it's implemented only for CelebA-HQ.

In the paper, we used the mode from SDEdit, but since it's deprecated, here, we use a Hugging Face model here.

cd src
bash scripts/main_celeba_hf_local_encoder_pullback.sh
  • stable diffusion

If you want to experiment with a new image, you can do the following: 1) Insert the desired image into "datasets/examples", and 2) adjust the "sample_idx" accordingly.

Open In Colab

cd src
bash scripts/main_various_local_encoder_pullback_without_edit_prompt.sh     # w/o text condition
bash scripts/main_various_local_encoder_pullback_with_edit_prompt.sh        # w/ text condition

About

Official Implementation of understanding the latent space of diffusion models through the lens of riemannian geometry (NeurIPS 2023)

License:Apache License 2.0


Languages

Language:Python 96.7%Language:Jupyter Notebook 2.5%Language:Shell 0.8%