crab27 commited on
Commit
b48dd40
·
verified ·
1 Parent(s): 2a90a97

Upload DDPM landscape pipeline

Browse files
README.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - diffusers
5
+ - ddpm
6
+ - unconditional-image-generation
7
+ library_name: diffusers
8
+ pipeline_tag: unconditional-image-generation
9
+ ---
10
+
11
+ # ddpm-landscape
12
+
13
+ A DDPM model fine-tuned to generate 256x256 landscape images.
14
+
15
+ ## Usage
16
+
17
+ ```python
18
+ # !pip install diffusers
19
+ from diffusers import DDPMPipeline, DDIMPipeline, PNDMPipeline
20
+
21
+ model_id = "crab27/ddpm-landscape"
22
+
23
+ # load model and scheduler
24
+ ddpm = DDPMPipeline.from_pretrained(model_id) # you can replace DDPMPipeline with DDIMPipeline or PNDMPipeline for faster inference
25
+
26
+ # run pipeline in inference (sample random noise and denoise)
27
+ image = ddpm().images[0]
28
+
29
+ # save image
30
+ image.save("ddpm_generated_image.png")
31
+ ```
model_index.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "DDPMPipeline",
3
+ "_diffusers_version": "0.38.0",
4
+ "scheduler": [
5
+ "diffusers",
6
+ "DDPMScheduler"
7
+ ],
8
+ "unet": [
9
+ "diffusers",
10
+ "UNet2DModel"
11
+ ]
12
+ }
scheduler/scheduler_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "DDPMScheduler",
3
+ "_diffusers_version": "0.38.0",
4
+ "beta_end": 0.02,
5
+ "beta_schedule": "linear",
6
+ "beta_start": 0.0001,
7
+ "clip_sample": true,
8
+ "clip_sample_range": 1.0,
9
+ "dynamic_thresholding_ratio": 0.995,
10
+ "num_train_timesteps": 1000,
11
+ "prediction_type": "epsilon",
12
+ "rescale_betas_zero_snr": false,
13
+ "sample_max_value": 1.0,
14
+ "steps_offset": 0,
15
+ "thresholding": false,
16
+ "timestep_spacing": "leading",
17
+ "trained_betas": null,
18
+ "variance_type": "fixed_small"
19
+ }
unet/config.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "UNet2DModel",
3
+ "_diffusers_version": "0.38.0",
4
+ "_name_or_path": "google/ddpm-church-256",
5
+ "act_fn": "silu",
6
+ "add_attention": true,
7
+ "attention_head_dim": null,
8
+ "attn_norm_num_groups": null,
9
+ "block_out_channels": [
10
+ 128,
11
+ 128,
12
+ 256,
13
+ 256,
14
+ 512,
15
+ 512
16
+ ],
17
+ "center_input_sample": false,
18
+ "class_embed_type": null,
19
+ "down_block_types": [
20
+ "DownBlock2D",
21
+ "DownBlock2D",
22
+ "DownBlock2D",
23
+ "DownBlock2D",
24
+ "AttnDownBlock2D",
25
+ "DownBlock2D"
26
+ ],
27
+ "downsample_padding": 0,
28
+ "downsample_type": "conv",
29
+ "dropout": 0.0,
30
+ "flip_sin_to_cos": false,
31
+ "freq_shift": 1,
32
+ "in_channels": 3,
33
+ "layers_per_block": 2,
34
+ "mid_block_scale_factor": 1,
35
+ "mid_block_type": "UNetMidBlock2D",
36
+ "norm_eps": 1e-06,
37
+ "norm_num_groups": 32,
38
+ "num_class_embeds": null,
39
+ "num_train_timesteps": null,
40
+ "out_channels": 3,
41
+ "resnet_time_scale_shift": "default",
42
+ "sample_size": 256,
43
+ "time_embedding_dim": null,
44
+ "time_embedding_type": "positional",
45
+ "up_block_types": [
46
+ "UpBlock2D",
47
+ "AttnUpBlock2D",
48
+ "UpBlock2D",
49
+ "UpBlock2D",
50
+ "UpBlock2D",
51
+ "UpBlock2D"
52
+ ],
53
+ "upsample_type": "conv"
54
+ }
unet/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5733532484c28d6c547aecd5f038515b510d1a584226da463989a78f478d8f52
3
+ size 454741108