README.md 1.2 KB
Newer Older
Anton Lozhkov's avatar
Anton Lozhkov committed
1
2
## Training examples

anton-l's avatar
anton-l committed
3
### Unconditional Flowers  
Anton Lozhkov's avatar
Anton Lozhkov committed
4
5
6
7

The command to train a DDPM UNet model on the Oxford Flowers dataset:

```bash
8
accelerate launch train_unconditional.py \
Anton Lozhkov's avatar
Anton Lozhkov committed
9
10
  --dataset="huggan/flowers-102-categories" \
  --resolution=64 \
11
12
  --output_dir="ddpm-ema-flowers-64" \
  --train_batch_size=16 \
Anton Lozhkov's avatar
Anton Lozhkov committed
13
14
  --num_epochs=100 \
  --gradient_accumulation_steps=1 \
15
16
17
18
  --learning_rate=1e-4 \
  --lr_warmup_steps=500 \
  --mixed_precision=no \
  --push_to_hub
Anton Lozhkov's avatar
Anton Lozhkov committed
19
20
```

anton-l's avatar
anton-l committed
21
A full training run takes 2 hours on 4xV100 GPUs.
Anton Lozhkov's avatar
Anton Lozhkov committed
22
23
24
25

<img src="https://user-images.githubusercontent.com/26864830/173855866-5628989f-856b-4725-a944-d6c09490b2df.png" width="500" />


anton-l's avatar
anton-l committed
26
### Unconditional Pokemon 
Anton Lozhkov's avatar
Anton Lozhkov committed
27
28
29
30

The command to train a DDPM UNet model on the Pokemon dataset:

```bash
31
accelerate launch train_unconditional.py \
Anton Lozhkov's avatar
Anton Lozhkov committed
32
33
  --dataset="huggan/pokemon" \
  --resolution=64 \
34
35
  --output_dir="ddpm-ema-pokemon-64" \
  --train_batch_size=16 \
Anton Lozhkov's avatar
Anton Lozhkov committed
36
37
  --num_epochs=100 \
  --gradient_accumulation_steps=1 \
38
39
40
41
  --learning_rate=1e-4 \
  --lr_warmup_steps=500 \
  --mixed_precision=no \
  --push_to_hub
Anton Lozhkov's avatar
Anton Lozhkov committed
42
43
```

anton-l's avatar
anton-l committed
44
A full training run takes 2 hours on 4xV100 GPUs.
Anton Lozhkov's avatar
Anton Lozhkov committed
45
46

<img src="https://user-images.githubusercontent.com/26864830/173856733-4f117f8c-97bd-4f51-8002-56b488c96df9.png" width="500" />