enkeejunior1 / Diffusion-Pullback

Official Implementation of understanding the latent space of diffusion models through the lens of riemannian geometry (NeurIPS 2023)
Apache License 2.0
75 stars 7 forks source link

Diffusion-Pullback

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

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

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

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