cortico-world-fish-sing 0.4.21 → 0.4.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/assets/models.manifest.json +12 -6
- package/dist/{webui-f4daa0a9.js → webui-b69dd33a.js} +24 -3
- package/dist/webui.js +24 -3
- package/package.json +45 -45
- package/src/setup.ts +13 -0
- package/tests/test_engine_logic.py +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/);版本号遵循语义化。
|
|
4
4
|
|
|
5
|
+
## [0.4.22] - 2026-11-06
|
|
6
|
+
|
|
7
|
+
### 修复
|
|
8
|
+
- **自检把「出厂默认模型」算成必需,导致换过模型后显示"4/6 未就绪"**(用户会以为装坏了):把 `dfy2.pth` + 它的检索索引标为**可选**(`required:false`),必需组件只剩 hubert / rmvpe / 两个训练底模。
|
|
9
|
+
- 磁贴文案:必需齐全时显示「就绪 · 默认模型未装」(绿色),只有必需缺了才显示「缺 N 项」
|
|
10
|
+
- 按钮:必需齐全但默认模型缺 → 「补下默认模型(349 MB)」;不再一直挂着「下载模型权重」
|
|
11
|
+
- 说明文案改成区分「必需 557 MB」和「可选 349 MB」
|
|
12
|
+
- 面板侧做了文件名兜底判断,**不需要重启就能看到正确结果**
|
|
13
|
+
|
|
5
14
|
## [0.4.21] - 2026-11-06
|
|
6
15
|
|
|
7
16
|
### 新增
|
|
@@ -9,37 +9,43 @@
|
|
|
9
9
|
"name": "dfy2.pth",
|
|
10
10
|
"size": 55193472,
|
|
11
11
|
"sha256": "11a79a086aeca9a28493adb3288c3a61ef488ed16b8d916b5a2aa26e47fd8d1d",
|
|
12
|
-
"target": "assets/weights/dfy2.pth"
|
|
12
|
+
"target": "assets/weights/dfy2.pth",
|
|
13
|
+
"required": false
|
|
13
14
|
},
|
|
14
15
|
{
|
|
15
16
|
"name": "added_IVF2529_Flat_nprobe_1_dfy2_v2.index",
|
|
16
17
|
"size": 311680739,
|
|
17
18
|
"sha256": "25f7003a2b9eadcc3d3f1c49d3e265524add799d063665d3c7bea31df07879ea",
|
|
18
|
-
"target": "logs/dfy2/added_IVF2529_Flat_nprobe_1_dfy2_v2.index"
|
|
19
|
+
"target": "logs/dfy2/added_IVF2529_Flat_nprobe_1_dfy2_v2.index",
|
|
20
|
+
"required": false
|
|
19
21
|
},
|
|
20
22
|
{
|
|
21
23
|
"name": "pytorch_model.bin",
|
|
22
24
|
"size": 189206711,
|
|
23
25
|
"sha256": "cc8c20f4b90a520757260197a3ff2505705a7adbd20ad9eeaa4e1a9b38442ef5",
|
|
24
|
-
"target": "assets/hubert_base/pytorch_model.bin"
|
|
26
|
+
"target": "assets/hubert_base/pytorch_model.bin",
|
|
27
|
+
"required": true
|
|
25
28
|
},
|
|
26
29
|
{
|
|
27
30
|
"name": "rmvpe.pt",
|
|
28
31
|
"size": 181184272,
|
|
29
32
|
"sha256": "6d62215f4306e3ca278246188607209f09af3dc77ed4232efdd069798c4ec193",
|
|
30
|
-
"target": "assets/rmvpe/rmvpe.pt"
|
|
33
|
+
"target": "assets/rmvpe/rmvpe.pt",
|
|
34
|
+
"required": true
|
|
31
35
|
},
|
|
32
36
|
{
|
|
33
37
|
"name": "f0G40k.pth",
|
|
34
38
|
"size": 73106273,
|
|
35
39
|
"sha256": "3b2c44035e782c4b14ddc0bede9e2f4a724d025cd073f736d4f43708453adfcb",
|
|
36
|
-
"target": "assets/pretrained_v2/f0G40k.pth"
|
|
40
|
+
"target": "assets/pretrained_v2/f0G40k.pth",
|
|
41
|
+
"required": true
|
|
37
42
|
},
|
|
38
43
|
{
|
|
39
44
|
"name": "f0D40k.pth",
|
|
40
45
|
"size": 142875703,
|
|
41
46
|
"sha256": "6b6ab091e70801b28e3f41f335f2fc5f3f35c75b39ae2628d419644ec2b0fa09",
|
|
42
|
-
"target": "assets/pretrained_v2/f0D40k.pth"
|
|
47
|
+
"target": "assets/pretrained_v2/f0D40k.pth",
|
|
48
|
+
"required": true
|
|
43
49
|
}
|
|
44
50
|
]
|
|
45
51
|
}
|
|
@@ -365,7 +365,9 @@ function mountSetup(ctx) {
|
|
|
365
365
|
const list = el('div', 'fs-list');
|
|
366
366
|
const hint = el('div', 'fs-hint');
|
|
367
367
|
hint.textContent =
|
|
368
|
-
'
|
|
368
|
+
'必需组件约 557 MB:ContentVec + RMVPE + 两个训练底模——这几个缺了才真的用不了,下载后自动校验 sha256。\n'
|
|
369
|
+
+ '出厂默认模型(dfy2 + 检索索引,约 349 MB)是可选的示例;换过模型之后删掉它完全没问题,'
|
|
370
|
+
+ '自检只会显示「默认模型未装」,点按钮可补。\n'
|
|
369
371
|
+ '运行时是 Python 环境:GPU 版下载约 2.5 GB、装完约 6 GB(55 秒的歌约 8 秒换完);'
|
|
370
372
|
+ 'CPU 版只要约 200 MB,但慢 6~8 倍。已经装好 torch 的不会被覆盖。';
|
|
371
373
|
|
|
@@ -415,9 +417,26 @@ function mountSetup(ctx) {
|
|
|
415
417
|
const paint = (st) => {
|
|
416
418
|
const m = st.models || [];
|
|
417
419
|
const ready = m.filter((x) => x.ready).length;
|
|
420
|
+
// 必需(hubert/rmvpe/底模)才算"能不能用";出厂默认模型 dfy2 是可选的示例,
|
|
421
|
+
// 换过模型后删掉它很常见,不能因此把整块显示成"4/6 未就绪"(用户会以为装坏了)。
|
|
422
|
+
// world 侧重启后会给 required 字段;没给时按文件名兜底认出厂默认模型(dfy2 的 .pth 和它的索引),
|
|
423
|
+
// 这样不重启也能立刻显示正确结果。
|
|
424
|
+
const isOptional = (x) => (x.required === false)
|
|
425
|
+
|| (x.required === undefined
|
|
426
|
+
&& (/assets[\\/]weights[\\/]dfy2\.pth$/.test(x.target || '') || /logs[\\/]dfy2[\\/]/.test(x.target || '')));
|
|
427
|
+
const need = m.filter((x) => !isOptional(x));
|
|
428
|
+
const needReady = need.filter((x) => x.ready).length;
|
|
429
|
+
const weightsOk = needReady === need.length;
|
|
430
|
+
const optList = m.filter((x) => isOptional(x) && !x.ready);
|
|
431
|
+
const optMissing = Number(st.optionalMissing ?? optList.length);
|
|
432
|
+
// 大小也要有兜底:world 重启前不带 optionalMissingBytes,之前会显示「补下默认模型(0.0 MB)」
|
|
433
|
+
const optMissingBytes = Number(st.optionalMissingBytes ?? optList.reduce((n, x) => n + (Number(x.size) || 0), 0));
|
|
434
|
+
const weightsText = weightsOk
|
|
435
|
+
? (optMissing ? '就绪 · 默认模型未装' : `就绪 · ${needReady}/${need.length}`)
|
|
436
|
+
: `缺 ${need.length - needReady} 项 · ${needReady}/${need.length}`;
|
|
418
437
|
cards.replaceChildren(
|
|
419
438
|
card('RVC 代码', st.rvc && st.rvc.ready ? '已就绪' : '缺失', st.rvc && st.rvc.ready ? 'ok' : 'bad'),
|
|
420
|
-
card('模型权重',
|
|
439
|
+
card('模型权重', weightsText, weightsOk ? 'ok' : needReady ? 'warn' : 'bad'),
|
|
421
440
|
card('Python 运行时', st.python && st.python.ok ? '已就绪' : '未安装', st.python && st.python.ok ? 'ok' : 'bad'),
|
|
422
441
|
card('ffmpeg', st.ffmpeg && st.ffmpeg.ok ? '已就绪' : '没找到', st.ffmpeg && st.ffmpeg.ok ? 'ok' : 'bad'),
|
|
423
442
|
);
|
|
@@ -449,7 +468,9 @@ function mountSetup(ctx) {
|
|
|
449
468
|
}
|
|
450
469
|
|
|
451
470
|
// 按钮文案跟着状态走,避免"已经装好了还写着安装"
|
|
452
|
-
dl.textContent =
|
|
471
|
+
dl.textContent = weightsOk
|
|
472
|
+
? (optMissing ? `补下默认模型(${mb(optMissingBytes)})` : '校验权重')
|
|
473
|
+
: `下载必需组件(${mb(st.totalBytes - st.doneBytes)})`;
|
|
453
474
|
if (st.python && st.python.ok) {
|
|
454
475
|
gpu.textContent = '重装 GPU 运行时';
|
|
455
476
|
cpu.textContent = '重装 CPU 运行时';
|
package/dist/webui.js
CHANGED
|
@@ -365,7 +365,9 @@ function mountSetup(ctx) {
|
|
|
365
365
|
const list = el('div', 'fs-list');
|
|
366
366
|
const hint = el('div', 'fs-hint');
|
|
367
367
|
hint.textContent =
|
|
368
|
-
'
|
|
368
|
+
'必需组件约 557 MB:ContentVec + RMVPE + 两个训练底模——这几个缺了才真的用不了,下载后自动校验 sha256。\n'
|
|
369
|
+
+ '出厂默认模型(dfy2 + 检索索引,约 349 MB)是可选的示例;换过模型之后删掉它完全没问题,'
|
|
370
|
+
+ '自检只会显示「默认模型未装」,点按钮可补。\n'
|
|
369
371
|
+ '运行时是 Python 环境:GPU 版下载约 2.5 GB、装完约 6 GB(55 秒的歌约 8 秒换完);'
|
|
370
372
|
+ 'CPU 版只要约 200 MB,但慢 6~8 倍。已经装好 torch 的不会被覆盖。';
|
|
371
373
|
|
|
@@ -415,9 +417,26 @@ function mountSetup(ctx) {
|
|
|
415
417
|
const paint = (st) => {
|
|
416
418
|
const m = st.models || [];
|
|
417
419
|
const ready = m.filter((x) => x.ready).length;
|
|
420
|
+
// 必需(hubert/rmvpe/底模)才算"能不能用";出厂默认模型 dfy2 是可选的示例,
|
|
421
|
+
// 换过模型后删掉它很常见,不能因此把整块显示成"4/6 未就绪"(用户会以为装坏了)。
|
|
422
|
+
// world 侧重启后会给 required 字段;没给时按文件名兜底认出厂默认模型(dfy2 的 .pth 和它的索引),
|
|
423
|
+
// 这样不重启也能立刻显示正确结果。
|
|
424
|
+
const isOptional = (x) => (x.required === false)
|
|
425
|
+
|| (x.required === undefined
|
|
426
|
+
&& (/assets[\\/]weights[\\/]dfy2\.pth$/.test(x.target || '') || /logs[\\/]dfy2[\\/]/.test(x.target || '')));
|
|
427
|
+
const need = m.filter((x) => !isOptional(x));
|
|
428
|
+
const needReady = need.filter((x) => x.ready).length;
|
|
429
|
+
const weightsOk = needReady === need.length;
|
|
430
|
+
const optList = m.filter((x) => isOptional(x) && !x.ready);
|
|
431
|
+
const optMissing = Number(st.optionalMissing ?? optList.length);
|
|
432
|
+
// 大小也要有兜底:world 重启前不带 optionalMissingBytes,之前会显示「补下默认模型(0.0 MB)」
|
|
433
|
+
const optMissingBytes = Number(st.optionalMissingBytes ?? optList.reduce((n, x) => n + (Number(x.size) || 0), 0));
|
|
434
|
+
const weightsText = weightsOk
|
|
435
|
+
? (optMissing ? '就绪 · 默认模型未装' : `就绪 · ${needReady}/${need.length}`)
|
|
436
|
+
: `缺 ${need.length - needReady} 项 · ${needReady}/${need.length}`;
|
|
418
437
|
cards.replaceChildren(
|
|
419
438
|
card('RVC 代码', st.rvc && st.rvc.ready ? '已就绪' : '缺失', st.rvc && st.rvc.ready ? 'ok' : 'bad'),
|
|
420
|
-
card('模型权重',
|
|
439
|
+
card('模型权重', weightsText, weightsOk ? 'ok' : needReady ? 'warn' : 'bad'),
|
|
421
440
|
card('Python 运行时', st.python && st.python.ok ? '已就绪' : '未安装', st.python && st.python.ok ? 'ok' : 'bad'),
|
|
422
441
|
card('ffmpeg', st.ffmpeg && st.ffmpeg.ok ? '已就绪' : '没找到', st.ffmpeg && st.ffmpeg.ok ? 'ok' : 'bad'),
|
|
423
442
|
);
|
|
@@ -449,7 +468,9 @@ function mountSetup(ctx) {
|
|
|
449
468
|
}
|
|
450
469
|
|
|
451
470
|
// 按钮文案跟着状态走,避免"已经装好了还写着安装"
|
|
452
|
-
dl.textContent =
|
|
471
|
+
dl.textContent = weightsOk
|
|
472
|
+
? (optMissing ? `补下默认模型(${mb(optMissingBytes)})` : '校验权重')
|
|
473
|
+
: `下载必需组件(${mb(st.totalBytes - st.doneBytes)})`;
|
|
453
474
|
if (st.python && st.python.ok) {
|
|
454
475
|
gpu.textContent = '重装 GPU 运行时';
|
|
455
476
|
cpu.textContent = '重装 CPU 运行时';
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "cortico-world-fish-sing",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "让她真的开口唱:B 站点歌或本地文件 → 分离 → 换声 → 混音,本机出声或发 QQ 语音条",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./src/index.ts",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"author": "FXYXL",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"cortico-world",
|
|
11
|
-
"cortico",
|
|
12
|
-
"coo",
|
|
13
|
-
"sing",
|
|
14
|
-
"rvc",
|
|
15
|
-
"music",
|
|
16
|
-
"qq"
|
|
17
|
-
],
|
|
18
|
-
"engines": {
|
|
19
|
-
"node": ">=22.6"
|
|
20
|
-
},
|
|
21
|
-
"homepage": "https://github.com/FXYXL/cortico-world-fish-sing#readme",
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/FXYXL/cortico-world-fish-sing.git"
|
|
25
|
-
},
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/FXYXL/cortico-world-fish-sing/issues"
|
|
28
|
-
},
|
|
29
|
-
"cortico": {
|
|
30
|
-
"kind": "world",
|
|
31
|
-
"api": 6,
|
|
32
|
-
"label": "大肥鱼唱歌",
|
|
33
|
-
"tags": [
|
|
34
|
-
"music",
|
|
35
|
-
"qq",
|
|
36
|
-
"local"
|
|
37
|
-
],
|
|
38
|
-
"describe": "describe.json",
|
|
39
|
-
"webUiClient": "dist/webui-
|
|
40
|
-
},
|
|
41
|
-
"scripts": {
|
|
42
|
-
"doctor": "node tools/doctor.mjs"
|
|
43
|
-
},
|
|
44
|
-
"dependencies": {}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "cortico-world-fish-sing",
|
|
3
|
+
"version": "0.4.22",
|
|
4
|
+
"description": "让她真的开口唱:B 站点歌或本地文件 → 分离 → 换声 → 混音,本机出声或发 QQ 语音条",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./src/index.ts",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "FXYXL",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"cortico-world",
|
|
11
|
+
"cortico",
|
|
12
|
+
"coo",
|
|
13
|
+
"sing",
|
|
14
|
+
"rvc",
|
|
15
|
+
"music",
|
|
16
|
+
"qq"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22.6"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/FXYXL/cortico-world-fish-sing#readme",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/FXYXL/cortico-world-fish-sing.git"
|
|
25
|
+
},
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/FXYXL/cortico-world-fish-sing/issues"
|
|
28
|
+
},
|
|
29
|
+
"cortico": {
|
|
30
|
+
"kind": "world",
|
|
31
|
+
"api": 6,
|
|
32
|
+
"label": "大肥鱼唱歌",
|
|
33
|
+
"tags": [
|
|
34
|
+
"music",
|
|
35
|
+
"qq",
|
|
36
|
+
"local"
|
|
37
|
+
],
|
|
38
|
+
"describe": "describe.json",
|
|
39
|
+
"webUiClient": "dist/webui-b69dd33a.js"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"doctor": "node tools/doctor.mjs"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {}
|
|
45
|
+
}
|
package/src/setup.ts
CHANGED
|
@@ -151,6 +151,12 @@ export function inspect(paths: WorkerPaths): SetupStatus {
|
|
|
151
151
|
return { ...f, ready: actual === f.size, actual };
|
|
152
152
|
});
|
|
153
153
|
const doneBytes = models.reduce((n, m) => n + (m.ready ? m.size : 0), 0);
|
|
154
|
+
// 分「必需」和「可选」:hubert/rmvpe/底模缺了就没法换声;出厂默认模型(dfy2)只是示例,
|
|
155
|
+
// 用户换过模型后删掉它很正常——不能因此报"4/6 未就绪",那是误导(0.4.22 之前就是这样)。
|
|
156
|
+
const required = models.filter((m) => m.required !== false);
|
|
157
|
+
const optional = models.filter((m) => m.required === false);
|
|
158
|
+
const requiredReady = required.filter((m) => m.ready).length;
|
|
159
|
+
const optionalMissing = optional.filter((m) => !m.ready).length;
|
|
154
160
|
return {
|
|
155
161
|
runtimeRoot: paths.runtimeRoot,
|
|
156
162
|
rvc: { ready: dirCount(paths.rvcRoot) > 0, root: paths.rvcRoot, files: dirCount(paths.rvcRoot) },
|
|
@@ -162,6 +168,13 @@ export function inspect(paths: WorkerPaths): SetupStatus {
|
|
|
162
168
|
models,
|
|
163
169
|
doneBytes,
|
|
164
170
|
totalBytes: models.reduce((n, m) => n + m.size, 0),
|
|
171
|
+
/** 必需组件是否齐(决定"能不能唱/训") */
|
|
172
|
+
weightsOk: requiredReady === required.length,
|
|
173
|
+
requiredReady,
|
|
174
|
+
requiredTotal: required.length,
|
|
175
|
+
/** 可选(出厂默认模型)缺了几个,只做提示不做告警 */
|
|
176
|
+
optionalMissing,
|
|
177
|
+
optionalMissingBytes: optional.reduce((n, m) => n + (m.ready ? 0 : m.size), 0),
|
|
165
178
|
systemPython: findSystemPython(),
|
|
166
179
|
ffmpeg: {
|
|
167
180
|
dir: paths.ffmpegDir,
|
|
@@ -147,5 +147,19 @@ class AugmentWeightExpansion(unittest.TestCase):
|
|
|
147
147
|
self.assertIn('rms_mix_rate', sig.parameters, f'{fn.__name__} 少了 rms_mix_rate')
|
|
148
148
|
self.assertEqual(sig.parameters['rms_mix_rate'].default, 0.0, f'{fn.__name__} 默认值应为 0.0')
|
|
149
149
|
|
|
150
|
+
def test_manifest_marks_optional_default_model(self):
|
|
151
|
+
# 出厂默认模型(dfy2 + 它的索引)是可选示例:用户换模型后删掉很常见,
|
|
152
|
+
# 不能因为缺它就把自检显示成"未就绪"。必需组件只有 hubert/rmvpe/两个底模。
|
|
153
|
+
import json, pathlib
|
|
154
|
+
m = json.loads(pathlib.Path('assets/models.manifest.json').read_text(encoding='utf-8'))
|
|
155
|
+
req = [f['target'] for f in m['files'] if f.get('required') is not False]
|
|
156
|
+
opt = [f['target'] for f in m['files'] if f.get('required') is False]
|
|
157
|
+
self.assertEqual(len(req), 4, f'必需组件应为 4 个,实际 {req}')
|
|
158
|
+
self.assertTrue(any('hubert' in t for t in req))
|
|
159
|
+
self.assertTrue(any('rmvpe' in t for t in req))
|
|
160
|
+
self.assertTrue(any('f0G40k' in t for t in req))
|
|
161
|
+
self.assertTrue(any('f0D40k' in t for t in req))
|
|
162
|
+
self.assertEqual(len(opt), 2, f'可选应为 dfy2 模型+索引两项,实际 {opt}')
|
|
163
|
+
|
|
150
164
|
if __name__ == "__main__":
|
|
151
165
|
unittest.main()
|