flavioschneider
commited on
Commit
•
c22200e
1
Parent(s):
5a6b14a
Upload config
Browse files- config.json +77 -0
- dmae_config.py +43 -0
config.json
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"attentions": [
|
3 |
+
0,
|
4 |
+
0,
|
5 |
+
0,
|
6 |
+
0,
|
7 |
+
0,
|
8 |
+
0,
|
9 |
+
0
|
10 |
+
],
|
11 |
+
"auto_map": {
|
12 |
+
"AutoConfig": "dmae_config.DMAE1dConfig"
|
13 |
+
},
|
14 |
+
"bottleneck": "tanh",
|
15 |
+
"channels": 512,
|
16 |
+
"encoder_channels": 32,
|
17 |
+
"encoder_factors": [
|
18 |
+
1,
|
19 |
+
1,
|
20 |
+
2,
|
21 |
+
2,
|
22 |
+
1,
|
23 |
+
1
|
24 |
+
],
|
25 |
+
"encoder_inject_depth": 3,
|
26 |
+
"encoder_multipliers": [
|
27 |
+
32,
|
28 |
+
16,
|
29 |
+
8,
|
30 |
+
8,
|
31 |
+
4,
|
32 |
+
2,
|
33 |
+
1
|
34 |
+
],
|
35 |
+
"encoder_num_blocks": [
|
36 |
+
4,
|
37 |
+
4,
|
38 |
+
4,
|
39 |
+
4,
|
40 |
+
4,
|
41 |
+
4
|
42 |
+
],
|
43 |
+
"factors": [
|
44 |
+
1,
|
45 |
+
2,
|
46 |
+
2,
|
47 |
+
2,
|
48 |
+
2,
|
49 |
+
2,
|
50 |
+
2
|
51 |
+
],
|
52 |
+
"in_channels": 2,
|
53 |
+
"model_type": "archinetai/dmae1d-ATC64-v1",
|
54 |
+
"multipliers": [
|
55 |
+
3,
|
56 |
+
2,
|
57 |
+
1,
|
58 |
+
1,
|
59 |
+
1,
|
60 |
+
1,
|
61 |
+
1,
|
62 |
+
1
|
63 |
+
],
|
64 |
+
"num_blocks": [
|
65 |
+
1,
|
66 |
+
1,
|
67 |
+
1,
|
68 |
+
2,
|
69 |
+
2,
|
70 |
+
2,
|
71 |
+
2
|
72 |
+
],
|
73 |
+
"stft_hop_length": 256,
|
74 |
+
"stft_num_fft": 1023,
|
75 |
+
"stft_use_complex": true,
|
76 |
+
"transformers_version": "4.24.0"
|
77 |
+
}
|
dmae_config.py
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import PretrainedConfig
|
2 |
+
from typing import Sequence
|
3 |
+
|
4 |
+
class DMAE1dConfig(PretrainedConfig):
|
5 |
+
|
6 |
+
model_type = "archinetai/dmae1d-ATC64-v1"
|
7 |
+
|
8 |
+
def __init__(
|
9 |
+
self,
|
10 |
+
in_channels: int = 2,
|
11 |
+
channels: int = 512,
|
12 |
+
multipliers: Sequence[int] = [3, 2, 1, 1, 1, 1, 1, 1],
|
13 |
+
factors: Sequence[int] = [1, 2, 2, 2, 2, 2, 2],
|
14 |
+
num_blocks: Sequence[int] = [1, 1, 1, 2, 2, 2, 2],
|
15 |
+
attentions: Sequence[int] = [0, 0, 0, 0, 0, 0, 0],
|
16 |
+
encoder_inject_depth: int = 3,
|
17 |
+
encoder_channels: int = 32,
|
18 |
+
encoder_factors: Sequence[int] = [1, 1, 2, 2, 1, 1],
|
19 |
+
encoder_multipliers: Sequence[int] = [32, 16, 8, 8, 4, 2, 1],
|
20 |
+
encoder_num_blocks: Sequence[int] = [4, 4, 4, 4, 4, 4],
|
21 |
+
bottleneck: str = 'tanh',
|
22 |
+
stft_use_complex: bool = True,
|
23 |
+
stft_num_fft: int = 1023,
|
24 |
+
stft_hop_length: int = 256,
|
25 |
+
**kwargs
|
26 |
+
):
|
27 |
+
self.in_channels = in_channels
|
28 |
+
self.channels = channels
|
29 |
+
self.multipliers = multipliers
|
30 |
+
self.factors = factors
|
31 |
+
self.num_blocks = num_blocks
|
32 |
+
self.attentions = attentions
|
33 |
+
self.encoder_inject_depth = encoder_inject_depth
|
34 |
+
self.encoder_channels = encoder_channels
|
35 |
+
self.encoder_factors = encoder_factors
|
36 |
+
self.encoder_multipliers = encoder_multipliers
|
37 |
+
self.encoder_num_blocks = encoder_num_blocks
|
38 |
+
self.bottleneck = bottleneck
|
39 |
+
self.stft_use_complex = stft_use_complex
|
40 |
+
self.stft_num_fft = stft_num_fft
|
41 |
+
self.stft_hop_length = stft_hop_length
|
42 |
+
super().__init__(**kwargs)
|
43 |
+
|