patrickvonplaten commited on
Commit
6b2f29a
1 Parent(s): a426b60
Files changed (1) hide show
  1. README.md +17 -10
README.md CHANGED
@@ -1,15 +1,22 @@
1
  ---
2
  tags:
3
- - ddpm_diffusion
4
  ---
5
 
6
- # Denoising Diffusion Probabilistic Models (DDPM)
7
 
8
- **Paper**: [Denoising Diffusion Probabilistic Models](https://arxiv.org/abs/2006.11239)
9
 
10
  **Abstract**:
11
 
12
- *We present high quality image synthesis results using diffusion probabilistic models, a class of latent variable models inspired by considerations from nonequilibrium thermodynamics. Our best results are obtained by training on a weighted variational bound designed according to a novel connection between diffusion probabilistic models and denoising score matching with Langevin dynamics, and our models naturally admit a progressive lossy decompression scheme that can be interpreted as a generalization of autoregressive decoding. On the unconditional CIFAR10 dataset, we obtain an Inception score of 9.46 and a state-of-the-art FID score of 3.17. On 256x256 LSUN, we obtain sample quality similar to ProgressiveGAN.*
 
 
 
 
 
 
 
13
 
14
  ## Usage
15
 
@@ -19,13 +26,13 @@ from diffusers import DiffusionPipeline
19
  import PIL.Image
20
  import numpy as np
21
 
22
- model_id = "fusing/ddpm-celeba-hq"
23
 
24
  # load model and scheduler
25
  ddpm = DiffusionPipeline.from_pretrained(model_id)
26
 
27
  # run pipeline in inference (sample random noise and denoise)
28
- image = ddpm()
29
 
30
  # process image to PIL
31
  image_processed = image.cpu().permute(0, 2, 3, 1)
@@ -39,7 +46,7 @@ image_pil.save("test.png")
39
 
40
  ## Samples
41
 
42
- 1. ![sample_1](https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/hf/ddpm-celeba-hq/image_0.png)
43
- 2. ![sample_1](https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/hf/ddpm-celeba-hq/image_1.png)
44
- 3. ![sample_1](https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/hf/ddpm-celeba-hq/image_2.png)
45
- 4. ![sample_1](https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/hf/ddpm-celeba-hq/image_3.png)
 
1
  ---
2
  tags:
3
+ - ddim_diffusion
4
  ---
5
 
6
+ # Denoising Diffusion Implicit Models (DDIM)
7
 
8
+ **Paper**: [Denoising Diffusion Implicit Models](https://arxiv.org/abs/2010.02502)
9
 
10
  **Abstract**:
11
 
12
+ *Denoising diffusion probabilistic models (DDPMs) have achieved high quality image generation without adversarial training, yet they require simulating a Markov chain for many steps to produce a sample. To accelerate sampling, we present denoising diffusion implicit models (DDIMs), a more efficient class of iterative implicit probabilistic models with the same training procedure as DDPMs. In DDPMs, the generative process is defined as the reverse of a Markovian diffusion process. We construct a class of non-Markovian diffusion processes that lead to the same training objective, but whose reverse process can be much faster to sample from. We empirically demonstrate that DDIMs can produce high quality samples 10× to 50× faster in terms of wall-clock time compared to DDPMs, allow us to trade off computation for sample quality, and can perform semantically meaningful image interpolation directly in the latent space.*
13
+
14
+ **Explanation on `eta` and `num_inference_steps`**
15
+
16
+ - `num_inference_steps` is called *S* in the following table
17
+ - `eta` is called *η* in the following table
18
+
19
+ ![ddim](https://huggingface.co/datasets/patrickvonplaten/scientific_images/resolve/main/table_ddim.png)
20
 
21
  ## Usage
22
 
 
26
  import PIL.Image
27
  import numpy as np
28
 
29
+ model_id = "fusing/ddim-celeba-hq"
30
 
31
  # load model and scheduler
32
  ddpm = DiffusionPipeline.from_pretrained(model_id)
33
 
34
  # run pipeline in inference (sample random noise and denoise)
35
+ image = ddpm(eta=0.0, num_inference_steps=50)
36
 
37
  # process image to PIL
38
  image_processed = image.cpu().permute(0, 2, 3, 1)
 
46
 
47
  ## Samples
48
 
49
+ 1. ![sample_1](https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/hf/ddim-celeba-hq/image_0.png)
50
+ 2. ![sample_1](https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/hf/ddim-celeba-hq/image_1.png)
51
+ 3. ![sample_1](https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/hf/ddim-celeba-hq/image_2.png)
52
+ 4. ![sample_1](https://huggingface.co/datasets/patrickvonplaten/images/resolve/main/hf/ddim-celeba-hq/image_3.png)