ali97 commited on
Commit
72241e9
·
verified ·
1 Parent(s): 3608e62

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ ddpm-church/images/generated_image_1.png filter=lfs diff=lfs merge=lfs -text
37
+ ddpm-church/images/generated_image_3.png filter=lfs diff=lfs merge=lfs -text
ddpm-church/.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ftz filter=lfs diff=lfs merge=lfs -text
6
+ *.gz filter=lfs diff=lfs merge=lfs -text
7
+ *.h5 filter=lfs diff=lfs merge=lfs -text
8
+ *.joblib filter=lfs diff=lfs merge=lfs -text
9
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
10
+ *.model filter=lfs diff=lfs merge=lfs -text
11
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
12
+ *.onnx filter=lfs diff=lfs merge=lfs -text
13
+ *.ot filter=lfs diff=lfs merge=lfs -text
14
+ *.parquet filter=lfs diff=lfs merge=lfs -text
15
+ *.pb filter=lfs diff=lfs merge=lfs -text
16
+ *.pt filter=lfs diff=lfs merge=lfs -text
17
+ *.pth filter=lfs diff=lfs merge=lfs -text
18
+ *.rar filter=lfs diff=lfs merge=lfs -text
19
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
20
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
21
+ *.tflite filter=lfs diff=lfs merge=lfs -text
22
+ *.tgz filter=lfs diff=lfs merge=lfs -text
23
+ *.wasm filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
ddpm-church/README.md ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - pytorch
5
+ - diffusers
6
+ - unconditional-image-generation
7
+ ---
8
+
9
+ # Denoising Diffusion Probabilistic Models (DDPM)
10
+
11
+ **Paper**: [Denoising Diffusion Probabilistic Models](https://arxiv.org/abs/2006.11239)
12
+
13
+ **Authors**: Jonathan Ho, Ajay Jain, Pieter Abbeel
14
+
15
+ **Abstract**:
16
+
17
+ *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.*
18
+
19
+ ## Inference
20
+
21
+ **DDPM** models can use *discrete noise schedulers* such as:
22
+
23
+ - [scheduling_ddpm](https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_ddpm.py)
24
+ - [scheduling_ddim](https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_ddim.py)
25
+ - [scheduling_pndm](https://github.com/huggingface/diffusers/blob/main/src/diffusers/schedulers/scheduling_pndm.py)
26
+
27
+ for inference. Note that while the *ddpm* scheduler yields the highest quality, it also takes the longest.
28
+ For a good trade-off between quality and inference speed you might want to consider the *ddim* or *pndm* schedulers instead.
29
+
30
+ See the following code:
31
+
32
+ ```python
33
+ # !pip install diffusers
34
+ from diffusers import DDPMPipeline, DDIMPipeline, PNDMPipeline
35
+
36
+ model_id = "google/ddpm-church-256"
37
+
38
+ # load model and scheduler
39
+ ddpm = DDPMPipeline.from_pretrained(model_id) # you can replace DDPMPipeline with DDIMPipeline or PNDMPipeline for faster inference
40
+
41
+ # run pipeline in inference (sample random noise and denoise)
42
+ image = ddpm().images[0]
43
+
44
+
45
+ # save image
46
+ image.save("ddpm_generated_image.png")
47
+ ```
48
+
49
+ For more in-detail information, please have a look at the [official inference example](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/diffusers_intro.ipynb)
50
+
51
+ ## Training
52
+
53
+ If you want to train your own model, please have a look at the [official training example](https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/training_example.ipynb)
54
+
55
+ ## Samples
56
+ 1. ![sample_1](https://huggingface.co/google/ddpm-church-256/resolve/main/images/generated_image_0.png)
57
+ 2. ![sample_2](https://huggingface.co/google/ddpm-church-256/resolve/main/images/generated_image_1.png)
58
+ 3. ![sample_3](https://huggingface.co/google/ddpm-church-256/resolve/main/images/generated_image_2.png)
59
+ 4. ![sample_4](https://huggingface.co/google/ddpm-church-256/resolve/main/images/generated_image_3.png)
ddpm-church/config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "UNet2DModel",
3
+ "_diffusers_version": "0.0.4",
4
+ "act_fn": "silu",
5
+ "attention_head_dim": null,
6
+ "block_out_channels": [
7
+ 128,
8
+ 128,
9
+ 256,
10
+ 256,
11
+ 512,
12
+ 512
13
+ ],
14
+ "center_input_sample": false,
15
+ "down_block_types": [
16
+ "DownBlock2D",
17
+ "DownBlock2D",
18
+ "DownBlock2D",
19
+ "DownBlock2D",
20
+ "AttnDownBlock2D",
21
+ "DownBlock2D"
22
+ ],
23
+ "downsample_padding": 0,
24
+ "flip_sin_to_cos": false,
25
+ "freq_shift": 1,
26
+ "in_channels": 3,
27
+ "layers_per_block": 2,
28
+ "mid_block_scale_factor": 1,
29
+ "norm_eps": 1e-06,
30
+ "norm_num_groups": 32,
31
+ "out_channels": 3,
32
+ "sample_size": 256,
33
+ "time_embedding_type": "positional",
34
+ "up_block_types": [
35
+ "UpBlock2D",
36
+ "AttnUpBlock2D",
37
+ "UpBlock2D",
38
+ "UpBlock2D",
39
+ "UpBlock2D",
40
+ "UpBlock2D"
41
+ ]
42
+ }
ddpm-church/diffusion_pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3111c176c9848d8d9b91d6fb8e2aa2945c220845aced8f47efb44f9deadd412c
3
+ size 454853117
ddpm-church/images/generated_image_0.png ADDED
ddpm-church/images/generated_image_1.png ADDED

Git LFS Details

  • SHA256: 3c16b34ae5184b882e2a2a6a45e133dc1a7fa2a861d059cb1de2f8cf37b3f43e
  • Pointer size: 131 Bytes
  • Size of remote file: 116 kB
ddpm-church/images/generated_image_2.png ADDED
ddpm-church/images/generated_image_3.png ADDED

Git LFS Details

  • SHA256: e0e106608f23e13f532774226fac5e6e5ca974787b68ddc0169ab229ed249f74
  • Pointer size: 131 Bytes
  • Size of remote file: 122 kB
ddpm-church/model_index.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "DDPMPipeline",
3
+ "scheduler": [
4
+ "diffusers",
5
+ "DDPMScheduler"
6
+ ],
7
+ "unet": [
8
+ "diffusers",
9
+ "UNet2DModel"
10
+ ]
11
+ }
ddpm-church/scheduler_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "DDPMScheduler",
3
+ "_diffusers_version": "0.1.1",
4
+ "beta_end": 0.02,
5
+ "beta_schedule": "linear",
6
+ "beta_start": 0.0001,
7
+ "clip_sample": true,
8
+ "num_train_timesteps": 1000,
9
+ "trained_betas": null,
10
+ "variance_type": "fixed_small"
11
+ }