RoryCochrane commited on
Commit
d603468
1 Parent(s): 5d7adf6

Upload config with huggingface_hub

Browse files
Files changed (1) hide show
  1. config +133 -0
config ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model:
2
+ base_learning_rate: 1.0e-04
3
+ target: ldm.models.diffusion.ddpm.LatentDiffusion
4
+ params:
5
+ linear_start: 0.00085
6
+ linear_end: 0.0120
7
+ num_timesteps_cond: 1
8
+ log_every_t: 200
9
+ timesteps: 1000
10
+ first_stage_key: "image"
11
+ cond_stage_key: "txt"
12
+ image_size: 64
13
+ channels: 4
14
+ cond_stage_trainable: false # Note: different from the one we trained before
15
+ conditioning_key: crossattn
16
+ scale_factor: 0.18215
17
+
18
+ scheduler_config: # 10000 warmup steps
19
+ target: ldm.lr_scheduler.LambdaLinearScheduler
20
+ params:
21
+ warm_up_steps: [ 1 ] # NOTE for resuming. use 10000 if starting from scratch
22
+ cycle_lengths: [ 10000000000000 ] # incredibly large number to prevent corner cases
23
+ f_start: [ 1.e-6 ]
24
+ f_max: [ 1. ]
25
+ f_min: [ 1. ]
26
+
27
+ unet_config:
28
+ target: ldm.modules.diffusionmodules.openaimodel.UNetModel
29
+ params:
30
+ image_size: 32 # unused
31
+ in_channels: 4
32
+ out_channels: 4
33
+ model_channels: 320
34
+ attention_resolutions: [ 4, 2, 1 ]
35
+ num_res_blocks: 2
36
+ channel_mult: [ 1, 2, 4, 4 ]
37
+ num_heads: 8
38
+ use_spatial_transformer: True
39
+ transformer_depth: 1
40
+ context_dim: 768
41
+ use_checkpoint: True
42
+ legacy: False
43
+
44
+ first_stage_config:
45
+ target: ldm.models.autoencoder.AutoencoderKL
46
+ ckpt_path: "models/first_stage_models/kl-f8/model.ckpt"
47
+ params:
48
+ embed_dim: 4
49
+ monitor: val/rec_loss
50
+ ddconfig:
51
+ double_z: true
52
+ z_channels: 4
53
+ resolution: 256
54
+ in_channels: 3
55
+ out_ch: 3
56
+ ch: 128
57
+ ch_mult:
58
+ - 1
59
+ - 2
60
+ - 4
61
+ - 4
62
+ num_res_blocks: 2
63
+ attn_resolutions: []
64
+ dropout: 0.0
65
+ lossconfig:
66
+ target: torch.nn.Identity
67
+
68
+ cond_stage_config:
69
+ target: ldm.modules.encoders.modules.FrozenCLIPEmbedder
70
+
71
+
72
+ data:
73
+ target: main.DataModuleFromConfig
74
+ params:
75
+ batch_size: 4
76
+ num_workers: 4
77
+ num_val_workers: 0 # Avoid a weird val dataloader issue
78
+ train:
79
+ target: ldm.data.simple.hf_dataset
80
+ params:
81
+ name: RoryCochrane/fakemon-dataset
82
+ image_transforms:
83
+ - target: torchvision.transforms.Resize
84
+ params:
85
+ size: 512
86
+ interpolation: 3
87
+ - target: torchvision.transforms.RandomCrop
88
+ params:
89
+ size: 512
90
+ - target: torchvision.transforms.RandomHorizontalFlip
91
+ validation:
92
+ target: ldm.data.simple.TextOnly
93
+ params:
94
+ captions:
95
+ - "A pokemon with green eyes, large wings, and a hat"
96
+ - "A cute bunny rabbit"
97
+ - "Yoda"
98
+ - "An epic landscape photo of a mountain"
99
+ output_size: 512
100
+ n_gpus: 2 # small hack to sure we see all our samples
101
+
102
+
103
+ lightning:
104
+ find_unused_parameters: False
105
+
106
+ modelcheckpoint:
107
+ params:
108
+ every_n_train_steps: 2000
109
+ save_top_k: -1
110
+ monitor: null
111
+
112
+ callbacks:
113
+ image_logger:
114
+ target: main.ImageLogger
115
+ params:
116
+ batch_frequency: 2000
117
+ max_images: 4
118
+ increase_log_steps: False
119
+ log_first_step: True
120
+ log_all_val: True
121
+ log_images_kwargs:
122
+ use_ema_scope: True
123
+ inpaint: False
124
+ plot_progressive_rows: False
125
+ plot_diffusion_rows: False
126
+ N: 4
127
+ unconditional_guidance_scale: 3.0
128
+ unconditional_guidance_label: [""]
129
+
130
+ trainer:
131
+ benchmark: True
132
+ num_sanity_val_steps: 0
133
+ accumulate_grad_batches: 1