Roi Feng commited on
Commit
2e9bf0c
1 Parent(s): 14dc496
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .idea/.name +1 -0
  2. .idea/workspace.xml +202 -0
  3. .pre-commit-config.yaml +3 -3
  4. README.md +42 -12
  5. app.py +0 -229
  6. bert/bert-base-japanese-v3/.gitattributes +34 -0
  7. bert/bert-large-japanese-v2/.gitattributes +34 -0
  8. bert/bert-large-japanese-v2/README.md +53 -0
  9. bert/bert-large-japanese-v2/config.json +19 -0
  10. bert/bert-large-japanese-v2/flax_model.msgpack +3 -0
  11. bert/bert-large-japanese-v2/pytorch_model.bin +3 -0
  12. bert/bert-large-japanese-v2/tf_model.h5 +3 -0
  13. bert/bert-large-japanese-v2/tokenizer_config.json +10 -0
  14. bert/bert-large-japanese-v2/vocab.txt +0 -0
  15. bert/bert_models.json +14 -0
  16. bert/chinese-roberta-wwm-ext-large/.gitignore +0 -1
  17. bert/deberta-v2-large-japanese-char-wwm/.gitattributes +34 -0
  18. bert/deberta-v2-large-japanese-char-wwm/README.md +89 -0
  19. bert/deberta-v2-large-japanese-char-wwm/config.json +37 -0
  20. bert/deberta-v2-large-japanese-char-wwm/model.safetensors +3 -0
  21. bert/deberta-v2-large-japanese-char-wwm/pytorch_model.bin +3 -0
  22. bert/deberta-v2-large-japanese-char-wwm/special_tokens_map.json +7 -0
  23. bert/deberta-v2-large-japanese-char-wwm/tokenizer_config.json +19 -0
  24. bert/deberta-v2-large-japanese-char-wwm/vocab.txt +0 -0
  25. bert/deberta-v2-large-japanese/.gitattributes +34 -0
  26. bert/deberta-v2-large-japanese/README.md +111 -0
  27. bert/deberta-v2-large-japanese/config.json +38 -0
  28. bert/deberta-v2-large-japanese/model.safetensors +3 -0
  29. bert/deberta-v2-large-japanese/pytorch_model.bin +3 -0
  30. bert/deberta-v2-large-japanese/special_tokens_map.json +9 -0
  31. logs/hanser/G_9000_2nd.pth → bert/deberta-v2-large-japanese/spm.model +2 -2
  32. bert/deberta-v2-large-japanese/tokenizer.json +0 -0
  33. bert/deberta-v2-large-japanese/tokenizer_config.json +15 -0
  34. bert/deberta-v3-large/.gitattributes +27 -0
  35. bert/deberta-v3-large/README.md +93 -0
  36. bert/deberta-v3-large/config.json +22 -0
  37. bert/deberta-v3-large/generator_config.json +22 -0
  38. logs/hanser/G_26000.pth → bert/deberta-v3-large/pytorch_model.bin +2 -2
  39. logs/hanser/G_8000.pth → bert/deberta-v3-large/pytorch_model.generator.bin +2 -2
  40. bert/deberta-v3-large/spm.model +3 -0
  41. bert/deberta-v3-large/tf_model.h5 +3 -0
  42. bert/deberta-v3-large/tokenizer_config.json +4 -0
  43. bert_gen.py +32 -17
  44. clap_gen.py +64 -0
  45. clap_wrapper.py +49 -0
  46. commons.py +6 -8
  47. compress_model.py +89 -0
  48. config.py +248 -0
  49. configs/config.json +868 -10
  50. css/custom.css +18 -0
.idea/.name ADDED
@@ -0,0 +1 @@
 
 
1
+ infer.py
.idea/workspace.xml ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
6
+ <component name="ChangeListManager">
7
+ <list default="true" id="57daa15b-1002-473f-a1f9-e5d1a7c43662" name="更改" comment="new 2.2" />
8
+ <option name="SHOW_DIALOG" value="false" />
9
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
11
+ <option name="LAST_RESOLUTION" value="IGNORE" />
12
+ </component>
13
+ <component name="Git.Settings">
14
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
15
+ <option name="RESET_MODE" value="HARD" />
16
+ </component>
17
+ <component name="MarkdownSettingsMigration">
18
+ <option name="stateVersion" value="1" />
19
+ </component>
20
+ <component name="ProjectColorInfo">{
21
+ &quot;associatedIndex&quot;: 0
22
+ }</component>
23
+ <component name="ProjectId" id="2Wh18f8c0EzBeG8Gv7V4qN17QRN" />
24
+ <component name="ProjectLevelVcsManager">
25
+ <ConfirmationsSetting value="2" id="Add" />
26
+ </component>
27
+ <component name="ProjectViewState">
28
+ <option name="hideEmptyMiddlePackages" value="true" />
29
+ <option name="showLibraryContents" value="true" />
30
+ </component>
31
+ <component name="PropertiesComponent"><![CDATA[{
32
+ "keyToString": {
33
+ "ASKED_ADD_EXTERNAL_FILES": "true",
34
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
35
+ "RunOnceActivity.ShowReadmeOnStart": "true",
36
+ "WebServerToolWindowFactoryState": "false",
37
+ "last_opened_file_path": "D:/AI/hanser-tts/git/huggingface/hanser-Bert-VITS2",
38
+ "node.js.detected.package.eslint": "true",
39
+ "node.js.detected.package.tslint": "true",
40
+ "node.js.selected.package.eslint": "(autodetect)",
41
+ "node.js.selected.package.tslint": "(autodetect)",
42
+ "nodejs_package_manager_path": "npm",
43
+ "settings.editor.selected.configurable": "project.propVCSSupport.CommitDialog",
44
+ "vue.rearranger.settings.migration": "true"
45
+ }
46
+ }]]></component>
47
+ <component name="SharedIndexes">
48
+ <attachedChunks>
49
+ <set>
50
+ <option value="bundled-python-sdk-7a29c1521ef0-c986f194a52a-com.jetbrains.pycharm.pro.sharedIndexes.bundled-PY-233.11799.298" />
51
+ </set>
52
+ </attachedChunks>
53
+ </component>
54
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
55
+ <component name="TaskManager">
56
+ <task active="true" id="Default" summary="默认任务">
57
+ <changelist id="57daa15b-1002-473f-a1f9-e5d1a7c43662" name="更改" comment="" />
58
+ <created>1697169839670</created>
59
+ <option name="number" value="Default" />
60
+ <option name="presentableId" value="Default" />
61
+ <updated>1697169839670</updated>
62
+ <workItem from="1697169840726" duration="1501000" />
63
+ <workItem from="1697171613511" duration="10000" />
64
+ <workItem from="1697171658870" duration="123000" />
65
+ <workItem from="1697407390249" duration="56000" />
66
+ <workItem from="1697408996084" duration="639000" />
67
+ <workItem from="1697521636207" duration="44000" />
68
+ <workItem from="1697945418812" duration="55000" />
69
+ <workItem from="1697946142695" duration="24000" />
70
+ <workItem from="1697946175706" duration="3000" />
71
+ <workItem from="1697946610680" duration="1000" />
72
+ <workItem from="1697947997308" duration="58000" />
73
+ <workItem from="1698505506621" duration="10000" />
74
+ <workItem from="1702591070149" duration="1513000" />
75
+ <workItem from="1702592634434" duration="187000" />
76
+ <workItem from="1702592831699" duration="1603000" />
77
+ <workItem from="1702594451453" duration="141000" />
78
+ <workItem from="1702688265810" duration="124000" />
79
+ </task>
80
+ <task id="LOCAL-00001" summary="initialize hanser">
81
+ <option name="closed" value="true" />
82
+ <created>1697170034064</created>
83
+ <option name="number" value="00001" />
84
+ <option name="presentableId" value="LOCAL-00001" />
85
+ <option name="project" value="LOCAL" />
86
+ <updated>1697170034064</updated>
87
+ </task>
88
+ <task id="LOCAL-00002" summary="initialize hanser">
89
+ <option name="closed" value="true" />
90
+ <created>1697171752499</created>
91
+ <option name="number" value="00002" />
92
+ <option name="presentableId" value="LOCAL-00002" />
93
+ <option name="project" value="LOCAL" />
94
+ <updated>1697171752499</updated>
95
+ </task>
96
+ <task id="LOCAL-00003" summary="new model 26000">
97
+ <option name="closed" value="true" />
98
+ <created>1697407426756</created>
99
+ <option name="number" value="00003" />
100
+ <option name="presentableId" value="LOCAL-00003" />
101
+ <option name="project" value="LOCAL" />
102
+ <updated>1697407426756</updated>
103
+ </task>
104
+ <task id="LOCAL-00004" summary="add new acknowledge">
105
+ <option name="closed" value="true" />
106
+ <created>1697521672965</created>
107
+ <option name="number" value="00004" />
108
+ <option name="presentableId" value="LOCAL-00004" />
109
+ <option name="project" value="LOCAL" />
110
+ <updated>1697521672965</updated>
111
+ </task>
112
+ <task id="LOCAL-00005" summary="add new 2nd generation 9000 model">
113
+ <option name="closed" value="true" />
114
+ <created>1697945452959</created>
115
+ <option name="number" value="00005" />
116
+ <option name="presentableId" value="LOCAL-00005" />
117
+ <option name="project" value="LOCAL" />
118
+ <updated>1697945452959</updated>
119
+ </task>
120
+ <task id="LOCAL-00006" summary="fix new 2nd generation 9000 model">
121
+ <option name="closed" value="true" />
122
+ <created>1697946163919</created>
123
+ <option name="number" value="00006" />
124
+ <option name="presentableId" value="LOCAL-00006" />
125
+ <option name="project" value="LOCAL" />
126
+ <updated>1697946163919</updated>
127
+ </task>
128
+ <task id="LOCAL-00007" summary="new default speech text">
129
+ <option name="closed" value="true" />
130
+ <created>1697948048951</created>
131
+ <option name="number" value="00007" />
132
+ <option name="presentableId" value="LOCAL-00007" />
133
+ <option name="project" value="LOCAL" />
134
+ <updated>1697948048951</updated>
135
+ </task>
136
+ <task id="LOCAL-00008" summary="new 2.2 model">
137
+ <option name="closed" value="true" />
138
+ <created>1702591884134</created>
139
+ <option name="number" value="00008" />
140
+ <option name="presentableId" value="LOCAL-00008" />
141
+ <option name="project" value="LOCAL" />
142
+ <updated>1702591884134</updated>
143
+ </task>
144
+ <task id="LOCAL-00009" summary="new 2.2">
145
+ <option name="closed" value="true" />
146
+ <created>1702592975256</created>
147
+ <option name="number" value="00009" />
148
+ <option name="presentableId" value="LOCAL-00009" />
149
+ <option name="project" value="LOCAL" />
150
+ <updated>1702592975256</updated>
151
+ </task>
152
+ <task id="LOCAL-00010" summary="new 2.2 part 1">
153
+ <option name="closed" value="true" />
154
+ <created>1702594098010</created>
155
+ <option name="number" value="00010" />
156
+ <option name="presentableId" value="LOCAL-00010" />
157
+ <option name="project" value="LOCAL" />
158
+ <updated>1702594098010</updated>
159
+ </task>
160
+ <option name="localTasksCounter" value="11" />
161
+ <servers />
162
+ </component>
163
+ <component name="TypeScriptGeneratedFilesManager">
164
+ <option name="version" value="3" />
165
+ </component>
166
+ <component name="Vcs.Log.Tabs.Properties">
167
+ <option name="TAB_STATES">
168
+ <map>
169
+ <entry key="MAIN">
170
+ <value>
171
+ <State>
172
+ <option name="FILTERS">
173
+ <map>
174
+ <entry key="branch">
175
+ <value>
176
+ <list>
177
+ <option value="main" />
178
+ </list>
179
+ </value>
180
+ </entry>
181
+ </map>
182
+ </option>
183
+ </State>
184
+ </value>
185
+ </entry>
186
+ </map>
187
+ </option>
188
+ </component>
189
+ <component name="VcsManagerConfiguration">
190
+ <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
191
+ <MESSAGE value="initialize hanser" />
192
+ <MESSAGE value="new model 26000" />
193
+ <MESSAGE value="add new acknowledge" />
194
+ <MESSAGE value="add new 2nd generation 9000 model" />
195
+ <MESSAGE value="fix new 2nd generation 9000 model" />
196
+ <MESSAGE value="new default speech text" />
197
+ <MESSAGE value="new 2.2 model" />
198
+ <MESSAGE value="new 2.2" />
199
+ <MESSAGE value="new 2.2 part 1" />
200
+ <option name="LAST_COMMIT_MESSAGE" value="new 2.2 part 1" />
201
+ </component>
202
+ </project>
.pre-commit-config.yaml CHANGED
@@ -1,19 +1,19 @@
1
  repos:
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v4.4.0
4
  hooks:
5
  - id: check-yaml
6
  - id: end-of-file-fixer
7
  - id: trailing-whitespace
8
 
9
  - repo: https://github.com/astral-sh/ruff-pre-commit
10
- rev: v0.0.292
11
  hooks:
12
  - id: ruff
13
  args: [ --fix ]
14
 
15
  - repo: https://github.com/psf/black
16
- rev: 23.9.1
17
  hooks:
18
  - id: black
19
 
 
1
  repos:
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.5.0
4
  hooks:
5
  - id: check-yaml
6
  - id: end-of-file-fixer
7
  - id: trailing-whitespace
8
 
9
  - repo: https://github.com/astral-sh/ruff-pre-commit
10
+ rev: v0.1.7
11
  hooks:
12
  - id: ruff
13
  args: [ --fix ]
14
 
15
  - repo: https://github.com/psf/black
16
+ rev: 23.11.0
17
  hooks:
18
  - id: black
19
 
README.md CHANGED
@@ -1,12 +1,42 @@
1
- ---
2
- title: AI Hanser
3
- emoji: 📊
4
- colorFrom: yellow
5
- colorTo: indigo
6
- sdk: gradio
7
- sdk_version: 3.47.1
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+
3
+ <img alt="LOGO" src="https://cdn.jsdelivr.net/gh/fishaudio/fish-diffusion@main/images/logo_512x512.png" width="256" height="256" />
4
+
5
+ # Bert-VITS2
6
+
7
+ VITS2 Backbone with multilingual bert
8
+
9
+ For quick guide, please refer to `webui_preprocess.py`.
10
+
11
+ 简易教程请参见 `webui_preprocess.py`。
12
+
13
+ ## 请注意,本项目核心思路来源于[anyvoiceai/MassTTS](https://github.com/anyvoiceai/MassTTS) 一个非常好的tts项目
14
+ ## MassTTS的演示demo为[ai版峰哥锐评峰哥本人,并找回了在金三角失落的腰子](https://www.bilibili.com/video/BV1w24y1c7z9)
15
+
16
+ [//]: # (## 本项目与[PlayVoice/vits_chinese]&#40;https://github.com/PlayVoice/vits_chinese&#41; 没有任何关系)
17
+
18
+ [//]: # ()
19
+ [//]: # (本仓库来源于之前朋友分享了ai峰哥的视频,本人被其中的效果惊艳,在自己尝试MassTTS以后发现fs在音质方面与vits有一定差距,并且training的pipeline比vits更复杂,因此按照其思路将bert)
20
+
21
+ ## 成熟的旅行者/开拓者/舰长/博士/sensei/猎魔人/喵喵露/V应当参阅代码自己学习如何训练。
22
+
23
+ ### 严禁将此项目用于一切违反《中华人民共和国宪法》,《中华人民共和国刑法》,《中华人民共和国治安管理处罚法》和《中华人民共和国民法典》之用途。
24
+ ### 严禁用于任何政治相关用途。
25
+ #### Video:https://www.bilibili.com/video/BV1hp4y1K78E
26
+ #### Demo:https://www.bilibili.com/video/BV1TF411k78w
27
+ #### QQ Group:815818430
28
+ ## References
29
+ + [anyvoiceai/MassTTS](https://github.com/anyvoiceai/MassTTS)
30
+ + [jaywalnut310/vits](https://github.com/jaywalnut310/vits)
31
+ + [p0p4k/vits2_pytorch](https://github.com/p0p4k/vits2_pytorch)
32
+ + [svc-develop-team/so-vits-svc](https://github.com/svc-develop-team/so-vits-svc)
33
+ + [PaddlePaddle/PaddleSpeech](https://github.com/PaddlePaddle/PaddleSpeech)
34
+ + [emotional-vits](https://github.com/innnky/emotional-vits)
35
+ + [Bert-VITS2-en](https://github.com/xwan07017/Bert-VITS2-en)
36
+ + [Bert-VITS2-UI](https://github.com/jiangyuxiaoxiao/Bert-VITS2-UI)
37
+ ## 感谢所有贡献者作出的努力
38
+ <a href="https://github.com/fishaudio/Bert-VITS2/graphs/contributors" target="_blank">
39
+ <img src="https://contrib.rocks/image?repo=fishaudio/Bert-VITS2"/>
40
+ </a>
41
+
42
+ [//]: # (# 本项目所有代码引用均已写明,bert部分代码思路来源于[AI峰哥]&#40;https://www.bilibili.com/video/BV1w24y1c7z9&#41;,与[vits_chinese]&#40;https://github.com/PlayVoice/vits_chinese&#41;无任何关系。欢迎各位查阅代码。同时,我们也对该开发者的[碰瓷,乃至开盒开发者的行为]&#40;https://www.bilibili.com/read/cv27101514/&#41;表示强烈谴责。)
app.py DELETED
@@ -1,229 +0,0 @@
1
- # flake8: noqa: E402
2
-
3
- import sys, os
4
- import logging
5
-
6
- logging.getLogger("numba").setLevel(logging.WARNING)
7
- logging.getLogger("markdown_it").setLevel(logging.WARNING)
8
- logging.getLogger("urllib3").setLevel(logging.WARNING)
9
- logging.getLogger("matplotlib").setLevel(logging.WARNING)
10
-
11
- logging.basicConfig(
12
- level=logging.INFO, format="| %(name)s | %(levelname)s | %(message)s"
13
- )
14
-
15
- logger = logging.getLogger(__name__)
16
-
17
- import torch
18
- import argparse
19
- import commons
20
- import utils
21
- from models import SynthesizerTrn
22
- from text.symbols import symbols
23
- from text import cleaned_text_to_sequence, get_bert
24
- from text.cleaner import clean_text
25
- import gradio as gr
26
- import webbrowser
27
- import numpy as np
28
-
29
- net_g = None
30
-
31
- if sys.platform == "darwin" and torch.backends.mps.is_available():
32
- device = "mps"
33
- os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1"
34
- else:
35
- device = "cuda"
36
-
37
-
38
- def get_text(text, language_str, hps):
39
- norm_text, phone, tone, word2ph = clean_text(text, language_str)
40
- phone, tone, language = cleaned_text_to_sequence(phone, tone, language_str)
41
-
42
- if hps.data.add_blank:
43
- phone = commons.intersperse(phone, 0)
44
- tone = commons.intersperse(tone, 0)
45
- language = commons.intersperse(language, 0)
46
- for i in range(len(word2ph)):
47
- word2ph[i] = word2ph[i] * 2
48
- word2ph[0] += 1
49
- bert = get_bert(norm_text, word2ph, language_str, device)
50
- del word2ph
51
- assert bert.shape[-1] == len(phone), phone
52
-
53
- if language_str == "ZH":
54
- bert = bert
55
- ja_bert = torch.zeros(768, len(phone))
56
- elif language_str == "JP":
57
- ja_bert = bert
58
- bert = torch.zeros(1024, len(phone))
59
- else:
60
- bert = torch.zeros(1024, len(phone))
61
- ja_bert = torch.zeros(768, len(phone))
62
-
63
- assert bert.shape[-1] == len(
64
- phone
65
- ), f"Bert seq len {bert.shape[-1]} != {len(phone)}"
66
-
67
- phone = torch.LongTensor(phone)
68
- tone = torch.LongTensor(tone)
69
- language = torch.LongTensor(language)
70
- return bert, ja_bert, phone, tone, language
71
-
72
-
73
- def infer(text, sdp_ratio, noise_scale, noise_scale_w, length_scale, sid, language):
74
- global net_g
75
- bert, ja_bert, phones, tones, lang_ids = get_text(text, language, hps)
76
- with torch.no_grad():
77
- x_tst = phones.to(device).unsqueeze(0)
78
- tones = tones.to(device).unsqueeze(0)
79
- lang_ids = lang_ids.to(device).unsqueeze(0)
80
- bert = bert.to(device).unsqueeze(0)
81
- ja_bert = ja_bert.to(device).unsqueeze(0)
82
- x_tst_lengths = torch.LongTensor([phones.size(0)]).to(device)
83
- del phones
84
- speakers = torch.LongTensor([hps.data.spk2id[sid]]).to(device)
85
- audio = (
86
- net_g.infer(
87
- x_tst,
88
- x_tst_lengths,
89
- speakers,
90
- tones,
91
- lang_ids,
92
- bert,
93
- ja_bert,
94
- sdp_ratio=sdp_ratio,
95
- noise_scale=noise_scale,
96
- noise_scale_w=noise_scale_w,
97
- length_scale=length_scale,
98
- )[0][0, 0]
99
- .data.cpu()
100
- .float()
101
- .numpy()
102
- )
103
- del x_tst, tones, lang_ids, bert, x_tst_lengths, speakers
104
- torch.cuda.empty_cache()
105
- return audio
106
-
107
-
108
- def tts_fn(text, speaker, sdp_ratio, noise_scale, noise_scale_w, length_scale, language):
109
- slices = text.split("|")
110
- audio_list = []
111
- with torch.no_grad():
112
- for slice in slices:
113
- audio = infer(slice, sdp_ratio=sdp_ratio, noise_scale=noise_scale, noise_scale_w=noise_scale_w, length_scale=length_scale, sid=speaker, language=language)
114
- audio_list.append(audio)
115
- silence = np.zeros(hps.data.sampling_rate) # 生成1秒的静音
116
- audio_list.append(silence) # 将静音添加到列表中
117
- audio_concat = np.concatenate(audio_list)
118
- return "Success", (hps.data.sampling_rate, audio_concat)
119
-
120
- if __name__ == "__main__":
121
- parser = argparse.ArgumentParser()
122
- parser.add_argument(
123
- "-m", "--model", default="./logs/hanser/G_9000_2nd.pth", help="path of your model"
124
- )
125
- parser.add_argument(
126
- "-c",
127
- "--config",
128
- default="./configs/config.json",
129
- help="path of your config file",
130
- )
131
- parser.add_argument(
132
- "--share", default=False, help="make link public", action="store_true"
133
- )
134
- parser.add_argument(
135
- "-d", "--debug", action="store_true", help="enable DEBUG-LEVEL log"
136
- )
137
-
138
- args = parser.parse_args()
139
- if args.debug:
140
- logger.info("Enable DEBUG-LEVEL log")
141
- logging.basicConfig(level=logging.DEBUG)
142
- hps = utils.get_hparams_from_file(args.config)
143
-
144
- device = (
145
- "cuda:0"
146
- if torch.cuda.is_available()
147
- else (
148
- "mps"
149
- if sys.platform == "darwin" and torch.backends.mps.is_available()
150
- else "cpu"
151
- )
152
- )
153
- net_g = SynthesizerTrn(
154
- len(symbols),
155
- hps.data.filter_length // 2 + 1,
156
- hps.train.segment_size // hps.data.hop_length,
157
- n_speakers=hps.data.n_speakers,
158
- **hps.model,
159
- ).to(device)
160
- _ = net_g.eval()
161
-
162
- _ = utils.load_checkpoint(args.model, net_g, None, skip_optimizer=True)
163
-
164
- speaker_ids = hps.data.spk2id
165
- speakers = list(speaker_ids.keys())
166
- languages = ["ZH", "JP"]
167
- with gr.Blocks() as app:
168
- with gr.Row():
169
- with gr.Column():
170
- gr.Markdown(value="""
171
- 🤖 【AI Hanser】在线语音合成 Bert-Vits2 🤖\n
172
- 📝 作者:Rayzggz 📰博客 https://roi.moe 📺B站 https://space.bilibili.com/10501326 📝\n
173
- 🎤 声音来源:Hanser https://space.bilibili.com/11073 🎤\n
174
- 🔗 Bert-VITS2:https://github.com/fishaudio/Bert-VITS2 🔗\n
175
- ✅ 使用本模型请遵守中华人民共和国和美利坚合众国法律 ✅\n
176
- 🏷️ 使用基于本模型的所有生成内容均需标注「使用Bert-VITS2 AI生成」、「本项目地址」、「作者名称」和「声音来源」 🏷️\n
177
- """)
178
- text = gr.TextArea(
179
- label="Text",
180
- placeholder="Input Text Here",
181
- value="大家好,我是憨色,今天给大家看看我的摩托车车",
182
- )
183
- speaker = gr.Dropdown(
184
- choices=speakers, value=speakers[0], label="Speaker"
185
- )
186
- sdp_ratio = gr.Slider(
187
- minimum=0, maximum=1, value=0.2, step=0.1, label="SDP Ratio"
188
- )
189
- noise_scale = gr.Slider(
190
- minimum=0.1, maximum=2, value=0.6, step=0.1, label="Noise Scale"
191
- )
192
- noise_scale_w = gr.Slider(
193
- minimum=0.1, maximum=2, value=0.8, step=0.1, label="Noise Scale W"
194
- )
195
- length_scale = gr.Slider(
196
- minimum=0.1, maximum=2, value=1, step=0.1, label="Length Scale"
197
- )
198
- language = gr.Dropdown(
199
- choices=languages, value=languages[0], label="Language"
200
- )
201
- btn = gr.Button("Generate 生成!", variant="primary")
202
- with gr.Column():
203
- text_output = gr.Textbox(label="Message")
204
- audio_output = gr.Audio(label="Output Audio")
205
- gr.Markdown(value="""
206
- 👏 鸣谢: 👏\n
207
- 👤 团子是咸鱼 https://space.bilibili.com/10685437 👤\n
208
- 👤 领航员未鸟 https://space.bilibili.com/2403955 👤\n
209
- 👤 Xz乔希 https://space.bilibili.com/5859321 👤\n
210
- 👤 怎么好就怎么来 https://space.bilibili.com/259582714 👤\n
211
- 🧠 Google Colab https://colab.research.google.com/ 🧠\n
212
- 📧 如果你是“Hanser”,并且希望对此模型主张权利,请通过上方“作者”部分的联系方式联系,我将积极配合处理。📧 \n
213
- """)
214
-
215
- btn.click(
216
- tts_fn,
217
- inputs=[
218
- text,
219
- speaker,
220
- sdp_ratio,
221
- noise_scale,
222
- noise_scale_w,
223
- length_scale,
224
- language,
225
- ],
226
- outputs=[text_output, audio_output],
227
- )
228
-
229
- app.launch(show_error=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bert/bert-base-japanese-v3/.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
bert/bert-large-japanese-v2/.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
bert/bert-large-japanese-v2/README.md ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - cc100
5
+ - wikipedia
6
+ language:
7
+ - ja
8
+ widget:
9
+ - text: 東北大学で[MASK]の研究をしています。
10
+ ---
11
+
12
+ # BERT large Japanese (unidic-lite with whole word masking, CC-100 and jawiki-20230102)
13
+
14
+ This is a [BERT](https://github.com/google-research/bert) model pretrained on texts in the Japanese language.
15
+
16
+ This version of the model processes input texts with word-level tokenization based on the Unidic 2.1.2 dictionary (available in [unidic-lite](https://pypi.org/project/unidic-lite/) package), followed by the WordPiece subword tokenization.
17
+ Additionally, the model is trained with the whole word masking enabled for the masked language modeling (MLM) objective.
18
+
19
+ The codes for the pretraining are available at [cl-tohoku/bert-japanese](https://github.com/cl-tohoku/bert-japanese/).
20
+
21
+ ## Model architecture
22
+
23
+ The model architecture is the same as the original BERT large model; 24 layers, 1024 dimensions of hidden states, and 16 attention heads.
24
+
25
+ ## Training Data
26
+
27
+ The model is trained on the Japanese portion of [CC-100 dataset](https://data.statmt.org/cc-100/) and the Japanese version of Wikipedia.
28
+ For Wikipedia, we generated a text corpus from the [Wikipedia Cirrussearch dump file](https://dumps.wikimedia.org/other/cirrussearch/) as of January 2, 2023.
29
+ The corpus files generated from CC-100 and Wikipedia are 74.3GB and 4.9GB in size and consist of approximately 392M and 34M sentences, respectively.
30
+
31
+ For the purpose of splitting texts into sentences, we used [fugashi](https://github.com/polm/fugashi) with [mecab-ipadic-NEologd](https://github.com/neologd/mecab-ipadic-neologd) dictionary (v0.0.7).
32
+
33
+ ## Tokenization
34
+
35
+ The texts are first tokenized by MeCab with the Unidic 2.1.2 dictionary and then split into subwords by the WordPiece algorithm.
36
+ The vocabulary size is 32768.
37
+
38
+ We used [fugashi](https://github.com/polm/fugashi) and [unidic-lite](https://github.com/polm/unidic-lite) packages for the tokenization.
39
+
40
+ ## Training
41
+
42
+ We trained the model first on the CC-100 corpus for 1M steps and then on the Wikipedia corpus for another 1M steps.
43
+ For training of the MLM (masked language modeling) objective, we introduced whole word masking in which all of the subword tokens corresponding to a single word (tokenized by MeCab) are masked at once.
44
+
45
+ For training of each model, we used a v3-8 instance of Cloud TPUs provided by [TPU Research Cloud](https://sites.research.google/trc/about/).
46
+
47
+ ## Licenses
48
+
49
+ The pretrained models are distributed under the Apache License 2.0.
50
+
51
+ ## Acknowledgments
52
+
53
+ This model is trained with Cloud TPUs provided by [TPU Research Cloud](https://sites.research.google/trc/about/) program.
bert/bert-large-japanese-v2/config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertForPreTraining"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "hidden_act": "gelu",
7
+ "hidden_dropout_prob": 0.1,
8
+ "hidden_size": 1024,
9
+ "initializer_range": 0.02,
10
+ "intermediate_size": 4096,
11
+ "layer_norm_eps": 1e-12,
12
+ "max_position_embeddings": 512,
13
+ "model_type": "bert",
14
+ "num_attention_heads": 16,
15
+ "num_hidden_layers": 24,
16
+ "pad_token_id": 0,
17
+ "type_vocab_size": 2,
18
+ "vocab_size": 32768
19
+ }
bert/bert-large-japanese-v2/flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5bc5b4b74742d76529fddd0e7699dd9464ed79361f90f8c04f70eda28a0d5f0f
3
+ size 1354127270
bert/bert-large-japanese-v2/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50212d714f79af45d3e47205faa356d0e5030e1c9a37138eadda544180f9e7c9
3
+ size 1354248201
bert/bert-large-japanese-v2/tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2cdea8775c5dd96ec0055e6fffe42773aa23811bf14e8c04343e1d85c822fe8e
3
+ size 1491013624
bert/bert-large-japanese-v2/tokenizer_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "tokenizer_class": "BertJapaneseTokenizer",
3
+ "model_max_length": 512,
4
+ "do_lower_case": false,
5
+ "word_tokenizer_type": "mecab",
6
+ "subword_tokenizer_type": "wordpiece",
7
+ "mecab_kwargs": {
8
+ "mecab_dic": "unidic_lite"
9
+ }
10
+ }
bert/bert-large-japanese-v2/vocab.txt ADDED
The diff for this file is too large to render. See raw diff
 
bert/bert_models.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "deberta-v2-large-japanese-char-wwm": {
3
+ "repo_id": "ku-nlp/deberta-v2-large-japanese-char-wwm",
4
+ "files": ["pytorch_model.bin"]
5
+ },
6
+ "chinese-roberta-wwm-ext-large": {
7
+ "repo_id": "hfl/chinese-roberta-wwm-ext-large",
8
+ "files": ["pytorch_model.bin"]
9
+ },
10
+ "deberta-v3-large": {
11
+ "repo_id": "microsoft/deberta-v3-large",
12
+ "files": ["spm.model", "pytorch_model.bin"]
13
+ }
14
+ }
bert/chinese-roberta-wwm-ext-large/.gitignore DELETED
@@ -1 +0,0 @@
1
- *.bin
 
 
bert/deberta-v2-large-japanese-char-wwm/.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
bert/deberta-v2-large-japanese-char-wwm/README.md ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: ja
3
+ license: cc-by-sa-4.0
4
+ library_name: transformers
5
+ tags:
6
+ - deberta
7
+ - deberta-v2
8
+ - fill-mask
9
+ - character
10
+ - wwm
11
+ datasets:
12
+ - wikipedia
13
+ - cc100
14
+ - oscar
15
+ metrics:
16
+ - accuracy
17
+ mask_token: "[MASK]"
18
+ widget:
19
+ - text: "京都大学で自然言語処理を[MASK][MASK]する。"
20
+ ---
21
+
22
+ # Model Card for Japanese character-level DeBERTa V2 large
23
+
24
+ ## Model description
25
+
26
+ This is a Japanese DeBERTa V2 large model pre-trained on Japanese Wikipedia, the Japanese portion of CC-100, and the Japanese portion of OSCAR.
27
+ This model is trained with character-level tokenization and whole word masking.
28
+
29
+ ## How to use
30
+
31
+ You can use this model for masked language modeling as follows:
32
+
33
+ ```python
34
+ from transformers import AutoTokenizer, AutoModelForMaskedLM
35
+ tokenizer = AutoTokenizer.from_pretrained('ku-nlp/deberta-v2-large-japanese-char-wwm')
36
+ model = AutoModelForMaskedLM.from_pretrained('ku-nlp/deberta-v2-large-japanese-char-wwm')
37
+
38
+ sentence = '京都大学で自然言語処理を[MASK][MASK]する。'
39
+ encoding = tokenizer(sentence, return_tensors='pt')
40
+ ...
41
+ ```
42
+
43
+ You can also fine-tune this model on downstream tasks.
44
+
45
+ ## Tokenization
46
+
47
+ There is no need to tokenize texts in advance, and you can give raw texts to the tokenizer.
48
+ The texts are tokenized into character-level tokens by [sentencepiece](https://github.com/google/sentencepiece).
49
+
50
+ ## Training data
51
+
52
+ We used the following corpora for pre-training:
53
+
54
+ - Japanese Wikipedia (as of 20221020, 3.2GB, 27M sentences, 1.3M documents)
55
+ - Japanese portion of CC-100 (85GB, 619M sentences, 66M documents)
56
+ - Japanese portion of OSCAR (54GB, 326M sentences, 25M documents)
57
+
58
+ Note that we filtered out documents annotated with "header", "footer", or "noisy" tags in OSCAR.
59
+ Also note that Japanese Wikipedia was duplicated 10 times to make the total size of the corpus comparable to that of CC-100 and OSCAR. As a result, the total size of the training data is 171GB.
60
+
61
+ ## Training procedure
62
+
63
+ We first segmented texts in the corpora into words using [Juman++ 2.0.0-rc3](https://github.com/ku-nlp/jumanpp/releases/tag/v2.0.0-rc3) for whole word masking.
64
+ Then, we built a sentencepiece model with 22,012 tokens including all characters that appear in the training corpus.
65
+
66
+ We tokenized raw corpora into character-level subwords using the sentencepiece model and trained the Japanese DeBERTa model using [transformers](https://github.com/huggingface/transformers) library.
67
+ The training took 26 days using 16 NVIDIA A100-SXM4-40GB GPUs.
68
+
69
+ The following hyperparameters were used during pre-training:
70
+
71
+ - learning_rate: 1e-4
72
+ - per_device_train_batch_size: 26
73
+ - distributed_type: multi-GPU
74
+ - num_devices: 16
75
+ - gradient_accumulation_steps: 8
76
+ - total_train_batch_size: 3,328
77
+ - max_seq_length: 512
78
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-06
79
+ - lr_scheduler_type: linear schedule with warmup (lr = 0 at 300k steps)
80
+ - training_steps: 260,000
81
+ - warmup_steps: 10,000
82
+
83
+ The accuracy of the trained model on the masked language modeling task was 0.795.
84
+ The evaluation set consists of 5,000 randomly sampled documents from each of the training corpora.
85
+
86
+ ## Acknowledgments
87
+
88
+ This work was supported by Joint Usage/Research Center for Interdisciplinary Large-scale Information Infrastructures (JHPCN) through General Collaboration Project no. jh221004, "Developing a Platform for Constructing and Sharing of Large-Scale Japanese Language Models".
89
+ For training models, we used the mdx: a platform for the data-driven future.
bert/deberta-v2-large-japanese-char-wwm/config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "DebertaV2ForMaskedLM"
4
+ ],
5
+ "attention_head_size": 64,
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "conv_act": "gelu",
8
+ "conv_kernel_size": 3,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 1024,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 4096,
14
+ "layer_norm_eps": 1e-07,
15
+ "max_position_embeddings": 512,
16
+ "max_relative_positions": -1,
17
+ "model_type": "deberta-v2",
18
+ "norm_rel_ebd": "layer_norm",
19
+ "num_attention_heads": 16,
20
+ "num_hidden_layers": 24,
21
+ "pad_token_id": 0,
22
+ "pooler_dropout": 0,
23
+ "pooler_hidden_act": "gelu",
24
+ "pooler_hidden_size": 1024,
25
+ "pos_att_type": [
26
+ "p2c",
27
+ "c2p"
28
+ ],
29
+ "position_biased_input": false,
30
+ "position_buckets": 256,
31
+ "relative_attention": true,
32
+ "share_att_key": true,
33
+ "torch_dtype": "float16",
34
+ "transformers_version": "4.25.1",
35
+ "type_vocab_size": 0,
36
+ "vocab_size": 22012
37
+ }
bert/deberta-v2-large-japanese-char-wwm/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2630f547d018524a7b03506a42c700cbac49e29bdc441845b0615bfb3b5d74d2
3
+ size 1318453704
bert/deberta-v2-large-japanese-char-wwm/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf0dab8ad87bd7c22e85ec71e04f2240804fda6d33196157d6b5923af6ea1201
3
+ size 1318456639
bert/deberta-v2-large-japanese-char-wwm/special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
bert/deberta-v2-large-japanese-char-wwm/tokenizer_config.json ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "do_lower_case": false,
4
+ "do_subword_tokenize": true,
5
+ "do_word_tokenize": true,
6
+ "jumanpp_kwargs": null,
7
+ "mask_token": "[MASK]",
8
+ "mecab_kwargs": null,
9
+ "model_max_length": 1000000000000000019884624838656,
10
+ "never_split": null,
11
+ "pad_token": "[PAD]",
12
+ "sep_token": "[SEP]",
13
+ "special_tokens_map_file": null,
14
+ "subword_tokenizer_type": "character",
15
+ "sudachi_kwargs": null,
16
+ "tokenizer_class": "BertJapaneseTokenizer",
17
+ "unk_token": "[UNK]",
18
+ "word_tokenizer_type": "basic"
19
+ }
bert/deberta-v2-large-japanese-char-wwm/vocab.txt ADDED
The diff for this file is too large to render. See raw diff
 
bert/deberta-v2-large-japanese/.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
bert/deberta-v2-large-japanese/README.md ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: ja
3
+ license: cc-by-sa-4.0
4
+ library_name: transformers
5
+ tags:
6
+ - deberta
7
+ - deberta-v2
8
+ - fill-mask
9
+ datasets:
10
+ - wikipedia
11
+ - cc100
12
+ - oscar
13
+ metrics:
14
+ - accuracy
15
+ mask_token: "[MASK]"
16
+ widget:
17
+ - text: "京都 大学 で 自然 言語 処理 を [MASK] する 。"
18
+ ---
19
+
20
+ # Model Card for Japanese DeBERTa V2 large
21
+
22
+ ## Model description
23
+
24
+ This is a Japanese DeBERTa V2 large model pre-trained on Japanese Wikipedia, the Japanese portion of CC-100, and the
25
+ Japanese portion of OSCAR.
26
+
27
+ ## How to use
28
+
29
+ You can use this model for masked language modeling as follows:
30
+
31
+ ```python
32
+ from transformers import AutoTokenizer, AutoModelForMaskedLM
33
+
34
+ tokenizer = AutoTokenizer.from_pretrained('ku-nlp/deberta-v2-large-japanese')
35
+ model = AutoModelForMaskedLM.from_pretrained('ku-nlp/deberta-v2-large-japanese')
36
+
37
+ sentence = '京都 大学 で 自然 言語 処理 を [MASK] する 。' # input should be segmented into words by Juman++ in advance
38
+ encoding = tokenizer(sentence, return_tensors='pt')
39
+ ...
40
+ ```
41
+
42
+ You can also fine-tune this model on downstream tasks.
43
+
44
+ ## Tokenization
45
+
46
+ The input text should be segmented into words by [Juman++](https://github.com/ku-nlp/jumanpp) in
47
+ advance. [Juman++ 2.0.0-rc3](https://github.com/ku-nlp/jumanpp/releases/tag/v2.0.0-rc3) was used for pre-training. Each
48
+ word is tokenized into subwords by [sentencepiece](https://github.com/google/sentencepiece).
49
+
50
+ ## Training data
51
+
52
+ We used the following corpora for pre-training:
53
+
54
+ - Japanese Wikipedia (as of 20221020, 3.2GB, 27M sentences, 1.3M documents)
55
+ - Japanese portion of CC-100 (85GB, 619M sentences, 66M documents)
56
+ - Japanese portion of OSCAR (54GB, 326M sentences, 25M documents)
57
+
58
+ Note that we filtered out documents annotated with "header", "footer", or "noisy" tags in OSCAR.
59
+ Also note that Japanese Wikipedia was duplicated 10 times to make the total size of the corpus comparable to that of
60
+ CC-100 and OSCAR. As a result, the total size of the training data is 171GB.
61
+
62
+ ## Training procedure
63
+
64
+ We first segmented texts in the corpora into words using [Juman++](https://github.com/ku-nlp/jumanpp).
65
+ Then, we built a sentencepiece model with 32000 tokens including words ([JumanDIC](https://github.com/ku-nlp/JumanDIC))
66
+ and subwords induced by the unigram language model of [sentencepiece](https://github.com/google/sentencepiece).
67
+
68
+ We tokenized the segmented corpora into subwords using the sentencepiece model and trained the Japanese DeBERTa model
69
+ using [transformers](https://github.com/huggingface/transformers) library.
70
+ The training took 36 days using 8 NVIDIA A100-SXM4-40GB GPUs.
71
+
72
+ The following hyperparameters were used during pre-training:
73
+
74
+ - learning_rate: 1e-4
75
+ - per_device_train_batch_size: 18
76
+ - distributed_type: multi-GPU
77
+ - num_devices: 8
78
+ - gradient_accumulation_steps: 16
79
+ - total_train_batch_size: 2,304
80
+ - max_seq_length: 512
81
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-06
82
+ - lr_scheduler_type: linear schedule with warmup
83
+ - training_steps: 300,000
84
+ - warmup_steps: 10,000
85
+
86
+ The accuracy of the trained model on the masked language modeling task was 0.799.
87
+ The evaluation set consists of 5,000 randomly sampled documents from each of the training corpora.
88
+
89
+ ## Fine-tuning on NLU tasks
90
+
91
+ We fine-tuned the following models and evaluated them on the dev set of JGLUE.
92
+ We tuned learning rate and training epochs for each model and task
93
+ following [the JGLUE paper](https://www.jstage.jst.go.jp/article/jnlp/30/1/30_63/_pdf/-char/ja).
94
+
95
+ | Model | MARC-ja/acc | JSTS/pearson | JSTS/spearman | JNLI/acc | JSQuAD/EM | JSQuAD/F1 | JComQA/acc |
96
+ |-------------------------------|-------------|--------------|---------------|----------|-----------|-----------|------------|
97
+ | Waseda RoBERTa base | 0.965 | 0.913 | 0.876 | 0.905 | 0.853 | 0.916 | 0.853 |
98
+ | Waseda RoBERTa large (seq512) | 0.969 | 0.925 | 0.890 | 0.928 | 0.910 | 0.955 | 0.900 |
99
+ | LUKE Japanese base* | 0.965 | 0.916 | 0.877 | 0.912 | - | - | 0.842 |
100
+ | LUKE Japanese large* | 0.965 | 0.932 | 0.902 | 0.927 | - | - | 0.893 |
101
+ | DeBERTaV2 base | 0.970 | 0.922 | 0.886 | 0.922 | 0.899 | 0.951 | 0.873 |
102
+ | DeBERTaV2 large | 0.968 | 0.925 | 0.892 | 0.924 | 0.912 | 0.959 | 0.890 |
103
+
104
+ *The scores of LUKE are from [the official repository](https://github.com/studio-ousia/luke).
105
+
106
+ ## Acknowledgments
107
+
108
+ This work was supported by Joint Usage/Research Center for Interdisciplinary Large-scale Information Infrastructures (
109
+ JHPCN) through General Collaboration Project no. jh221004, "Developing a Platform for Constructing and Sharing of
110
+ Large-Scale Japanese Language Models".
111
+ For training models, we used the mdx: a platform for the data-driven future.
bert/deberta-v2-large-japanese/config.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "configs/deberta_v2_large.json",
3
+ "architectures": [
4
+ "DebertaV2ForMaskedLM"
5
+ ],
6
+ "attention_head_size": 64,
7
+ "attention_probs_dropout_prob": 0.1,
8
+ "conv_act": "gelu",
9
+ "conv_kernel_size": 3,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 1024,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 4096,
15
+ "layer_norm_eps": 1e-07,
16
+ "max_position_embeddings": 512,
17
+ "max_relative_positions": -1,
18
+ "model_type": "deberta-v2",
19
+ "norm_rel_ebd": "layer_norm",
20
+ "num_attention_heads": 16,
21
+ "num_hidden_layers": 24,
22
+ "pad_token_id": 0,
23
+ "pooler_dropout": 0,
24
+ "pooler_hidden_act": "gelu",
25
+ "pooler_hidden_size": 1024,
26
+ "pos_att_type": [
27
+ "p2c",
28
+ "c2p"
29
+ ],
30
+ "position_biased_input": false,
31
+ "position_buckets": 256,
32
+ "relative_attention": true,
33
+ "share_att_key": true,
34
+ "torch_dtype": "float32",
35
+ "transformers_version": "4.23.1",
36
+ "type_vocab_size": 0,
37
+ "vocab_size": 32000
38
+ }
bert/deberta-v2-large-japanese/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:726bd655468fba70cf5348751a560b0fc969f4064e23759287461aa54b9e27e2
3
+ size 1490606906
bert/deberta-v2-large-japanese/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a6c15feac0dea77ab8835c70e1befa4cf4c2137862c6fb2443b1553f70840047
3
+ size 1490693213
bert/deberta-v2-large-japanese/special_tokens_map.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "[CLS]",
3
+ "cls_token": "[CLS]",
4
+ "eos_token": "[SEP]",
5
+ "mask_token": "[MASK]",
6
+ "pad_token": "[PAD]",
7
+ "sep_token": "[SEP]",
8
+ "unk_token": "[UNK]"
9
+ }
logs/hanser/G_9000_2nd.pth → bert/deberta-v2-large-japanese/spm.model RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2cc7b8dc2f8c63a8ccfa6739e6ac49c41af0788cfa628ec39bb487ce5eb32ef4
3
- size 857912686
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c111c16e2e52366dcac46b886e40650bb843fe2938a65f5970271fc5697a127
3
+ size 805061
bert/deberta-v2-large-japanese/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
bert/deberta-v2-large-japanese/tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "[CLS]",
3
+ "cls_token": "[CLS]",
4
+ "do_lower_case": false,
5
+ "eos_token": "[SEP]",
6
+ "keep_accents": true,
7
+ "mask_token": "[MASK]",
8
+ "pad_token": "[PAD]",
9
+ "sep_token": "[SEP]",
10
+ "sp_model_kwargs": {},
11
+ "special_tokens_map_file": null,
12
+ "split_by_punct": false,
13
+ "tokenizer_class": "DebertaV2Tokenizer",
14
+ "unk_token": "[UNK]"
15
+ }
bert/deberta-v3-large/.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
bert/deberta-v3-large/README.md ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - deberta
5
+ - deberta-v3
6
+ - fill-mask
7
+ thumbnail: https://huggingface.co/front/thumbnails/microsoft.png
8
+ license: mit
9
+ ---
10
+
11
+ ## DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharing
12
+
13
+ [DeBERTa](https://arxiv.org/abs/2006.03654) improves the BERT and RoBERTa models using disentangled attention and enhanced mask decoder. With those two improvements, DeBERTa out perform RoBERTa on a majority of NLU tasks with 80GB training data.
14
+
15
+ In [DeBERTa V3](https://arxiv.org/abs/2111.09543), we further improved the efficiency of DeBERTa using ELECTRA-Style pre-training with Gradient Disentangled Embedding Sharing. Compared to DeBERTa, our V3 version significantly improves the model performance on downstream tasks. You can find more technique details about the new model from our [paper](https://arxiv.org/abs/2111.09543).
16
+
17
+ Please check the [official repository](https://github.com/microsoft/DeBERTa) for more implementation details and updates.
18
+
19
+ The DeBERTa V3 large model comes with 24 layers and a hidden size of 1024. It has 304M backbone parameters with a vocabulary containing 128K tokens which introduces 131M parameters in the Embedding layer. This model was trained using the 160GB data as DeBERTa V2.
20
+
21
+
22
+ #### Fine-tuning on NLU tasks
23
+
24
+ We present the dev results on SQuAD 2.0 and MNLI tasks.
25
+
26
+ | Model |Vocabulary(K)|Backbone #Params(M)| SQuAD 2.0(F1/EM) | MNLI-m/mm(ACC)|
27
+ |-------------------|----------|-------------------|-----------|----------|
28
+ | RoBERTa-large |50 |304 | 89.4/86.5 | 90.2 |
29
+ | XLNet-large |32 |- | 90.6/87.9 | 90.8 |
30
+ | DeBERTa-large |50 |- | 90.7/88.0 | 91.3 |
31
+ | **DeBERTa-v3-large**|128|304 | **91.5/89.0**| **91.8/91.9**|
32
+
33
+
34
+ #### Fine-tuning with HF transformers
35
+
36
+ ```bash
37
+ #!/bin/bash
38
+
39
+ cd transformers/examples/pytorch/text-classification/
40
+
41
+ pip install datasets
42
+ export TASK_NAME=mnli
43
+
44
+ output_dir="ds_results"
45
+
46
+ num_gpus=8
47
+
48
+ batch_size=8
49
+
50
+ python -m torch.distributed.launch --nproc_per_node=${num_gpus} \
51
+ run_glue.py \
52
+ --model_name_or_path microsoft/deberta-v3-large \
53
+ --task_name $TASK_NAME \
54
+ --do_train \
55
+ --do_eval \
56
+ --evaluation_strategy steps \
57
+ --max_seq_length 256 \
58
+ --warmup_steps 50 \
59
+ --per_device_train_batch_size ${batch_size} \
60
+ --learning_rate 6e-6 \
61
+ --num_train_epochs 2 \
62
+ --output_dir $output_dir \
63
+ --overwrite_output_dir \
64
+ --logging_steps 1000 \
65
+ --logging_dir $output_dir
66
+
67
+ ```
68
+
69
+ ### Citation
70
+
71
+ If you find DeBERTa useful for your work, please cite the following papers:
72
+
73
+ ``` latex
74
+ @misc{he2021debertav3,
75
+ title={DeBERTaV3: Improving DeBERTa using ELECTRA-Style Pre-Training with Gradient-Disentangled Embedding Sharing},
76
+ author={Pengcheng He and Jianfeng Gao and Weizhu Chen},
77
+ year={2021},
78
+ eprint={2111.09543},
79
+ archivePrefix={arXiv},
80
+ primaryClass={cs.CL}
81
+ }
82
+ ```
83
+
84
+ ``` latex
85
+ @inproceedings{
86
+ he2021deberta,
87
+ title={DEBERTA: DECODING-ENHANCED BERT WITH DISENTANGLED ATTENTION},
88
+ author={Pengcheng He and Xiaodong Liu and Jianfeng Gao and Weizhu Chen},
89
+ booktitle={International Conference on Learning Representations},
90
+ year={2021},
91
+ url={https://openreview.net/forum?id=XPZIaotutsD}
92
+ }
93
+ ```
bert/deberta-v3-large/config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "deberta-v2",
3
+ "attention_probs_dropout_prob": 0.1,
4
+ "hidden_act": "gelu",
5
+ "hidden_dropout_prob": 0.1,
6
+ "hidden_size": 1024,
7
+ "initializer_range": 0.02,
8
+ "intermediate_size": 4096,
9
+ "max_position_embeddings": 512,
10
+ "relative_attention": true,
11
+ "position_buckets": 256,
12
+ "norm_rel_ebd": "layer_norm",
13
+ "share_att_key": true,
14
+ "pos_att_type": "p2c|c2p",
15
+ "layer_norm_eps": 1e-7,
16
+ "max_relative_positions": -1,
17
+ "position_biased_input": false,
18
+ "num_attention_heads": 16,
19
+ "num_hidden_layers": 24,
20
+ "type_vocab_size": 0,
21
+ "vocab_size": 128100
22
+ }
bert/deberta-v3-large/generator_config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "deberta-v2",
3
+ "attention_probs_dropout_prob": 0.1,
4
+ "hidden_act": "gelu",
5
+ "hidden_dropout_prob": 0.1,
6
+ "hidden_size": 1024,
7
+ "initializer_range": 0.02,
8
+ "intermediate_size": 4096,
9
+ "max_position_embeddings": 512,
10
+ "relative_attention": true,
11
+ "position_buckets": 256,
12
+ "norm_rel_ebd": "layer_norm",
13
+ "share_att_key": true,
14
+ "pos_att_type": "p2c|c2p",
15
+ "layer_norm_eps": 1e-7,
16
+ "max_relative_positions": -1,
17
+ "position_biased_input": false,
18
+ "num_attention_heads": 16,
19
+ "num_hidden_layers": 12,
20
+ "type_vocab_size": 0,
21
+ "vocab_size": 128100
22
+ }
logs/hanser/G_26000.pth → bert/deberta-v3-large/pytorch_model.bin RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:78bbd64ec6b6dbdced5f2597fa6489164e54dcad3a459aff008b8bf00d8d6508
3
- size 857922317
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd5b5d93e2db101aaf281df0ea1216c07ad73620ff59c5b42dccac4bf2eef5b5
3
+ size 873673253
logs/hanser/G_8000.pth → bert/deberta-v3-large/pytorch_model.generator.bin RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:782249a78ac551bda545bdf2126bd20acec871d0f69a027f5047b6f87564e68d
3
- size 857912255
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ff85455c562822ea7001f810d026a68da8a24ffdae5a095081dfe7e84e27989d
3
+ size 571293153
bert/deberta-v3-large/spm.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fd
3
+ size 2464616
bert/deberta-v3-large/tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20462c6c76990df31b0e82ee5d1e2b7cb06e0a3823334149fbb3b169826ed476
3
+ size 1736592160
bert/deberta-v3-large/tokenizer_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "do_lower_case": false,
3
+ "vocab_type": "spm"
4
+ }
bert_gen.py CHANGED
@@ -1,19 +1,26 @@
 
 
 
1
  import torch
2
- from multiprocessing import Pool
 
 
3
  import commons
4
  import utils
5
- from tqdm import tqdm
6
  from text import cleaned_text_to_sequence, get_bert
7
- import argparse
8
- import torch.multiprocessing as mp
9
 
10
 
11
  def process_line(line):
12
- rank = mp.current_process()._identity
13
- rank = rank[0] if len(rank) > 0 else 0
14
- if torch.cuda.is_available():
15
- gpu_id = rank % torch.cuda.device_count()
16
- device = torch.device(f"cuda:{gpu_id}")
 
 
 
 
17
  wav_path, _, language_str, text, phones, tone, word2ph = line.strip().split("|")
18
  phone = phones.split(" ")
19
  tone = [int(i) for i in tone.split(" ")]
@@ -28,7 +35,7 @@ def process_line(line):
28
  word2ph[i] = word2ph[i] * 2
29
  word2ph[0] += 1
30
 
31
- bert_path = wav_path.replace(".wav", ".bert.pt")
32
 
33
  try:
34
  bert = torch.load(bert_path)
@@ -39,11 +46,17 @@ def process_line(line):
39
  torch.save(bert, bert_path)
40
 
41
 
 
 
42
  if __name__ == "__main__":
43
  parser = argparse.ArgumentParser()
44
- parser.add_argument("-c", "--config", type=str, default="configs/config.json")
45
- parser.add_argument("--num_processes", type=int, default=2)
46
- args = parser.parse_args()
 
 
 
 
47
  config_path = args.config
48
  hps = utils.get_hparams_from_file(config_path)
49
  lines = []
@@ -52,8 +65,10 @@ if __name__ == "__main__":
52
 
53
  with open(hps.data.validation_files, encoding="utf-8") as f:
54
  lines.extend(f.readlines())
 
 
 
 
 
55
 
56
- num_processes = args.num_processes
57
- with Pool(processes=num_processes) as pool:
58
- for _ in tqdm(pool.imap_unordered(process_line, lines), total=len(lines)):
59
- pass
 
1
+ import argparse
2
+ from multiprocessing import Pool, cpu_count
3
+
4
  import torch
5
+ import torch.multiprocessing as mp
6
+ from tqdm import tqdm
7
+
8
  import commons
9
  import utils
10
+ from config import config
11
  from text import cleaned_text_to_sequence, get_bert
 
 
12
 
13
 
14
  def process_line(line):
15
+ device = config.bert_gen_config.device
16
+ if config.bert_gen_config.use_multi_device:
17
+ rank = mp.current_process()._identity
18
+ rank = rank[0] if len(rank) > 0 else 0
19
+ if torch.cuda.is_available():
20
+ gpu_id = rank % torch.cuda.device_count()
21
+ device = torch.device(f"cuda:{gpu_id}")
22
+ else:
23
+ device = torch.device("cpu")
24
  wav_path, _, language_str, text, phones, tone, word2ph = line.strip().split("|")
25
  phone = phones.split(" ")
26
  tone = [int(i) for i in tone.split(" ")]
 
35
  word2ph[i] = word2ph[i] * 2
36
  word2ph[0] += 1
37
 
38
+ bert_path = wav_path.replace(".WAV", ".wav").replace(".wav", ".bert.pt")
39
 
40
  try:
41
  bert = torch.load(bert_path)
 
46
  torch.save(bert, bert_path)
47
 
48
 
49
+ preprocess_text_config = config.preprocess_text_config
50
+
51
  if __name__ == "__main__":
52
  parser = argparse.ArgumentParser()
53
+ parser.add_argument(
54
+ "-c", "--config", type=str, default=config.bert_gen_config.config_path
55
+ )
56
+ parser.add_argument(
57
+ "--num_processes", type=int, default=config.bert_gen_config.num_processes
58
+ )
59
+ args, _ = parser.parse_known_args()
60
  config_path = args.config
61
  hps = utils.get_hparams_from_file(config_path)
62
  lines = []
 
65
 
66
  with open(hps.data.validation_files, encoding="utf-8") as f:
67
  lines.extend(f.readlines())
68
+ if len(lines) != 0:
69
+ num_processes = min(args.num_processes, cpu_count())
70
+ with Pool(processes=num_processes) as pool:
71
+ for _ in tqdm(pool.imap_unordered(process_line, lines), total=len(lines)):
72
+ pass
73
 
74
+ print(f"bert生成完毕!, 共有{len(lines)}个bert.pt生成!")
 
 
 
clap_gen.py ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ from multiprocessing import Pool, cpu_count
3
+
4
+ import torch
5
+ import torch.multiprocessing as mp
6
+ from tqdm import tqdm
7
+
8
+ import utils
9
+ from config import config
10
+ from clap_wrapper import get_clap_audio_feature
11
+ import librosa
12
+ import os
13
+
14
+ os.environ["OMP_NUM_THREADS"] = "1"
15
+ os.environ["MKL_NUM_THREADS"] = "1"
16
+
17
+
18
+ def process_line(line):
19
+ device = config.emo_gen_config.device
20
+ if config.emo_gen_config.use_multi_device:
21
+ rank = mp.current_process()._identity
22
+ rank = rank[0] if len(rank) > 0 else 0
23
+ if torch.cuda.is_available():
24
+ gpu_id = rank % torch.cuda.device_count()
25
+ device = torch.device(f"cuda:{gpu_id}")
26
+ else:
27
+ device = torch.device("cpu")
28
+ wav_path, _, language_str, text, phones, tone, word2ph = line.strip().split("|")
29
+
30
+ clap_path = wav_path.replace(".WAV", ".wav").replace(".wav", ".emo.npy")
31
+ if os.path.isfile(clap_path):
32
+ return
33
+
34
+ audio = librosa.load(wav_path, 48000)[0]
35
+ # audio = librosa.resample(audio, 44100, 48000)
36
+
37
+ clap = get_clap_audio_feature(audio, device)
38
+ torch.save(clap, clap_path)
39
+
40
+
41
+ if __name__ == "__main__":
42
+ parser = argparse.ArgumentParser()
43
+ parser.add_argument(
44
+ "-c", "--config", type=str, default=config.emo_gen_config.config_path
45
+ )
46
+ parser.add_argument(
47
+ "--num_processes", type=int, default=config.emo_gen_config.num_processes
48
+ )
49
+ args, _ = parser.parse_known_args()
50
+ config_path = args.config
51
+ hps = utils.get_hparams_from_file(config_path)
52
+ lines = []
53
+ with open(hps.data.training_files, encoding="utf-8") as f:
54
+ lines.extend(f.readlines())
55
+
56
+ with open(hps.data.validation_files, encoding="utf-8") as f:
57
+ lines.extend(f.readlines())
58
+ if len(lines) != 0:
59
+ num_processes = min(args.num_processes, cpu_count())
60
+ with Pool(processes=num_processes) as pool:
61
+ for _ in tqdm(pool.imap_unordered(process_line, lines), total=len(lines)):
62
+ pass
63
+
64
+ print(f"clap生成完毕!, 共有{len(lines)}个emo.pt生成!")
clap_wrapper.py ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import sys
2
+
3
+ import torch
4
+ from transformers import ClapModel, ClapProcessor
5
+
6
+ from config import config
7
+
8
+ models = dict()
9
+ processor = ClapProcessor.from_pretrained("./emotional/clap-htsat-fused")
10
+
11
+
12
+ def get_clap_audio_feature(audio_data, device=config.bert_gen_config.device):
13
+ if (
14
+ sys.platform == "darwin"
15
+ and torch.backends.mps.is_available()
16
+ and device == "cpu"
17
+ ):
18
+ device = "mps"
19
+ if not device:
20
+ device = "cuda"
21
+ if device not in models.keys():
22
+ models[device] = ClapModel.from_pretrained("./emotional/clap-htsat-fused").to(
23
+ device
24
+ )
25
+ with torch.no_grad():
26
+ inputs = processor(
27
+ audios=audio_data, return_tensors="pt", sampling_rate=48000
28
+ ).to(device)
29
+ emb = models[device].get_audio_features(**inputs)
30
+ return emb.T
31
+
32
+
33
+ def get_clap_text_feature(text, device=config.bert_gen_config.device):
34
+ if (
35
+ sys.platform == "darwin"
36
+ and torch.backends.mps.is_available()
37
+ and device == "cpu"
38
+ ):
39
+ device = "mps"
40
+ if not device:
41
+ device = "cuda"
42
+ if device not in models.keys():
43
+ models[device] = ClapModel.from_pretrained("./emotional/clap-htsat-fused").to(
44
+ device
45
+ )
46
+ with torch.no_grad():
47
+ inputs = processor(text=text, return_tensors="pt").to(device)
48
+ emb = models[device].get_text_features(**inputs)
49
+ return emb.T
commons.py CHANGED
@@ -46,20 +46,18 @@ def rand_gumbel_like(x):
46
 
47
 
48
  def slice_segments(x, ids_str, segment_size=4):
49
- ret = torch.zeros_like(x[:, :, :segment_size])
50
- for i in range(x.size(0)):
51
- idx_str = ids_str[i]
52
- idx_end = idx_str + segment_size
53
- ret[i] = x[i, :, idx_str:idx_end]
54
- return ret
55
 
56
 
57
  def rand_slice_segments(x, x_lengths=None, segment_size=4):
58
  b, d, t = x.size()
59
  if x_lengths is None:
60
  x_lengths = t
61
- ids_str_max = x_lengths - segment_size + 1
62
- ids_str = (torch.rand([b]).to(device=x.device) * ids_str_max).to(dtype=torch.long)
63
  ret = slice_segments(x, ids_str, segment_size)
64
  return ret, ids_str
65
 
 
46
 
47
 
48
  def slice_segments(x, ids_str, segment_size=4):
49
+ gather_indices = ids_str.view(x.size(0), 1, 1).repeat(
50
+ 1, x.size(1), 1
51
+ ) + torch.arange(segment_size, device=x.device)
52
+ return torch.gather(x, 2, gather_indices)
 
 
53
 
54
 
55
  def rand_slice_segments(x, x_lengths=None, segment_size=4):
56
  b, d, t = x.size()
57
  if x_lengths is None:
58
  x_lengths = t
59
+ ids_str_max = torch.clamp(x_lengths - segment_size + 1, min=0)
60
+ ids_str = (torch.rand([b], device=x.device) * ids_str_max).to(dtype=torch.long)
61
  ret = slice_segments(x, ids_str, segment_size)
62
  return ret, ids_str
63
 
compress_model.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from collections import OrderedDict
2
+ from text.symbols import symbols
3
+ import torch
4
+
5
+ from tools.log import logger
6
+ import utils
7
+ from models import SynthesizerTrn
8
+ import os
9
+
10
+
11
+ def copyStateDict(state_dict):
12
+ if list(state_dict.keys())[0].startswith("module"):
13
+ start_idx = 1
14
+ else:
15
+ start_idx = 0
16
+ new_state_dict = OrderedDict()
17
+ for k, v in state_dict.items():
18
+ name = ",".join(k.split(".")[start_idx:])
19
+ new_state_dict[name] = v
20
+ return new_state_dict
21
+
22
+
23
+ def removeOptimizer(config: str, input_model: str, ishalf: bool, output_model: str):
24
+ hps = utils.get_hparams_from_file(config)
25
+
26
+ net_g = SynthesizerTrn(
27
+ len(symbols),
28
+ hps.data.filter_length // 2 + 1,
29
+ hps.train.segment_size // hps.data.hop_length,
30
+ n_speakers=hps.data.n_speakers,
31
+ **hps.model,
32
+ )
33
+
34
+ optim_g = torch.optim.AdamW(
35
+ net_g.parameters(),
36
+ hps.train.learning_rate,
37
+ betas=hps.train.betas,
38
+ eps=hps.train.eps,
39
+ )
40
+
41
+ state_dict_g = torch.load(input_model, map_location="cpu")
42
+ new_dict_g = copyStateDict(state_dict_g)
43
+ keys = []
44
+ for k, v in new_dict_g["model"].items():
45
+ if "enc_q" in k:
46
+ continue # noqa: E701
47
+ keys.append(k)
48
+
49
+ new_dict_g = (
50
+ {k: new_dict_g["model"][k].half() for k in keys}
51
+ if ishalf
52
+ else {k: new_dict_g["model"][k] for k in keys}
53
+ )
54
+
55
+ torch.save(
56
+ {
57
+ "model": new_dict_g,
58
+ "iteration": 0,
59
+ "optimizer": optim_g.state_dict(),
60
+ "learning_rate": 0.0001,
61
+ },
62
+ output_model,
63
+ )
64
+
65
+
66
+ if __name__ == "__main__":
67
+ import argparse
68
+
69
+ parser = argparse.ArgumentParser()
70
+ parser.add_argument("-c", "--config", type=str, default="configs/config.json")
71
+ parser.add_argument("-i", "--input", type=str)
72
+ parser.add_argument("-o", "--output", type=str, default=None)
73
+ parser.add_argument(
74
+ "-hf", "--half", action="store_true", default=False, help="Save as FP16"
75
+ )
76
+
77
+ args = parser.parse_args()
78
+
79
+ output = args.output
80
+
81
+ if output is None:
82
+ import os.path
83
+
84
+ filename, ext = os.path.splitext(args.input)
85
+ half = "_half" if args.half else ""
86
+ output = filename + "_release" + half + ext
87
+
88
+ removeOptimizer(args.config, args.input, args.half, output)
89
+ logger.info(f"压缩模型成功, 输出模型: {os.path.abspath(output)}")
config.py ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ @Desc: 全局配置文件读取
3
+ """
4
+ import argparse
5
+ import yaml
6
+ from typing import Dict, List
7
+ import os
8
+ import shutil
9
+ import sys
10
+
11
+
12
+ class Resample_config:
13
+ """重采样配置"""
14
+
15
+ def __init__(self, in_dir: str, out_dir: str, sampling_rate: int = 44100):
16
+ self.sampling_rate: int = sampling_rate # 目标采样率
17
+ self.in_dir: str = in_dir # 待处理音频目录路径
18
+ self.out_dir: str = out_dir # 重采样输出路径
19
+
20
+ @classmethod
21
+ def from_dict(cls, dataset_path: str, data: Dict[str, any]):
22
+ """从字典中生成实例"""
23
+
24
+ # 不检查路径是否有效,此逻辑在resample.py中处理
25
+ data["in_dir"] = os.path.join(dataset_path, data["in_dir"])
26
+ data["out_dir"] = os.path.join(dataset_path, data["out_dir"])
27
+
28
+ return cls(**data)
29
+
30
+
31
+ class Preprocess_text_config:
32
+ """数据预处理配置"""
33
+
34
+ def __init__(
35
+ self,
36
+ transcription_path: str,
37
+ cleaned_path: str,
38
+ train_path: str,
39
+ val_path: str,
40
+ config_path: str,
41
+ val_per_lang: int = 5,
42
+ max_val_total: int = 10000,
43
+ clean: bool = True,
44
+ ):
45
+ self.transcription_path: str = transcription_path # 原始文本文件路径,文本格式应为{wav_path}|{speaker_name}|{language}|{text}。
46
+ self.cleaned_path: str = cleaned_path # 数据清洗后文本路径,可以不填。不填则将在原始文本目录生成
47
+ self.train_path: str = train_path # 训练集路径,可以不填。不填则将在原始文本目录生成
48
+ self.val_path: str = val_path # 验证集路径,可以不填。不填则将在原始文本目录生成
49
+ self.config_path: str = config_path # 配置文件路径
50
+ self.val_per_lang: int = val_per_lang # 每个speaker的验证集条数
51
+ self.max_val_total: int = max_val_total # 验证集最大条数,多于的会被截断并放到训练集中
52
+ self.clean: bool = clean # 是否进行数据清洗
53
+
54
+ @classmethod
55
+ def from_dict(cls, dataset_path: str, data: Dict[str, any]):
56
+ """从字典中生成实例"""
57
+
58
+ data["transcription_path"] = os.path.join(
59
+ dataset_path, data["transcription_path"]
60
+ )
61
+ if data["cleaned_path"] == "" or data["cleaned_path"] is None:
62
+ data["cleaned_path"] = None
63
+ else:
64
+ data["cleaned_path"] = os.path.join(dataset_path, data["cleaned_path"])
65
+ data["train_path"] = os.path.join(dataset_path, data["train_path"])
66
+ data["val_path"] = os.path.join(dataset_path, data["val_path"])
67
+ data["config_path"] = os.path.join(dataset_path, data["config_path"])
68
+
69
+ return cls(**data)
70
+
71
+
72
+ class Bert_gen_config:
73
+ """bert_gen 配置"""
74
+
75
+ def __init__(
76
+ self,
77
+ config_path: str,
78
+ num_processes: int = 2,
79
+ device: str = "cuda",
80
+ use_multi_device: bool = False,
81
+ ):
82
+ self.config_path = config_path
83
+ self.num_processes = num_processes
84
+ self.device = device
85
+ self.use_multi_device = use_multi_device
86
+
87
+ @classmethod
88
+ def from_dict(cls, dataset_path: str, data: Dict[str, any]):
89
+ data["config_path"] = os.path.join(dataset_path, data["config_path"])
90
+
91
+ return cls(**data)
92
+
93
+
94
+ class Emo_gen_config:
95
+ """emo_gen 配置"""
96
+
97
+ def __init__(
98
+ self,
99
+ config_path: str,
100
+ num_processes: int = 2,
101
+ device: str = "cuda",
102
+ use_multi_device: bool = False,
103
+ ):
104
+ self.config_path = config_path
105
+ self.num_processes = num_processes
106
+ self.device = device
107
+ self.use_multi_device = use_multi_device
108
+
109
+ @classmethod
110
+ def from_dict(cls, dataset_path: str, data: Dict[str, any]):
111
+ data["config_path"] = os.path.join(dataset_path, data["config_path"])
112
+
113
+ return cls(**data)
114
+
115
+
116
+ class Train_ms_config:
117
+ """训练配置"""
118
+
119
+ def __init__(
120
+ self,
121
+ config_path: str,
122
+ env: Dict[str, any],
123
+ base: Dict[str, any],
124
+ model: str,
125
+ num_workers: int,
126
+ spec_cache: bool,
127
+ keep_ckpts: int,
128
+ ):
129
+ self.env = env # 需要加载的环境变量
130
+ self.base = base # 底模配置
131
+ self.model = model # 训练模型存储目录,该路径为相对于dataset_path的路径,而非项目根目录
132
+ self.config_path = config_path # 配置文件路径
133
+ self.num_workers = num_workers # worker数量
134
+ self.spec_cache = spec_cache # 是否启用spec缓存
135
+ self.keep_ckpts = keep_ckpts # ckpt数量
136
+
137
+ @classmethod
138
+ def from_dict(cls, dataset_path: str, data: Dict[str, any]):
139
+ # data["model"] = os.path.join(dataset_path, data["model"])
140
+ data["config_path"] = os.path.join(dataset_path, data["config_path"])
141
+
142
+ return cls(**data)
143
+
144
+
145
+ class Webui_config:
146
+ """webui 配置"""
147
+
148
+ def __init__(
149
+ self,
150
+ device: str,
151
+ model: str,
152
+ config_path: str,
153
+ language_identification_library: str,
154
+ port: int = 7860,
155
+ share: bool = False,
156
+ debug: bool = False,
157
+ ):
158
+ self.device: str = device
159
+ self.model: str = model # 端口号
160
+ self.config_path: str = config_path # 是否公开部署,对外网开放
161
+ self.port: int = port # 是否开启debug模式
162
+ self.share: bool = share # 模型路径
163
+ self.debug: bool = debug # 配置文件路径
164
+ self.language_identification_library: str = (
165
+ language_identification_library # 语种识别库
166
+ )
167
+
168
+ @classmethod
169
+ def from_dict(cls, dataset_path: str, data: Dict[str, any]):
170
+ data["config_path"] = os.path.join(dataset_path, data["config_path"])
171
+ data["model"] = os.path.join(dataset_path, data["model"])
172
+ return cls(**data)
173
+
174
+
175
+ class Server_config:
176
+ def __init__(
177
+ self, models: List[Dict[str, any]], port: int = 5000, device: str = "cuda"
178
+ ):
179
+ self.models: List[Dict[str, any]] = models # 需要加载的所有模型的配置
180
+ self.port: int = port # 端口号
181
+ self.device: str = device # 模型默认使用设备
182
+
183
+ @classmethod
184
+ def from_dict(cls, data: Dict[str, any]):
185
+ return cls(**data)
186
+
187
+
188
+ class Translate_config:
189
+ """翻译api配置"""
190
+
191
+ def __init__(self, app_key: str, secret_key: str):
192
+ self.app_key = app_key
193
+ self.secret_key = secret_key
194
+
195
+ @classmethod
196
+ def from_dict(cls, data: Dict[str, any]):
197
+ return cls(**data)
198
+
199
+
200
+ class Config:
201
+ def __init__(self, config_path: str):
202
+ if not os.path.isfile(config_path) and os.path.isfile("default_config.yml"):
203
+ shutil.copy(src="default_config.yml", dst=config_path)
204
+ print(
205
+ f"已根据默认配置文件default_config.yml生成配置文件{config_path}。请按该配置文件的说明进行配置后重新运行。"
206
+ )
207
+ print("如无特殊需求,请勿修改default_config.yml或备份该文件。")
208
+ sys.exit(0)
209
+ with open(file=config_path, mode="r", encoding="utf-8") as file:
210
+ yaml_config: Dict[str, any] = yaml.safe_load(file.read())
211
+ dataset_path: str = yaml_config["dataset_path"]
212
+ openi_token: str = yaml_config["openi_token"]
213
+ self.dataset_path: str = dataset_path
214
+ self.mirror: str = yaml_config["mirror"]
215
+ self.openi_token: str = openi_token
216
+ self.resample_config: Resample_config = Resample_config.from_dict(
217
+ dataset_path, yaml_config["resample"]
218
+ )
219
+ self.preprocess_text_config: Preprocess_text_config = (
220
+ Preprocess_text_config.from_dict(
221
+ dataset_path, yaml_config["preprocess_text"]
222
+ )
223
+ )
224
+ self.bert_gen_config: Bert_gen_config = Bert_gen_config.from_dict(
225
+ dataset_path, yaml_config["bert_gen"]
226
+ )
227
+ self.emo_gen_config: Emo_gen_config = Emo_gen_config.from_dict(
228
+ dataset_path, yaml_config["emo_gen"]
229
+ )
230
+ self.train_ms_config: Train_ms_config = Train_ms_config.from_dict(
231
+ dataset_path, yaml_config["train_ms"]
232
+ )
233
+ self.webui_config: Webui_config = Webui_config.from_dict(
234
+ dataset_path, yaml_config["webui"]
235
+ )
236
+ self.server_config: Server_config = Server_config.from_dict(
237
+ yaml_config["server"]
238
+ )
239
+ self.translate_config: Translate_config = Translate_config.from_dict(
240
+ yaml_config["translate"]
241
+ )
242
+
243
+
244
+ parser = argparse.ArgumentParser()
245
+ # 为避免与以前的config.json起冲突,将其更名如下
246
+ parser.add_argument("-y", "--yml_config", type=str, default="config.yml")
247
+ args, _ = parser.parse_known_args()
248
+ config = Config(args.yml_config)
configs/config.json CHANGED
@@ -2,23 +2,26 @@
2
  "train": {
3
  "log_interval": 200,
4
  "eval_interval": 1000,
5
- "seed": 52,
6
- "epochs": 10000,
7
- "learning_rate": 0.0003,
8
  "betas": [
9
  0.8,
10
  0.99
11
  ],
12
  "eps": 1e-09,
13
- "batch_size": 8,
14
  "fp16_run": false,
15
- "lr_decay": 0.999875,
16
  "segment_size": 16384,
17
  "init_lr_ratio": 1,
18
  "warmup_epochs": 0,
19
  "c_mel": 45,
20
  "c_kl": 1.0,
21
- "skip_optimizer": true
 
 
 
22
  },
23
  "data": {
24
  "training_files": "filelists/train.list",
@@ -32,10 +35,864 @@
32
  "mel_fmin": 0.0,
33
  "mel_fmax": null,
34
  "add_blank": true,
35
- "n_speakers": 256,
36
  "cleaned_text": true,
37
  "spk2id": {
38
- "hanser": 0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
  },
41
  "model": {
@@ -91,5 +948,6 @@
91
  "n_layers_q": 3,
92
  "use_spectral_norm": false,
93
  "gin_channels": 256
94
- }
95
- }
 
 
2
  "train": {
3
  "log_interval": 200,
4
  "eval_interval": 1000,
5
+ "seed": 42,
6
+ "epochs": 1000,
7
+ "learning_rate": 0.0002,
8
  "betas": [
9
  0.8,
10
  0.99
11
  ],
12
  "eps": 1e-09,
13
+ "batch_size": 12,
14
  "fp16_run": false,
15
+ "lr_decay": 0.99995,
16
  "segment_size": 16384,
17
  "init_lr_ratio": 1,
18
  "warmup_epochs": 0,
19
  "c_mel": 45,
20
  "c_kl": 1.0,
21
+ "skip_optimizer": true,
22
+ "freeze_ZH_bert": false,
23
+ "freeze_JP_bert": false,
24
+ "freeze_EN_bert": false
25
  },
26
  "data": {
27
  "training_files": "filelists/train.list",
 
35
  "mel_fmin": 0.0,
36
  "mel_fmax": null,
37
  "add_blank": true,
38
+ "n_speakers": 896,
39
  "cleaned_text": true,
40
  "spk2id": {
41
+ "派蒙_ZH": 0,
42
+ "纳西妲_ZH": 1,
43
+ "凯亚_ZH": 2,
44
+ "阿贝多_ZH": 3,
45
+ "温迪_ZH": 4,
46
+ "枫原万叶_ZH": 5,
47
+ "钟离_ZH": 6,
48
+ "荒泷一斗_ZH": 7,
49
+ "八重神子_ZH": 8,
50
+ "艾尔海森_ZH": 9,
51
+ "提纳里_ZH": 10,
52
+ "迪希雅_ZH": 11,
53
+ "卡维_ZH": 12,
54
+ "宵宫_ZH": 13,
55
+ "那维莱特_ZH": 14,
56
+ "莱依拉_ZH": 15,
57
+ "赛诺_ZH": 16,
58
+ "莫娜_ZH": 17,
59
+ "诺艾尔_ZH": 18,
60
+ "托马_ZH": 19,
61
+ "凝光_ZH": 20,
62
+ "林尼_ZH": 21,
63
+ "北斗_ZH": 22,
64
+ "柯莱_ZH": 23,
65
+ "神里绫华_ZH": 24,
66
+ "可莉_ZH": 25,
67
+ "芭芭拉_ZH": 26,
68
+ "雷电将军_ZH": 27,
69
+ "娜维娅_ZH": 28,
70
+ "芙宁娜_ZH": 29,
71
+ "珊瑚宫心海_ZH": 30,
72
+ "鹿野院平藏_ZH": 31,
73
+ "迪奥娜_ZH": 32,
74
+ "琴_ZH": 33,
75
+ "五郎_ZH": 34,
76
+ "班尼特_ZH": 35,
77
+ "达达利亚_ZH": 36,
78
+ "安柏_ZH": 37,
79
+ "莱欧斯利_ZH": 38,
80
+ "夜兰_ZH": 39,
81
+ "妮露_ZH": 40,
82
+ "辛焱_ZH": 41,
83
+ "丽莎_ZH": 42,
84
+ "珐露珊_ZH": 43,
85
+ "魈_ZH": 44,
86
+ "香菱_ZH": 45,
87
+ "迪卢克_ZH": 46,
88
+ "砂糖_ZH": 47,
89
+ "烟绯_ZH": 48,
90
+ "早柚_ZH": 49,
91
+ "云堇_ZH": 50,
92
+ "刻晴_ZH": 51,
93
+ "重云_ZH": 52,
94
+ "优菈_ZH": 53,
95
+ "胡桃_ZH": 54,
96
+ "流浪者_ZH": 55,
97
+ "久岐忍_ZH": 56,
98
+ "神里绫人_ZH": 57,
99
+ "甘雨_ZH": 58,
100
+ "戴因斯雷布_ZH": 59,
101
+ "菲谢尔_ZH": 60,
102
+ "白术_ZH": 61,
103
+ "行秋_ZH": 62,
104
+ "九条裟罗_ZH": 63,
105
+ "夏洛蒂_ZH": 64,
106
+ "雷泽_ZH": 65,
107
+ "申鹤_ZH": 66,
108
+ "荧_ZH": 67,
109
+ "空_ZH": 68,
110
+ "迪娜泽黛_ZH": 69,
111
+ "凯瑟琳_ZH": 70,
112
+ "多莉_ZH": 71,
113
+ "坎蒂丝_ZH": 72,
114
+ "琳妮特_ZH": 73,
115
+ "萍姥姥_ZH": 74,
116
+ "罗莎莉亚_ZH": 75,
117
+ "埃德_ZH": 76,
118
+ "爱贝尔_ZH": 77,
119
+ "伊迪娅_ZH": 78,
120
+ "留云借风真君_ZH": 79,
121
+ "绮良良_ZH": 80,
122
+ "七七_ZH": 81,
123
+ "式大将_ZH": 82,
124
+ "瑶瑶_ZH": 83,
125
+ "奥兹_ZH": 84,
126
+ "菲米尼_ZH": 85,
127
+ "米卡_ZH": 86,
128
+ "哲平_ZH": 87,
129
+ "大肉丸_ZH": 88,
130
+ "托克_ZH": 89,
131
+ "蒂玛乌斯_ZH": 90,
132
+ "昆钧_ZH": 91,
133
+ "欧菲妮_ZH": 92,
134
+ "塞琉斯_ZH": 93,
135
+ "仆人_ZH": 94,
136
+ "迈勒斯_ZH": 95,
137
+ "希格雯_ZH": 96,
138
+ "阿守_ZH": 97,
139
+ "拉赫曼_ZH": 98,
140
+ "杜拉夫_ZH": 99,
141
+ "伊利亚斯_ZH": 100,
142
+ "阿晃_ZH": 101,
143
+ "旁白_ZH": 102,
144
+ "爱德琳_ZH": 103,
145
+ "埃洛伊_ZH": 104,
146
+ "德沃沙克_ZH": 105,
147
+ "玛乔丽_ZH": 106,
148
+ "塞塔蕾_ZH": 107,
149
+ "柊千里_ZH": 108,
150
+ "海芭夏_ZH": 109,
151
+ "九条镰治_ZH": 110,
152
+ "阿娜耶_ZH": 111,
153
+ "笼钓瓶一心_ZH": 112,
154
+ "回声海螺_ZH": 113,
155
+ "劳维克_ZH": 114,
156
+ "元太_ZH": 115,
157
+ "阿扎尔_ZH": 116,
158
+ "查尔斯_ZH": 117,
159
+ "阿洛瓦_ZH": 118,
160
+ "埃勒曼_ZH": 119,
161
+ "纳比尔_ZH": 120,
162
+ "莎拉_ZH": 121,
163
+ "康纳_ZH": 122,
164
+ "博来_ZH": 123,
165
+ "玛塞勒_ZH": 124,
166
+ "阿祇_ZH": 125,
167
+ "博士_ZH": 126,
168
+ "玛格丽特_ZH": 127,
169
+ "迪尔菲_ZH": 128,
170
+ "宛烟_ZH": 129,
171
+ "羽生田千鹤_ZH": 130,
172
+ "海妮耶_ZH": 131,
173
+ "旅行者_ZH": 132,
174
+ "霍夫曼_ZH": 133,
175
+ "佐西摩斯_ZH": 134,
176
+ "鹿野奈奈_ZH": 135,
177
+ "舒伯特_ZH": 136,
178
+ "天叔_ZH": 137,
179
+ "艾莉丝_ZH": 138,
180
+ "龙二_ZH": 139,
181
+ "莺儿_ZH": 140,
182
+ "嘉良_ZH": 141,
183
+ "一心传名刀_ZH": 142,
184
+ "费迪南德_ZH": 143,
185
+ "珊瑚_ZH": 144,
186
+ "言笑_ZH": 145,
187
+ "久利须_ZH": 146,
188
+ "嘉玛_ZH": 147,
189
+ "艾文_ZH": 148,
190
+ "克洛琳德_ZH": 149,
191
+ "丹吉尔_ZH": 150,
192
+ "女士_ZH": 151,
193
+ "白老先生_ZH": 152,
194
+ "天目十五_ZH": 153,
195
+ "老孟_ZH": 154,
196
+ "巴达维_ZH": 155,
197
+ "长生_ZH": 156,
198
+ "吴船长_ZH": 157,
199
+ "拉齐_ZH": 158,
200
+ "艾伯特_ZH": 159,
201
+ "松浦_ZH": 160,
202
+ "埃泽_ZH": 161,
203
+ "阿圆_ZH": 162,
204
+ "莫塞伊思_ZH": 163,
205
+ "阿拉夫_ZH": 164,
206
+ "杜吉耶_ZH": 165,
207
+ "石头_ZH": 166,
208
+ "百闻_ZH": 167,
209
+ "波洛_ZH": 168,
210
+ "斯坦利_ZH": 169,
211
+ "博易_ZH": 170,
212
+ "迈蒙_ZH": 171,
213
+ "掇星攫辰天君_ZH": 172,
214
+ "毗伽尔_ZH": 173,
215
+ "芙卡洛斯_ZH": 174,
216
+ "恶龙_ZH": 175,
217
+ "恕筠_ZH": 176,
218
+ "知易_ZH": 177,
219
+ "克列门特_ZH": 178,
220
+ "大慈树王_ZH": 179,
221
+ "西拉杰_ZH": 180,
222
+ "上杉_ZH": 181,
223
+ "阿尔卡米_ZH": 182,
224
+ "纯水精灵_ZH": 183,
225
+ "常九爷_ZH": 184,
226
+ "沙扎曼_ZH": 185,
227
+ "田铁嘴_ZH": 186,
228
+ "克罗索_ZH": 187,
229
+ "阿巴图伊_ZH": 188,
230
+ "悦_ZH": 189,
231
+ "阿佩普_ZH": 190,
232
+ "埃尔欣根_ZH": 191,
233
+ "萨赫哈蒂_ZH": 192,
234
+ "塔杰·拉德卡尼_ZH": 193,
235
+ "安西_ZH": 194,
236
+ "埃舍尔_ZH": 195,
237
+ "萨齐因_ZH": 196,
238
+ "派蒙_JP": 197,
239
+ "纳西妲_JP": 198,
240
+ "凯亚_JP": 199,
241
+ "阿贝多_JP": 200,
242
+ "温迪_JP": 201,
243
+ "枫原万叶_JP": 202,
244
+ "钟离_JP": 203,
245
+ "荒泷一斗_JP": 204,
246
+ "八重神子_JP": 205,
247
+ "艾尔海森_JP": 206,
248
+ "提纳里_JP": 207,
249
+ "迪希雅_JP": 208,
250
+ "卡维_JP": 209,
251
+ "宵宫_JP": 210,
252
+ "那维莱特_JP": 211,
253
+ "莱依拉_JP": 212,
254
+ "赛诺_JP": 213,
255
+ "莫娜_JP": 214,
256
+ "诺艾尔_JP": 215,
257
+ "托马_JP": 216,
258
+ "凝光_JP": 217,
259
+ "林尼_JP": 218,
260
+ "北斗_JP": 219,
261
+ "柯莱_JP": 220,
262
+ "神里绫华_JP": 221,
263
+ "可莉_JP": 222,
264
+ "芭芭拉_JP": 223,
265
+ "雷电将军_JP": 224,
266
+ "娜维娅_JP": 225,
267
+ "芙宁娜_JP": 226,
268
+ "珊瑚宫心海_JP": 227,
269
+ "鹿野院平藏_JP": 228,
270
+ "迪奥娜_JP": 229,
271
+ "琴_JP": 230,
272
+ "五郎_JP": 231,
273
+ "班尼特_JP": 232,
274
+ "达达利亚_JP": 233,
275
+ "安柏_JP": 234,
276
+ "莱欧斯利_JP": 235,
277
+ "夜兰_JP": 236,
278
+ "妮露_JP": 237,
279
+ "辛焱_JP": 238,
280
+ "丽莎_JP": 239,
281
+ "珐露珊_JP": 240,
282
+ "魈_JP": 241,
283
+ "香菱_JP": 242,
284
+ "迪卢克_JP": 243,
285
+ "砂糖_JP": 244,
286
+ "烟绯_JP": 245,
287
+ "早柚_JP": 246,
288
+ "云堇_JP": 247,
289
+ "刻晴_JP": 248,
290
+ "重云_JP": 249,
291
+ "优菈_JP": 250,
292
+ "胡桃_JP": 251,
293
+ "流浪者_JP": 252,
294
+ "久岐忍_JP": 253,
295
+ "神里绫人_JP": 254,
296
+ "甘雨_JP": 255,
297
+ "戴因斯雷布_JP": 256,
298
+ "菲谢尔_JP": 257,
299
+ "白术_JP": 258,
300
+ "行秋_JP": 259,
301
+ "九条裟罗_JP": 260,
302
+ "夏洛蒂_JP": 261,
303
+ "雷泽_JP": 262,
304
+ "申鹤_JP": 263,
305
+ "空_JP": 264,
306
+ "荧_JP": 265,
307
+ "迪娜泽黛_JP": 266,
308
+ "凯瑟琳_JP": 267,
309
+ "多莉_JP": 268,
310
+ "坎蒂丝_JP": 269,
311
+ "琳妮特_JP": 270,
312
+ "萍姥姥_JP": 271,
313
+ "罗莎莉亚_JP": 272,
314
+ "埃德_JP": 273,
315
+ "爱贝尔_JP": 274,
316
+ "伊迪娅_JP": 275,
317
+ "留云借风真君_JP": 276,
318
+ "绮良良_JP": 277,
319
+ "七七_JP": 278,
320
+ "式大将_JP": 279,
321
+ "瑶瑶_JP": 280,
322
+ "奥兹_JP": 281,
323
+ "菲米尼_JP": 282,
324
+ "米卡_JP": 283,
325
+ "哲平_JP": 284,
326
+ "大肉丸_JP": 285,
327
+ "托克_JP": 286,
328
+ "蒂玛乌斯_JP": 287,
329
+ "昆钧_JP": 288,
330
+ "欧菲妮_JP": 289,
331
+ "塞琉斯_JP": 290,
332
+ "仆人_JP": 291,
333
+ "迈勒斯_JP": 292,
334
+ "希格雯_JP": 293,
335
+ "阿守_JP": 294,
336
+ "拉赫曼_JP": 295,
337
+ "杜拉夫_JP": 296,
338
+ "伊利亚斯_JP": 297,
339
+ "阿晃_JP": 298,
340
+ "旁白_JP": 299,
341
+ "爱德琳_JP": 300,
342
+ "埃洛伊_JP": 301,
343
+ "德沃沙克_JP": 302,
344
+ "玛乔丽_JP": 303,
345
+ "塞塔蕾_JP": 304,
346
+ "柊千里_JP": 305,
347
+ "海芭夏_JP": 306,
348
+ "九条镰治_JP": 307,
349
+ "阿娜耶_JP": 308,
350
+ "笼钓瓶一心_JP": 309,
351
+ "回声海螺_JP": 310,
352
+ "劳维克_JP": 311,
353
+ "元太_JP": 312,
354
+ "阿扎尔_JP": 313,
355
+ "查尔斯_JP": 314,
356
+ "阿洛瓦_JP": 315,
357
+ "埃勒曼_JP": 316,
358
+ "纳比尔_JP": 317,
359
+ "莎拉_JP": 318,
360
+ "康纳_JP": 319,
361
+ "博来_JP": 320,
362
+ "玛塞勒_JP": 321,
363
+ "阿祇_JP": 322,
364
+ "博士_JP": 323,
365
+ "迪尔菲_JP": 324,
366
+ "玛格丽特_JP": 325,
367
+ "宛烟_JP": 326,
368
+ "羽生田千鹤_JP": 327,
369
+ "海妮耶_JP": 328,
370
+ "霍夫曼_JP": 329,
371
+ "旅行者_JP": 330,
372
+ "佐西摩斯_JP": 331,
373
+ "舒伯特_JP": 332,
374
+ "鹿野奈奈_JP": 333,
375
+ "天叔_JP": 334,
376
+ "龙二_JP": 335,
377
+ "艾莉丝_JP": 336,
378
+ "莺儿_JP": 337,
379
+ "嘉良_JP": 338,
380
+ "珊瑚_JP": 339,
381
+ "言笑_JP": 340,
382
+ "一心传名刀_JP": 341,
383
+ "费迪南德_JP": 342,
384
+ "久利须_JP": 343,
385
+ "嘉玛_JP": 344,
386
+ "艾文_JP": 345,
387
+ "克洛琳德_JP": 346,
388
+ "丹吉尔_JP": 347,
389
+ "天目十五_JP": 348,
390
+ "女士_JP": 349,
391
+ "老孟_JP": 350,
392
+ "白老先生_JP": 351,
393
+ "舍利夫_JP": 352,
394
+ "巴达维_JP": 353,
395
+ "拉齐_JP": 354,
396
+ "长生_JP": 355,
397
+ "吴船长_JP": 356,
398
+ "艾伯特_JP": 357,
399
+ "松浦_JP": 358,
400
+ "埃泽_JP": 359,
401
+ "阿圆_JP": 360,
402
+ "阿拉夫_JP": 361,
403
+ "莫塞伊思_JP": 362,
404
+ "石头_JP": 363,
405
+ "百闻_JP": 364,
406
+ "杜吉耶_JP": 365,
407
+ "波洛_JP": 366,
408
+ "掇星攫辰天君_JP": 367,
409
+ "迈蒙_JP": 368,
410
+ "博易_JP": 369,
411
+ "诗筠_JP": 370,
412
+ "斯坦利_JP": 371,
413
+ "毗伽尔_JP": 372,
414
+ "芙卡洛斯_JP": 373,
415
+ "恶龙_JP": 374,
416
+ "小仓澪_JP": 375,
417
+ "恕筠_JP": 376,
418
+ "知易_JP": 377,
419
+ "克列门特_JP": 378,
420
+ "大慈树王_JP": 379,
421
+ "望雅_JP": 380,
422
+ "黑田_JP": 381,
423
+ "卡莉娜_JP": 382,
424
+ "马姆杜_JP": 383,
425
+ "科林斯_JP": 384,
426
+ "上杉_JP": 385,
427
+ "西拉杰_JP": 386,
428
+ "菲尔戈黛特_JP": 387,
429
+ "一平_JP": 388,
430
+ "纯水精灵_JP": 389,
431
+ "阿尔卡米_JP": 390,
432
+ "老戴_JP": 391,
433
+ "谢赫祖拜尔_JP": 392,
434
+ "沙扎曼_JP": 393,
435
+ "田铁嘴_JP": 394,
436
+ "小野寺_JP": 395,
437
+ "百识_JP": 396,
438
+ "克罗索_JP": 397,
439
+ "莱斯格_JP": 398,
440
+ "芷巧_JP": 399,
441
+ "加藤洋平_JP": 400,
442
+ "阿巴图伊_JP": 401,
443
+ "埃尔欣根_JP": 402,
444
+ "斯嘉莉_JP": 403,
445
+ "阿佩普_JP": 404,
446
+ "巫女_JP": 405,
447
+ "卡布斯_JP": 406,
448
+ "洛伦佐_JP": 407,
449
+ "萨赫哈蒂_JP": 408,
450
+ "娜德瓦_JP": 409,
451
+ "塞德娜_JP": 410,
452
+ "塔杰·拉德卡尼_JP": 411,
453
+ "绘星_JP": 412,
454
+ "泽田_JP": 413,
455
+ "安西_JP": 414,
456
+ "拉伊德_JP": 415,
457
+ "亚卡巴_JP": 416,
458
+ "有乐斋_JP": 417,
459
+ "莱昂_JP": 418,
460
+ "尤苏波夫_JP": 419,
461
+ "夏妮_JP": 420,
462
+ "埃舍尔_JP": 421,
463
+ "萨齐因_JP": 422,
464
+ "古山_JP": 423,
465
+ "自称渊上之物_JP": 424,
466
+ "丹羽_JP": 425,
467
+ "塞萨尔的日记_JP": 426,
468
+ "派蒙_EN": 427,
469
+ "纳西妲_EN": 428,
470
+ "凯亚_EN": 429,
471
+ "阿贝多_EN": 430,
472
+ "温迪_EN": 431,
473
+ "枫原万叶_EN": 432,
474
+ "钟离_EN": 433,
475
+ "荒泷一斗_EN": 434,
476
+ "八重神子_EN": 435,
477
+ "艾尔海森_EN": 436,
478
+ "提纳里_EN": 437,
479
+ "迪希雅_EN": 438,
480
+ "卡维_EN": 439,
481
+ "宵宫_EN": 440,
482
+ "莱依拉_EN": 441,
483
+ "那维莱特_EN": 442,
484
+ "赛诺_EN": 443,
485
+ "莫娜_EN": 444,
486
+ "诺艾尔_EN": 445,
487
+ "托马_EN": 446,
488
+ "凝光_EN": 447,
489
+ "林尼_EN": 448,
490
+ "北斗_EN": 449,
491
+ "柯莱_EN": 450,
492
+ "神里绫华_EN": 451,
493
+ "可莉_EN": 452,
494
+ "芭芭拉_EN": 453,
495
+ "雷电将军_EN": 454,
496
+ "娜维娅_EN": 455,
497
+ "芙宁娜_EN": 456,
498
+ "珊瑚宫心海_EN": 457,
499
+ "鹿野院平藏_EN": 458,
500
+ "迪奥娜_EN": 459,
501
+ "五郎_EN": 460,
502
+ "琴_EN": 461,
503
+ "班尼特_EN": 462,
504
+ "达达利亚_EN": 463,
505
+ "安柏_EN": 464,
506
+ "莱欧斯利_EN": 465,
507
+ "夜兰_EN": 466,
508
+ "妮露_EN": 467,
509
+ "辛焱_EN": 468,
510
+ "珐露珊_EN": 469,
511
+ "丽莎_EN": 470,
512
+ "魈_EN": 471,
513
+ "香菱_EN": 472,
514
+ "迪卢克_EN": 473,
515
+ "砂糖_EN": 474,
516
+ "烟绯_EN": 475,
517
+ "早柚_EN": 476,
518
+ "云堇_EN": 477,
519
+ "刻晴_EN": 478,
520
+ "重云_EN": 479,
521
+ "优菈_EN": 480,
522
+ "胡桃_EN": 481,
523
+ "流浪者_EN": 482,
524
+ "久岐忍_EN": 483,
525
+ "神里绫人_EN": 484,
526
+ "甘雨_EN": 485,
527
+ "戴因斯雷布_EN": 486,
528
+ "菲谢尔_EN": 487,
529
+ "白术_EN": 488,
530
+ "行秋_EN": 489,
531
+ "九条裟罗_EN": 490,
532
+ "夏洛蒂_EN": 491,
533
+ "雷泽_EN": 492,
534
+ "申鹤_EN": 493,
535
+ "荧_EN": 494,
536
+ "空_EN": 495,
537
+ "迪娜泽黛_EN": 496,
538
+ "凯瑟琳_EN": 497,
539
+ "多莉_EN": 498,
540
+ "坎蒂丝_EN": 499,
541
+ "琳妮特_EN": 500,
542
+ "萍姥姥_EN": 501,
543
+ "罗莎莉亚_EN": 502,
544
+ "埃德_EN": 503,
545
+ "爱贝尔_EN": 504,
546
+ "伊迪娅_EN": 505,
547
+ "留云借风真君_EN": 506,
548
+ "绮良良_EN": 507,
549
+ "七七_EN": 508,
550
+ "式大将_EN": 509,
551
+ "瑶瑶_EN": 510,
552
+ "奥兹_EN": 511,
553
+ "菲米尼_EN": 512,
554
+ "米卡_EN": 513,
555
+ "哲平_EN": 514,
556
+ "大肉丸_EN": 515,
557
+ "托克_EN": 516,
558
+ "蒂玛乌斯_EN": 517,
559
+ "昆钧_EN": 518,
560
+ "欧菲妮_EN": 519,
561
+ "塞琉斯_EN": 520,
562
+ "仆人_EN": 521,
563
+ "迈勒斯_EN": 522,
564
+ "希格雯_EN": 523,
565
+ "阿守_EN": 524,
566
+ "拉赫曼_EN": 525,
567
+ "杜拉夫_EN": 526,
568
+ "伊利亚斯_EN": 527,
569
+ "阿晃_EN": 528,
570
+ "���白_EN": 529,
571
+ "爱德琳_EN": 530,
572
+ "埃洛伊_EN": 531,
573
+ "德沃沙克_EN": 532,
574
+ "玛乔丽_EN": 533,
575
+ "塞塔蕾_EN": 534,
576
+ "柊千里_EN": 535,
577
+ "海芭夏_EN": 536,
578
+ "九条镰治_EN": 537,
579
+ "阿娜耶_EN": 538,
580
+ "笼钓瓶一心_EN": 539,
581
+ "回声海螺_EN": 540,
582
+ "劳维克_EN": 541,
583
+ "元太_EN": 542,
584
+ "阿扎尔_EN": 543,
585
+ "查尔斯_EN": 544,
586
+ "阿洛瓦_EN": 545,
587
+ "埃勒曼_EN": 546,
588
+ "纳比尔_EN": 547,
589
+ "莎拉_EN": 548,
590
+ "康纳_EN": 549,
591
+ "博来_EN": 550,
592
+ "玛塞勒_EN": 551,
593
+ "阿祇_EN": 552,
594
+ "博士_EN": 553,
595
+ "迪尔菲_EN": 554,
596
+ "宛烟_EN": 555,
597
+ "玛格丽特_EN": 556,
598
+ "羽生田千鹤_EN": 557,
599
+ "海妮耶_EN": 558,
600
+ "霍夫曼_EN": 559,
601
+ "旅行者_EN": 560,
602
+ "佐西摩斯_EN": 561,
603
+ "鹿野奈奈_EN": 562,
604
+ "舒伯特_EN": 563,
605
+ "天叔_EN": 564,
606
+ "艾莉丝_EN": 565,
607
+ "龙二_EN": 566,
608
+ "莺儿_EN": 567,
609
+ "嘉良_EN": 568,
610
+ "珊瑚_EN": 569,
611
+ "费迪南德_EN": 570,
612
+ "言笑_EN": 571,
613
+ "一心传名刀_EN": 572,
614
+ "久利须_EN": 573,
615
+ "嘉玛_EN": 574,
616
+ "艾文_EN": 575,
617
+ "克洛琳德_EN": 576,
618
+ "丹吉尔_EN": 577,
619
+ "女士_EN": 578,
620
+ "天目十五_EN": 579,
621
+ "老孟_EN": 580,
622
+ "白老先生_EN": 581,
623
+ "舍利夫_EN": 582,
624
+ "巴达维_EN": 583,
625
+ "拉齐_EN": 584,
626
+ "长生_EN": 585,
627
+ "吴船长_EN": 586,
628
+ "艾伯特_EN": 587,
629
+ "松浦_EN": 588,
630
+ "埃泽_EN": 589,
631
+ "阿圆_EN": 590,
632
+ "阿拉夫_EN": 591,
633
+ "莫塞伊思_EN": 592,
634
+ "石头_EN": 593,
635
+ "百闻_EN": 594,
636
+ "杜吉耶_EN": 595,
637
+ "波洛_EN": 596,
638
+ "斯坦利_EN": 597,
639
+ "掇星攫辰天君_EN": 598,
640
+ "迈蒙_EN": 599,
641
+ "博易_EN": 600,
642
+ "诗筠_EN": 601,
643
+ "毗伽尔_EN": 602,
644
+ "慧心_EN": 603,
645
+ "芙卡洛斯_EN": 604,
646
+ "恶龙_EN": 605,
647
+ "小仓澪_EN": 606,
648
+ "恕筠_EN": 607,
649
+ "知易_EN": 608,
650
+ "克列门特_EN": 609,
651
+ "大慈树王_EN": 610,
652
+ "维多利亚_EN": 611,
653
+ "黑田_EN": 612,
654
+ "马姆杜_EN": 613,
655
+ "科林斯_EN": 614,
656
+ "上杉_EN": 615,
657
+ "西拉杰_EN": 616,
658
+ "宁禄_EN": 617,
659
+ "纯水精灵_EN": 618,
660
+ "常九爷_EN": 619,
661
+ "阿尔卡米_EN": 620,
662
+ "沙扎曼_EN": 621,
663
+ "田铁嘴_EN": 622,
664
+ "加萨尼_EN": 623,
665
+ "克罗索_EN": 624,
666
+ "星稀_EN": 625,
667
+ "莱斯格_EN": 626,
668
+ "阿巴图伊_EN": 627,
669
+ "悦_EN": 628,
670
+ "德田_EN": 629,
671
+ "埃尔欣根_EN": 630,
672
+ "阿佩普_EN": 631,
673
+ "萨赫哈蒂_EN": 632,
674
+ "洛伦佐_EN": 633,
675
+ "塔杰·拉德卡尼_EN": 634,
676
+ "泽田_EN": 635,
677
+ "安西_EN": 636,
678
+ "理水叠山真君_EN": 637,
679
+ "埃舍尔_EN": 638,
680
+ "萨齐因_EN": 639,
681
+ "古田_EN": 640,
682
+ "三月七_ZH": 641,
683
+ "丹恒_ZH": 642,
684
+ "希儿_ZH": 643,
685
+ "娜塔莎_ZH": 644,
686
+ "希露瓦_ZH": 645,
687
+ "瓦尔特_ZH": 646,
688
+ "佩拉_ZH": 647,
689
+ "布洛妮娅_ZH": 648,
690
+ "虎克_ZH": 649,
691
+ "素裳_ZH": 650,
692
+ "克拉拉_ZH": 651,
693
+ "符玄_ZH": 652,
694
+ "白露_ZH": 653,
695
+ "杰帕德_ZH": 654,
696
+ "景元_ZH": 655,
697
+ "藿藿_ZH": 656,
698
+ "姬子_ZH": 657,
699
+ "穹_ZH": 658,
700
+ "星_ZH": 659,
701
+ "卡芙卡_ZH": 660,
702
+ "桂乃芬_ZH": 661,
703
+ "艾丝妲_ZH": 662,
704
+ "玲可_ZH": 663,
705
+ "彦卿_ZH": 664,
706
+ "托帕_ZH": 665,
707
+ "驭空_ZH": 666,
708
+ "浮烟_ZH": 667,
709
+ "停云_ZH": 668,
710
+ "镜流_ZH": 669,
711
+ "罗刹_ZH": 670,
712
+ "卢卡_ZH": 671,
713
+ "史瓦罗_ZH": 672,
714
+ "黑塔_ZH": 673,
715
+ "桑博_ZH": 674,
716
+ "伦纳德_ZH": 675,
717
+ "明曦_ZH": 676,
718
+ "银狼_ZH": 677,
719
+ "帕姆_ZH": 678,
720
+ "青雀_ZH": 679,
721
+ "乔瓦尼_ZH": 680,
722
+ "公输师傅_ZH": 681,
723
+ "晴霓_ZH": 682,
724
+ "螺丝咕姆_ZH": 683,
725
+ "阿兰_ZH": 684,
726
+ "奥列格_ZH": 685,
727
+ "丹枢_ZH": 686,
728
+ "尾巴_ZH": 687,
729
+ "寒鸦_ZH": 688,
730
+ "雪衣_ZH": 689,
731
+ "可可利亚_ZH": 690,
732
+ "青镞_ZH": 691,
733
+ "半夏_ZH": 692,
734
+ "银枝_ZH": 693,
735
+ "大毫_ZH": 694,
736
+ "霄翰_ZH": 695,
737
+ "信使_ZH": 696,
738
+ "费斯曼_ZH": 697,
739
+ "绿芙蓉_ZH": 698,
740
+ "dev_成男_ZH": 699,
741
+ "金人会长_ZH": 700,
742
+ "维利特_ZH": 701,
743
+ "维尔德_ZH": 702,
744
+ "斯科特_ZH": 703,
745
+ "卡波特_ZH": 704,
746
+ "刃_ZH": 705,
747
+ "岩明_ZH": 706,
748
+ "浣溪_ZH": 707,
749
+ "三月七_JP": 708,
750
+ "丹恒_JP": 709,
751
+ "希儿_JP": 710,
752
+ "娜塔莎_JP": 711,
753
+ "希露瓦_JP": 712,
754
+ "瓦尔特_JP": 713,
755
+ "佩拉_JP": 714,
756
+ "布洛妮娅_JP": 715,
757
+ "虎克_JP": 716,
758
+ "素裳_JP": 717,
759
+ "克拉拉_JP": 718,
760
+ "符玄_JP": 719,
761
+ "白露_JP": 720,
762
+ "杰帕德_JP": 721,
763
+ "景元_JP": 722,
764
+ "藿藿_JP": 723,
765
+ "姬子_JP": 724,
766
+ "卡芙卡_JP": 725,
767
+ "穹_JP": 726,
768
+ "星_JP": 727,
769
+ "桂乃芬_JP": 728,
770
+ "艾丝妲_JP": 729,
771
+ "彦卿_JP": 730,
772
+ "玲可_JP": 731,
773
+ "托帕_JP": 732,
774
+ "驭空_JP": 733,
775
+ "浮烟_JP": 734,
776
+ "停云_JP": 735,
777
+ "镜流_JP": 736,
778
+ "罗刹_JP": 737,
779
+ "卢卡_JP": 738,
780
+ "史瓦罗_JP": 739,
781
+ "黑塔_JP": 740,
782
+ "桑博_JP": 741,
783
+ "伦纳德_JP": 742,
784
+ "明曦_JP": 743,
785
+ "银狼_JP": 744,
786
+ "帕姆_JP": 745,
787
+ "青雀_JP": 746,
788
+ "乔瓦尼_JP": 747,
789
+ "公输师傅_JP": 748,
790
+ "晴霓_JP": 749,
791
+ "螺丝咕姆_JP": 750,
792
+ "阿兰_JP": 751,
793
+ "奥列格_JP": 752,
794
+ "丹枢_JP": 753,
795
+ "尾巴_JP": 754,
796
+ "寒鸦_JP": 755,
797
+ "雪衣_JP": 756,
798
+ "可可利亚_JP": 757,
799
+ "青镞_JP": 758,
800
+ "半夏_JP": 759,
801
+ "银枝_JP": 760,
802
+ "大毫_JP": 761,
803
+ "霄翰_JP": 762,
804
+ "信使_JP": 763,
805
+ "费斯曼_JP": 764,
806
+ "绿芙蓉_JP": 765,
807
+ "dev_成男_JP": 766,
808
+ "金人会长_JP": 767,
809
+ "维利特_JP": 768,
810
+ "维尔德_JP": 769,
811
+ "斯科特_JP": 770,
812
+ "刃_JP": 771,
813
+ "卡波特_JP": 772,
814
+ "岩明_JP": 773,
815
+ "浣溪_JP": 774,
816
+ "净砚_JP": 775,
817
+ "紫月季_JP": 776,
818
+ "歌蒂_JP": 777,
819
+ "奇怪的云骑_JP": 778,
820
+ "幻胧_JP": 779,
821
+ "斯薇塔_JP": 780,
822
+ "隐书_JP": 781,
823
+ "三月七_EN": 782,
824
+ "丹恒_EN": 783,
825
+ "希儿_EN": 784,
826
+ "娜塔莎_EN": 785,
827
+ "希露瓦_EN": 786,
828
+ "瓦尔特_EN": 787,
829
+ "佩拉_EN": 788,
830
+ "布洛妮娅_EN": 789,
831
+ "虎克_EN": 790,
832
+ "素裳_EN": 791,
833
+ "克拉拉_EN": 792,
834
+ "符玄_EN": 793,
835
+ "白露_EN": 794,
836
+ "杰帕德_EN": 795,
837
+ "景元_EN": 796,
838
+ "藿藿_EN": 797,
839
+ "姬子_EN": 798,
840
+ "卡芙卡_EN": 799,
841
+ "穹_EN": 800,
842
+ "星_EN": 801,
843
+ "桂乃芬_EN": 802,
844
+ "艾丝妲_EN": 803,
845
+ "彦卿_EN": 804,
846
+ "玲可_EN": 805,
847
+ "托帕_EN": 806,
848
+ "驭空_EN": 807,
849
+ "浮烟_EN": 808,
850
+ "停云_EN": 809,
851
+ "镜流_EN": 810,
852
+ "罗刹_EN": 811,
853
+ "卢卡_EN": 812,
854
+ "史瓦罗_EN": 813,
855
+ "黑塔_EN": 814,
856
+ "桑博_EN": 815,
857
+ "伦纳德_EN": 816,
858
+ "明曦_EN": 817,
859
+ "银狼_EN": 818,
860
+ "帕姆_EN": 819,
861
+ "青雀_EN": 820,
862
+ "乔瓦尼_EN": 821,
863
+ "公输师傅_EN": 822,
864
+ "晴霓_EN": 823,
865
+ "螺丝咕姆_EN": 824,
866
+ "阿兰_EN": 825,
867
+ "奥列格_EN": 826,
868
+ "丹枢_EN": 827,
869
+ "尾巴_EN": 828,
870
+ "寒鸦_EN": 829,
871
+ "雪衣_EN": 830,
872
+ "可可利亚_EN": 831,
873
+ "青镞_EN": 832,
874
+ "半夏_EN": 833,
875
+ "银枝_EN": 834,
876
+ "大毫_EN": 835,
877
+ "霄翰_EN": 836,
878
+ "信使_EN": 837,
879
+ "费斯曼_EN": 838,
880
+ "绿芙蓉_EN": 839,
881
+ "dev_成男_EN": 840,
882
+ "金人会长_EN": 841,
883
+ "维利特_EN": 842,
884
+ "维尔德_EN": 843,
885
+ "刃_EN": 844,
886
+ "卡波特_EN": 845,
887
+ "岩明_EN": 846,
888
+ "浣溪_EN": 847,
889
+ "紫月季_EN": 848,
890
+ "幻胧_EN": 849,
891
+ "女声_EN": 850,
892
+ "陆景和": 851,
893
+ "莫弈": 852,
894
+ "左然": 853,
895
+ "夏彦": 854
896
  }
897
  },
898
  "model": {
 
948
  "n_layers_q": 3,
949
  "use_spectral_norm": false,
950
  "gin_channels": 256
951
+ },
952
+ "version": "2.2"
953
+ }
css/custom.css ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ #yml_code {
3
+ height: 600px;
4
+ flex-grow: inherit;
5
+ overflow-y: auto;
6
+ }
7
+
8
+ #json_code {
9
+ height: 600px;
10
+ flex-grow: inherit;
11
+ overflow-y: auto;
12
+ }
13
+
14
+ #gpu_code {
15
+ height: 300px;
16
+ flex-grow: inherit;
17
+ overflow-y: auto;
18
+ }