File size: 1,585 Bytes
b2aaa70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
gpu_id: ""
seed: 10000
display: True
im_size: 512
aligned: True
background_enhance: True
face_upsample: True

diffusion:
  target: models.script_util.create_gaussian_diffusion
  params:
    steps: 1000
    learn_sigma: True
    sigma_small: False
    noise_schedule: linear
    use_kl: False
    predict_xstart: False
    rescale_timesteps: False
    rescale_learned_sigmas: True
    timestep_respacing: "250"

model:
  target: models.unet.UNetModel
  ckpt_path: ./weights/diffusion/iddpm_ffhq512_ema500000.pth
  params:
    image_size: 512
    in_channels: 3
    model_channels: 32
    out_channels: 6
    attention_resolutions: [32, 16, 8]
    dropout: 0
    channel_mult: [1, 2, 4, 8, 8, 16, 16]
    num_res_blocks: [1, 2, 2, 2, 2, 3, 4]
    conv_resample: True
    dims: 2
    use_fp16: False
    num_head_channels: 64
    use_scale_shift_norm: True
    resblock_updown: False
    use_new_attention_order: False

model_ir:
  target: models.swinir.SwinIR
  ckpt_path: ./weights/SwinIR/General_Face_ffhq512.pth
  params:
    img_size: 64
    patch_size: 1
    in_chans: 3
    embed_dim: 180
    depths: [6, 6, 6, 6, 6, 6, 6, 6]
    num_heads: [6, 6, 6, 6, 6, 6, 6, 6]
    window_size: 8
    mlp_ratio: 2
    sf: 8
    img_range: 1.0
    upsampler: "nearest+conv"
    resi_connection: "1conv"
    unshuffle: True
    unshuffle_scale: 8

# face detection model for unaligned face
detection:
  det_model: "YOLOv5l"  # large model: 'YOLOv5l', 'retinaface_resnet50'; small model: 'YOLOv5n', 'retinaface_mobile0.25'
  upscale: 2            # The final upscaling factor for the whole image