File size: 1,913 Bytes
39fa6c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
891f85e
 
 
 
 
 
 
 
 
 
 
 
 
 
39fa6c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
tags:
  - diffusion
  - unconditional-image-generation
  - ddpm
  - diffusers
  - yi-script
library_name: diffusers
pipeline_tag: unconditional-image-generation
---

# Yi Syllable Diffusion

An unconditional **DDPM** that generates images of **Yi script syllables**
(Unicode block `U+A000``U+A48C`). Trained on 1,165 glyphs rendered from the
`NotoSansYi-Regular` font.

<p align="center">
  <img src="diffusion_process.gif" width="200" alt="denoising animation">
  <img src="diffusion_steps.gif" width="200" alt="quality vs inference steps">
</p>

Left: reverse diffusion (noise → glyph). Right: the same glyph sharpening as the
number of inference steps increases.

## Sample output

![real vs generated](real_vs_generated.png)

Top: real glyphs (font). Bottom: generated by this model.

## Usage

```python
from diffusers import DDPMPipeline
pipe = DDPMPipeline.from_pretrained("pratik220704/yi-syllable-diffusion").to("cuda")
image = pipe(num_inference_steps=50).images[0]
image.save("yi.png")
```

## Training data
1,165 grayscale 64×64 PNGs, one per Yi syllable, rendered with PIL from
`NotoSansYi-Regular.ttf`.

## Training procedure
- Architecture: `UNet2DModel` (diffusers), 1-channel in/out, ~17 M params.
- Noise schedule: cosine-beta DDPM (1000 steps) with **zero terminal SNR**.
- Objective: **v-prediction**.
- Sampler: `DDIMScheduler`, `timestep_spacing="trailing"`, `clip_sample=True`, 50 steps.
- Optimizer: AdamW, lr 1e-4, cosine LR warmup. Epochs: 10.

The zero-SNR + v-prediction recipe is what produces crisp black-on-white glyphs
(plain epsilon-prediction yields a grey haze). FID (full dataset) ≈ 108.6.

## Limitations
Unconditional — you cannot request a specific syllable. Quality is bounded by the
64 px resolution and short (10-epoch) training budget.

## License
Model weights: Apache-2.0. The Noto fonts are licensed under the SIL Open Font License.