celebahq-ldm-vq-4.yaml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. model:
  2. base_learning_rate: 2.0e-06
  3. target: ldm.models.diffusion.ddpm.LatentDiffusion
  4. params:
  5. linear_start: 0.0015
  6. linear_end: 0.0195
  7. num_timesteps_cond: 1
  8. log_every_t: 200
  9. timesteps: 1000
  10. first_stage_key: image
  11. image_size: 64
  12. channels: 3
  13. monitor: val/loss_simple_ema
  14. unet_config:
  15. target: ldm.modules.diffusionmodules.openaimodel.UNetModel
  16. params:
  17. image_size: 64
  18. in_channels: 3
  19. out_channels: 3
  20. model_channels: 224
  21. attention_resolutions:
  22. # note: this isn\t actually the resolution but
  23. # the downsampling factor, i.e. this corresnponds to
  24. # attention on spatial resolution 8,16,32, as the
  25. # spatial reolution of the latents is 64 for f4
  26. - 8
  27. - 4
  28. - 2
  29. num_res_blocks: 2
  30. channel_mult:
  31. - 1
  32. - 2
  33. - 3
  34. - 4
  35. num_head_channels: 32
  36. first_stage_config:
  37. target: ldm.models.autoencoder.VQModelInterface
  38. params:
  39. embed_dim: 3
  40. n_embed: 8192
  41. ckpt_path: models/first_stage_models/vq-f4/model.ckpt
  42. ddconfig:
  43. double_z: false
  44. z_channels: 3
  45. resolution: 256
  46. in_channels: 3
  47. out_ch: 3
  48. ch: 128
  49. ch_mult:
  50. - 1
  51. - 2
  52. - 4
  53. num_res_blocks: 2
  54. attn_resolutions: []
  55. dropout: 0.0
  56. lossconfig:
  57. target: torch.nn.Identity
  58. cond_stage_config: __is_unconditional__
  59. data:
  60. target: main.DataModuleFromConfig
  61. params:
  62. batch_size: 48
  63. num_workers: 5
  64. wrap: false
  65. train:
  66. target: taming.data.faceshq.CelebAHQTrain
  67. params:
  68. size: 256
  69. validation:
  70. target: taming.data.faceshq.CelebAHQValidation
  71. params:
  72. size: 256
  73. lightning:
  74. callbacks:
  75. image_logger:
  76. target: main.ImageLogger
  77. params:
  78. batch_frequency: 5000
  79. max_images: 8
  80. increase_log_steps: False
  81. trainer:
  82. benchmark: True