-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathconfig_training.py
More file actions
72 lines (41 loc) · 1.97 KB
/
Copy pathconfig_training.py
File metadata and controls
72 lines (41 loc) · 1.97 KB
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
66
67
68
69
70
71
72
def get_config():
return {
# Load files and checkpoints
"condition_type": ["melody"], #"melody", "rhythm", "dynamics", "audio"
"meta_data_path": "./ALL_condition_wo_SDD.json",
"audio_data_dir": "../mtg_full_47s",
"audio_codec_root": "../mtg_full_47s_codec",
"output_dir": "./checkpoints/stable_audio_melody_wo_SDD",
"transformer_ckpt": None, #"./checkpoints/stable_audio_melody_wo_SDD/checkpoint-5000/model_1.safetensors",
"extractor_ckpt": {
# "dynamics": "./checkpoints/110000_musical_44000_audio/model_1.safetensors",
# "melody": "./checkpoints/stable_audio_melody_wo_SDD/checkpoint-5000/model.safetensors",
# "rhythm": "./checkpoints/110000_musical_44000_audio/model_2.safetensors",
},
"wand_run_name": "test",
# training hyperparameters
"GPU_id" : "0",
"train_batch_size": 8,
"learning_rate": 1e-4,
"attn_processor_type": "rotary", # "rotary", "rotary_conv_in", "absolute"
"gradient_accumulation_steps": 4,
"max_train_steps": 200000,
"num_train_epochs": 20,
"dataloader_num_workers": 16,
"mixed_precision": "fp16", #["no", "fp16", "bf16"]
"apadapter": True,
"lr_scheduler": "constant", # ["linear", "cosine", "cosine_with_restarts", "polynomial", "constant", "constant_with_warmup"]'
"weight_decay": 1e-2,
#config for validation
"validation_num": 1000,
"test_num": 5,
"ap_scale": 1.0,
"guidance_scale_text": 7.0,
"guidance_scale_con": 1.5, # The separated guidance for both Musical attribute and audio conditions. Note that if guidance scale is too large, the audio quality will be bad. Values between 0.5~2.0 is recommended.
"checkpointing_steps": 500,
"validation_steps": 500,
"denoise_step": 50,
"log_first": False,
"sigma_min": 0.3,
"sigma_max": 500,
}