Create butter-smooth transitions between prompts, powered by stable diffusion
Go to file
Anna 507b06958d resolution fix 2022-12-31 13:14:37 +01:00
configs stable diffusion v2 configs 2022-12-31 13:14:25 +01:00
ldm sd 2.1 2022-12-09 11:06:44 +00:00
.gitignore mp4 files 2022-11-28 08:45:40 +01:00
LICENSE Initial commit 2022-11-19 19:40:58 +01:00
README.md sd v2.1 2022-12-09 11:52:50 +00:00
animation.gif calmer animation 2022-12-01 09:23:31 +00:00
cherry_picknick.py cleanup 2022-11-28 18:14:20 +01:00
example1_standard.py sd 2.1 2022-12-09 11:06:44 +00:00
example2_inpaint.py cleanup 2022-12-03 11:18:23 +00:00
example3_multitrans.py cleanup 2022-12-03 11:18:23 +00:00
latent_blending.py small fixes 2022-12-02 12:17:13 +00:00
movie_util.py directory bug 2022-11-28 08:46:39 +01:00
requirements.txt reqs 2022-12-03 11:48:23 +00:00
stable_diffusion_holder.py resolution fix 2022-12-31 13:14:37 +01:00

README.md

What is latent blending?

Latent blending allows you to generate smooth video transitions between two prompts. It is based on stable diffusion 2.1 and remixes the latent reprensetation using spherical linear interpolations. This results in imperceptible transitions, where one image slowly turns into another one.

Example 1: simple transition

(mp4), code

Example 2: inpainting transition

(mp4), code

Example 3: concatenated transition

(mp4), code

Relevant parameters

Installation

Packages

pip install -r requirements.txt

Download Models from Huggingface

Download the Stable Diffusion v2-1_768 Model

Download the Stable Diffusion 2.0 Inpainting Model (optional)

(Optional) Install Xformers

With xformers, stable diffusion 2 will run a bit faster. The recommended way of installation is via the supplied binaries (Linux).

conda install xformers -c xformers/label/dev

Alternatively, you can build it from source:

# (Optional) Makes the build much faster
pip install ninja
# Set TORCH_CUDA_ARCH_LIST if running and building on different GPU types
pip install -v -U git+https://github.com/facebookresearch/xformers.git@main#egg=xformers
# (this can take dozens of minutes)

How does it work

what makes a transition a good transition?

  • absence of movement
  • every frame looks like a credible photo