train_unet_ddpm.yaml

 1# train ae or vae
 2mode: test
 3rand_seed: 2024
 4model:
 5  ## DDIM or DDPM.
 6  name: DDPM
 7  num_steps: 1000
 8  sample_num_steps: 100
 9  beta_schedule: consine
10  eps_model:
11    # encoder config
12    time_channel: 128
13    encoder:
14      name: UNet
15      image_size: [28, 28]
16      in_channel: 1
17      patch_size: 1
18      down_channels: [32, 64]
19      middle_channels: [128, 128]
20      building_block: res
21      activation: silu
22      num_blocks: 2
23      normalization: group
24      num_norm_groups: 16
25      dropout: 0.1
26model_path: path/to/checkpoint/MNIST/DDPM/ckp_last.pth
27eval_gen:
28  ## generated results will be saved in `gen_dir`
29  gen_dir: path/to/results/gen/mnist/ddpm
30  ## define a normal sampler
31  sampler:
32    clipped: true
33    clip_range: [-1.0, 1.0]
34    num_sample_steps: 1000
35  ## number of generated results
36  random_sample_num: 100