hdparmar commited on
Commit
1a34ee6
1 Parent(s): feba05f

Upload spectrogram.yaml with huggingface_hub

Browse files
Files changed (1) hide show
  1. spectrogram.yaml +126 -0
spectrogram.yaml ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: [ 10000 ] # 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: hdparmar/irish-traditional-tunes
82
+ image_transforms:
83
+ - target: torchvision.transforms.RandomHorizontalFlip
84
+ validation:
85
+ target: ldm.data.simple.TextOnly
86
+ params:
87
+ captions:
88
+ - "An Irish Traditional tune with vibrant bouzouki strums"
89
+ - "An Irish Traditional Tune"
90
+ - "A traditional Irish slip jig rhythm"
91
+ - "A lively Irish Traditional Tune with a prominent fiddle lead"
92
+ output_size: 512
93
+ n_gpus: 2 # small hack to sure we see all our samples
94
+
95
+
96
+ lightning:
97
+ find_unused_parameters: False
98
+
99
+ modelcheckpoint:
100
+ params:
101
+ every_n_train_steps: 2000
102
+ save_top_k: -1
103
+ monitor: null
104
+
105
+ callbacks:
106
+ image_logger:
107
+ target: main.ImageLogger
108
+ params:
109
+ batch_frequency: 2000
110
+ max_images: 4
111
+ increase_log_steps: False
112
+ log_first_step: True
113
+ log_all_val: True
114
+ log_images_kwargs:
115
+ use_ema_scope: True
116
+ inpaint: False
117
+ plot_progressive_rows: False
118
+ plot_diffusion_rows: False
119
+ N: 4
120
+ unconditional_guidance_scale: 3.0
121
+ unconditional_guidance_label: [""]
122
+
123
+ trainer:
124
+ benchmark: True
125
+ num_sanity_val_steps: 0
126
+ accumulate_grad_batches: 1