-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
84 lines (83 loc) · 3.4 KB
/
config.py
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
73
74
75
76
77
78
79
80
81
82
83
84
def get_config(task):
if task == "timbre_transfer":
return {
"output_dir": "timbre_transfer",
"output_num_files": 1,
"audio_prompt_file": "piano.wav",
"ap_ckpt": "pytorch_model.bin",
"ap_scale": 0.5,
"time_pooling": 2,
"freq_pooling": 2,
"guidance_scale": 7.5,
#######################################################
# You can change the positive_text_prompt whatever you like,
# But the negative_text_prompt should be the instrument in the
# original music.
"positive_text_prompt": [
["a recording of a violin solo"],
["a recording of an acoustic guitar solo"],
["a recording of a harp solo"]
],
"negative_text_prompt": ["a recording of a piano solo"]
#######################################################
}
elif task == "style_transfer":
return{
"output_dir": "style_transfer",
"output_num_files": 1,
"audio_prompt_file": "piano.wav",
"ap_ckpt": "pytorch_model.bin",
"ap_scale": 0.55,
"time_pooling": 4,
"freq_pooling": 4,
"guidance_scale": 9.5,
#######################################################
##### You can change the prompt whatever you like #####
"positive_text_prompt": [
["Jazz style music"],
["Rock style music"],
["Pop style music"]
],
"negative_text_prompt": ["Low quality"]
#######################################################
}
elif task == "accompaniment_generation":
return {
"output_dir": "accompaniment_generation",
"output_num_files": 1,
"audio_prompt_file": "piano.wav",
"ap_ckpt": "pytorch_model.bin",
"ap_scale": 0.5,
"time_pooling": 2,
"freq_pooling": 2,
"guidance_scale": 7.5,
#######################################################
# You can change the positive_text_prompt whatever you like,
# But the negative_text_prompt should be the instrument in the
# original music.
"positive_text_prompt": [
["Duet, Played with violin accompaniment"],
["Duet, Played with cello accompaniment"],
["Duet, Played with flute accompaniment"]
],
"negative_text_prompt": ["solo"]
#######################################################
}
elif task == "test":
return {
"output_dir": "test",
"output_num_files": 1,
"audio_prompt_file": "piano.wav",
"ap_ckpt": "pytorch_model.bin",
"ap_scale": 0.5,
"time_pooling": 2,
"freq_pooling": 2,
"guidance_scale": 7.5,
#######################################################
# You can change the positive_text_prompt whatever you like,
# But the negative_text_prompt should be the instrument in the
# original music.
"positive_text_prompt": [""],
"negative_text_prompt": [""]
#######################################################
}