File size: 2,043 Bytes
b48dd40
 
 
 
 
 
25045f7
b48dd40
 
 
 
 
 
25045f7
b48dd40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25045f7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
license: mit
tags:
  - diffusers
  - ddpm
  - unconditional-image-generation
  - landscape
library_name: diffusers
pipeline_tag: unconditional-image-generation
---

# ddpm-landscape

A 256x256 unconditional DDPM that generates natural landscape images. Full fine-tune of [`google/ddpm-church-256`](https://huggingface.co/google/ddpm-church-256) on the **Landscapes HQ (LHQ)** dataset.

## Usage

```python
# !pip install diffusers
from diffusers import DDPMPipeline, DDIMPipeline, PNDMPipeline

model_id = "crab27/ddpm-landscape"

# load model and scheduler
ddpm = DDPMPipeline.from_pretrained(model_id)  # you can replace DDPMPipeline with DDIMPipeline or PNDMPipeline for faster inference

# run pipeline in inference (sample random noise and denoise)
image = ddpm().images[0]

# save image
image.save("ddpm_generated_image.png")
```

## Base model

- **`google/ddpm-church-256`** — original 256x256 DDPM by Ho et al. All credit for the base architecture and pretrained weights goes to the original authors.

## Dataset

- **Landscapes HQ (LHQ)**, 256x256 split, from *ALIS — Aligning Latent and Image Spaces to Connect the Unconnectable* (Skorokhodov et al., 2021).
- Project / data: https://github.com/universome/alis

```bibtex
@article{ALIS,
  title   = {Aligning Latent and Image Spaces to Connect the Unconnectable},
  author  = {Skorokhodov, Ivan and Sotnikov, Grigorii and Elhoseiny, Mohamed},
  journal = {arXiv preprint arXiv:2104.06954},
  year    = {2021}
}
```

## Fine-tuning

| | |
|---|---|
| Base model | `google/ddpm-church-256` |
| Dataset | LHQ (256x256) |
| Epochs | 50 |
| Batch size | 32 |
| Optimizer | AdamW |
| Learning rate | 1e-5 (cosine schedule, 500 warmup steps) |
| Loss | MSE on predicted noise |
| Augmentation | Random horizontal flip |

## Acknowledgements

- Base weights: Google / the original DDPM authors (Ho, Jain, Abbeel, 2020).
- Dataset: Skorokhodov et al., authors of ALIS / LHQ — https://github.com/universome/alis
- Built with [`diffusers`](https://github.com/huggingface/diffusers).