cortico-world-fish-sing 0.4.13 → 0.4.14
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 +15 -0
- package/dist/{webui-554b9bbb.js → webui-ba6b0f93.js} +54 -28
- package/dist/webui.js +54 -28
- package/package.json +45 -45
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
格式参考 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/);版本号遵循语义化。
|
|
4
4
|
|
|
5
|
+
## [0.4.14] - 2026-11-03
|
|
6
|
+
|
|
7
|
+
### 改进(训练页第二轮,全部来自用户实测反馈)
|
|
8
|
+
- 整个插件页面**居中**(最宽 980px),不再拉满全屏。
|
|
9
|
+
- 折叠块**默认全收起**,谁在跑自动展开谁(训练在跑展开②、切片在跑展开①),空闲就全收起。
|
|
10
|
+
- **顶部进度条/状态行跟随当前任务**:切页回来不再显示上一次操作的残留文案(之前训练一跑,切个页回来顶栏就变成"数据集导入成功")。
|
|
11
|
+
- 「数据集」「已有模型」「切片方式」三个下拉改成**看得出来的下拉框**。
|
|
12
|
+
- 「导入已有模型」移到「开始切片」按钮下方(显眼)。
|
|
13
|
+
- **打开目录只留一个**(数据集旁边的),素材行那个去掉了。
|
|
14
|
+
- 「追加到当前数据集」「选模对比」「低音增强」**都不再默认勾选**。
|
|
15
|
+
- 数据集下拉**默认留空**("(选择数据集)"),选中才显示信息和按钮。
|
|
16
|
+
- 有没训完的记录、且当前没在训练 → 自动勾上「从上次存档继续」(每个实验只代勾一次)。
|
|
17
|
+
- 低音增强的说明改准确:「有限改善…不能根治」。
|
|
18
|
+
- 「测试通知」从训练页挪到**「大肥鱼模型-环境自行管理」页**(配置页的「完成通知」是 Coo 渲染的表单,塞不进按钮;环境页放了个一键测试 + 指路文案)。
|
|
19
|
+
|
|
5
20
|
## [0.4.13] - 2026-11-03
|
|
6
21
|
|
|
7
22
|
### 改进
|
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
const CSS = `
|
|
13
|
-
.fs-wrap{display:flex;flex-direction:column;gap:10px;font:13px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
13
|
+
.fs-wrap{display:flex;flex-direction:column;gap:10px;width:100%;max-width:980px;margin:0 auto;font:13px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
14
14
|
.fs-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
|
|
15
15
|
.fs-bar .fs-grow{flex:1}
|
|
16
16
|
.fs-btn{appearance:none;border:1px solid rgba(127,127,127,.35);background:transparent;color:inherit;
|
|
17
17
|
border-radius:6px;padding:4px 10px;font-size:12px;cursor:pointer}
|
|
18
18
|
.fs-btn:hover{background:rgba(127,127,127,.12)}
|
|
19
19
|
.fs-btn:disabled{opacity:.4;cursor:default}
|
|
20
|
+
select.fs-btn{appearance:auto;-webkit-appearance:menulist;padding:4px 8px;max-width:560px}
|
|
20
21
|
.fs-btn.danger{border-color:rgba(220,80,80,.5);color:#d05555}
|
|
21
22
|
.fs-input{flex:0 0 200px;padding:4px 8px;border-radius:6px;border:1px solid rgba(127,127,127,.35);
|
|
22
23
|
background:transparent;color:inherit;font-size:12px}
|
|
@@ -364,7 +365,23 @@ function mountSetup(ctx) {
|
|
|
364
365
|
+ '运行时是 Python 环境:GPU 版下载约 2.5 GB、装完约 6 GB(55 秒的歌约 8 秒换完);'
|
|
365
366
|
+ 'CPU 版只要约 200 MB,但慢 6~8 倍。已经装好 torch 的不会被覆盖。';
|
|
366
367
|
|
|
367
|
-
|
|
368
|
+
// ---- 通知渠道测试(配置页的「完成通知」里填目标,这里一键验证)
|
|
369
|
+
const nbar = el('div', 'fs-bar');
|
|
370
|
+
const nbtn = el('button', 'fs-btn', '测试通知');
|
|
371
|
+
nbtn.title = '立刻发一条测试通知:QQ 通就发 QQ,不通就退桌宠';
|
|
372
|
+
nbtn.addEventListener('click', async () => {
|
|
373
|
+
nbtn.disabled = true;
|
|
374
|
+
try {
|
|
375
|
+
const r = await ctx.invoke('trainNotifyTest', []);
|
|
376
|
+
say(`通知:${(r && r.note) || '已发'}${r && r.via ? `(${r.via})` : ''}`);
|
|
377
|
+
} catch (e) {
|
|
378
|
+
say((e && e.message) || String(e), true);
|
|
379
|
+
}
|
|
380
|
+
nbtn.disabled = false;
|
|
381
|
+
});
|
|
382
|
+
nbar.append(nbtn, el('span', 'fs-meta',
|
|
383
|
+
'QQ 目标在 Coo 设置 → 插件配置 → 完成通知 里填(group:群号 / private:QQ号,直接填号码也行)'));
|
|
384
|
+
root.append(cards, bar, prog, msg, list, nbar, hint);
|
|
368
385
|
|
|
369
386
|
let timer = null;
|
|
370
387
|
let lastJob = '';
|
|
@@ -733,9 +750,7 @@ function mountTrain(ctx) {
|
|
|
733
750
|
const pathIn = el('input', 'fs-tpath');
|
|
734
751
|
pathIn.placeholder = '粘贴素材文件夹或单个文件路径,可多个用 ; 分隔';
|
|
735
752
|
const scanBtn = el('button', 'fs-btn', '扫描');
|
|
736
|
-
|
|
737
|
-
notifyTest.title = '立刻发一条测试通知:QQ 通就发 QQ,不通就退桌宠——点了就知道渠道状态';
|
|
738
|
-
bar.append(pathIn, scanBtn, notifyTest);
|
|
753
|
+
bar.append(pathIn, scanBtn);
|
|
739
754
|
|
|
740
755
|
const dsBar = el('div', 'fs-bar');
|
|
741
756
|
const dsSel = el('select', 'fs-btn');
|
|
@@ -769,15 +784,14 @@ function mountTrain(ctx) {
|
|
|
769
784
|
startBtn.disabled = true;
|
|
770
785
|
const stopBtn = el('button', 'fs-btn danger', '停止');
|
|
771
786
|
stopBtn.disabled = true;
|
|
772
|
-
const revealBtn = el('button', 'fs-btn', '打开目录');
|
|
773
787
|
const appendChk = el('input', 'fs-ck');
|
|
774
788
|
appendChk.type = 'checkbox';
|
|
775
|
-
appendChk.checked =
|
|
789
|
+
appendChk.checked = false; // 用户要求:不默认追加,切片时自己勾
|
|
776
790
|
appendChk.disabled = true;
|
|
777
791
|
const appendLabel = el('label', 'fs-meta', '追加到当前数据集');
|
|
778
792
|
appendLabel.style.display = 'none';
|
|
779
793
|
|
|
780
|
-
bar2.append(modeSel, lenIn, startBtn, stopBtn, appendChk, appendLabel, el('span', 'fs-grow')
|
|
794
|
+
bar2.append(modeSel, lenIn, startBtn, stopBtn, appendChk, appendLabel, el('span', 'fs-grow'));
|
|
781
795
|
|
|
782
796
|
const msg = el('div', 'fs-msg');
|
|
783
797
|
const prog = el('div', 'fs-prog');
|
|
@@ -802,10 +816,10 @@ function mountTrain(ctx) {
|
|
|
802
816
|
return { d, body };
|
|
803
817
|
};
|
|
804
818
|
|
|
805
|
-
const secA = mkSec('① 素材 → 数据集', '把歌放进来、扫描、切成训练用的片',
|
|
806
|
-
secA.body.append(bar, bar2, listBox, resultBox, dsBar
|
|
819
|
+
const secA = mkSec('① 素材 → 数据集', '把歌放进来、扫描、切成训练用的片', false);
|
|
820
|
+
secA.body.append(bar, bar2, importBar, listBox, resultBox, dsBar);
|
|
807
821
|
|
|
808
|
-
const secB = mkSec('② 训练', '一般只需要改「轮次」,其余都在展开项里',
|
|
822
|
+
const secB = mkSec('② 训练', '一般只需要改「轮次」,其余都在展开项里', false);
|
|
809
823
|
secB.body.append(trainBox);
|
|
810
824
|
|
|
811
825
|
const secC = mkSec('③ 高级:低音增强 / 音域加权', '给数据加降调副本、按音域调采样权重(有效但有限)', false);
|
|
@@ -817,6 +831,8 @@ function mountTrain(ctx) {
|
|
|
817
831
|
let checked = new Set();
|
|
818
832
|
let timer = null;
|
|
819
833
|
let lastDir = '';
|
|
834
|
+
let lastSecState = '';
|
|
835
|
+
let lastResumeAuto = '';
|
|
820
836
|
|
|
821
837
|
const say = (t, bad) => {
|
|
822
838
|
msg.textContent = t || '';
|
|
@@ -1245,16 +1261,16 @@ function mountTrain(ctx) {
|
|
|
1245
1261
|
pruneAfterLbl.title = '按下面「每 N 轮留一个」保留,其余删掉。不勾就只是提醒你手动清。';
|
|
1246
1262
|
const abChk = el('input', 'fs-ck');
|
|
1247
1263
|
abChk.type = 'checkbox';
|
|
1248
|
-
abChk.checked =
|
|
1264
|
+
abChk.checked = false; // 用户要求:不默认勾,想要就自己点
|
|
1249
1265
|
const abLbl = el('label', 'fs-meta', '训练完生成选模对比');
|
|
1250
1266
|
abLbl.prepend(abChk);
|
|
1251
1267
|
abLbl.title = '用同一句训练切片,final 和最后两个中间档各唱一遍,进作品库对比听';
|
|
1252
1268
|
const lowChk = el('input', 'fs-ck');
|
|
1253
1269
|
lowChk.type = 'checkbox';
|
|
1254
|
-
lowChk.checked =
|
|
1270
|
+
lowChk.checked = false; // 用户要求:不默认勾(实测只是有限改善)
|
|
1255
1271
|
const lowLbl = el('label', 'fs-meta', '低音增强');
|
|
1256
1272
|
lowLbl.prepend(lowChk);
|
|
1257
|
-
lowLbl.title = '
|
|
1273
|
+
lowLbl.title = '有限改善:把每个切片合成 -2/-4 半音的副本一起训练。实测只能缓解、不能根治"低音不像"(模型在低音区本来就没有音色记忆),且 F0/特征提取时间约 ×3';
|
|
1258
1274
|
chkRow.append(resumeLbl, rebuildLbl, pruneAfterLbl, abLbl, lowLbl, el('span', 'fs-grow'), startT, stopT);
|
|
1259
1275
|
|
|
1260
1276
|
const tProg = el('div', 'fs-prog');
|
|
@@ -1386,6 +1402,19 @@ function mountTrain(ctx) {
|
|
|
1386
1402
|
const log = st.log || { done: 0, losses: [], latest: null, secPerEpoch: null, error: '' };
|
|
1387
1403
|
const total = st.total || 0;
|
|
1388
1404
|
|
|
1405
|
+
// 分区自动展开:谁在跑就展开谁;都空闲就全收起(用户手动展开的不动)
|
|
1406
|
+
const secState = running ? 'train' : (st.datasetBusy ? 'ds' : 'idle');
|
|
1407
|
+
if (secState !== lastSecState) {
|
|
1408
|
+
lastSecState = secState;
|
|
1409
|
+
secB.d.open = secState === 'train';
|
|
1410
|
+
secA.d.open = secState === 'ds';
|
|
1411
|
+
}
|
|
1412
|
+
// 有没训完的记录、当前又没在训练 → 自动勾「从上次存档继续」(每个实验只代勾一次)
|
|
1413
|
+
if (!running && log.done > 0 && st.exp && lastResumeAuto !== st.exp) {
|
|
1414
|
+
resumeChk.checked = true;
|
|
1415
|
+
lastResumeAuto = st.exp;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1389
1418
|
startT.disabled = running || st.datasetBusy;
|
|
1390
1419
|
// 即使不是本次启动的也能停:/stop 取消的是 worker 当前任务,跟谁提交的无关
|
|
1391
1420
|
stopT.disabled = !running;
|
|
@@ -1429,6 +1458,17 @@ function mountTrain(ctx) {
|
|
|
1429
1458
|
tMsg.classList.add('bad');
|
|
1430
1459
|
}
|
|
1431
1460
|
|
|
1461
|
+
// 顶栏状态始终反映正在进行的任务;空闲时不动(保留上一次操作的反馈)
|
|
1462
|
+
if (running) {
|
|
1463
|
+
msg.textContent = tMsg.textContent;
|
|
1464
|
+
msg.classList.toggle('bad', tMsg.classList.contains('bad'));
|
|
1465
|
+
fill.style.width = tFill.style.width;
|
|
1466
|
+
} else if (st.datasetBusy) {
|
|
1467
|
+
fill.style.width = '96%';
|
|
1468
|
+
msg.textContent = '数据集任务进行中…(切片中,取决于素材时长)';
|
|
1469
|
+
msg.classList.remove('bad');
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1432
1472
|
paintLoss(log);
|
|
1433
1473
|
|
|
1434
1474
|
tModels.replaceChildren();
|
|
@@ -1559,19 +1599,6 @@ function mountTrain(ctx) {
|
|
|
1559
1599
|
appendLabel.textContent = appendChk.checked ? '追加到当前数据集' : '新建数据集';
|
|
1560
1600
|
});
|
|
1561
1601
|
|
|
1562
|
-
notifyTest.addEventListener('click', async () => {
|
|
1563
|
-
notifyTest.disabled = true;
|
|
1564
|
-
notifyTest.textContent = '发送中…';
|
|
1565
|
-
try {
|
|
1566
|
-
const r = await ctx.invoke('trainNotifyTest');
|
|
1567
|
-
say((r && r.note) ? `通知:${r.note}${r.via ? `(${r.via})` : ''}` : '通知已发');
|
|
1568
|
-
} catch (e) {
|
|
1569
|
-
say(`测试通知失败:${(e && e.message) || e}`, true);
|
|
1570
|
-
} finally {
|
|
1571
|
-
notifyTest.disabled = false;
|
|
1572
|
-
notifyTest.textContent = '测试通知';
|
|
1573
|
-
}
|
|
1574
|
-
});
|
|
1575
1602
|
|
|
1576
1603
|
scanBtn.addEventListener('click', async () => {
|
|
1577
1604
|
const raw = String(pathIn.value || '').trim();
|
|
@@ -1618,7 +1645,6 @@ function mountTrain(ctx) {
|
|
|
1618
1645
|
});
|
|
1619
1646
|
|
|
1620
1647
|
stopBtn.addEventListener('click', () => void call('cancel', []).then(() => poll()));
|
|
1621
|
-
revealBtn.addEventListener('click', () => void call('reveal', []).catch(() => {}));
|
|
1622
1648
|
|
|
1623
1649
|
void poll();
|
|
1624
1650
|
void loadDatasets();
|
package/dist/webui.js
CHANGED
|
@@ -10,13 +10,14 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
const CSS = `
|
|
13
|
-
.fs-wrap{display:flex;flex-direction:column;gap:10px;font:13px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
13
|
+
.fs-wrap{display:flex;flex-direction:column;gap:10px;width:100%;max-width:980px;margin:0 auto;font:13px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif}
|
|
14
14
|
.fs-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
|
|
15
15
|
.fs-bar .fs-grow{flex:1}
|
|
16
16
|
.fs-btn{appearance:none;border:1px solid rgba(127,127,127,.35);background:transparent;color:inherit;
|
|
17
17
|
border-radius:6px;padding:4px 10px;font-size:12px;cursor:pointer}
|
|
18
18
|
.fs-btn:hover{background:rgba(127,127,127,.12)}
|
|
19
19
|
.fs-btn:disabled{opacity:.4;cursor:default}
|
|
20
|
+
select.fs-btn{appearance:auto;-webkit-appearance:menulist;padding:4px 8px;max-width:560px}
|
|
20
21
|
.fs-btn.danger{border-color:rgba(220,80,80,.5);color:#d05555}
|
|
21
22
|
.fs-input{flex:0 0 200px;padding:4px 8px;border-radius:6px;border:1px solid rgba(127,127,127,.35);
|
|
22
23
|
background:transparent;color:inherit;font-size:12px}
|
|
@@ -364,7 +365,23 @@ function mountSetup(ctx) {
|
|
|
364
365
|
+ '运行时是 Python 环境:GPU 版下载约 2.5 GB、装完约 6 GB(55 秒的歌约 8 秒换完);'
|
|
365
366
|
+ 'CPU 版只要约 200 MB,但慢 6~8 倍。已经装好 torch 的不会被覆盖。';
|
|
366
367
|
|
|
367
|
-
|
|
368
|
+
// ---- 通知渠道测试(配置页的「完成通知」里填目标,这里一键验证)
|
|
369
|
+
const nbar = el('div', 'fs-bar');
|
|
370
|
+
const nbtn = el('button', 'fs-btn', '测试通知');
|
|
371
|
+
nbtn.title = '立刻发一条测试通知:QQ 通就发 QQ,不通就退桌宠';
|
|
372
|
+
nbtn.addEventListener('click', async () => {
|
|
373
|
+
nbtn.disabled = true;
|
|
374
|
+
try {
|
|
375
|
+
const r = await ctx.invoke('trainNotifyTest', []);
|
|
376
|
+
say(`通知:${(r && r.note) || '已发'}${r && r.via ? `(${r.via})` : ''}`);
|
|
377
|
+
} catch (e) {
|
|
378
|
+
say((e && e.message) || String(e), true);
|
|
379
|
+
}
|
|
380
|
+
nbtn.disabled = false;
|
|
381
|
+
});
|
|
382
|
+
nbar.append(nbtn, el('span', 'fs-meta',
|
|
383
|
+
'QQ 目标在 Coo 设置 → 插件配置 → 完成通知 里填(group:群号 / private:QQ号,直接填号码也行)'));
|
|
384
|
+
root.append(cards, bar, prog, msg, list, nbar, hint);
|
|
368
385
|
|
|
369
386
|
let timer = null;
|
|
370
387
|
let lastJob = '';
|
|
@@ -733,9 +750,7 @@ function mountTrain(ctx) {
|
|
|
733
750
|
const pathIn = el('input', 'fs-tpath');
|
|
734
751
|
pathIn.placeholder = '粘贴素材文件夹或单个文件路径,可多个用 ; 分隔';
|
|
735
752
|
const scanBtn = el('button', 'fs-btn', '扫描');
|
|
736
|
-
|
|
737
|
-
notifyTest.title = '立刻发一条测试通知:QQ 通就发 QQ,不通就退桌宠——点了就知道渠道状态';
|
|
738
|
-
bar.append(pathIn, scanBtn, notifyTest);
|
|
753
|
+
bar.append(pathIn, scanBtn);
|
|
739
754
|
|
|
740
755
|
const dsBar = el('div', 'fs-bar');
|
|
741
756
|
const dsSel = el('select', 'fs-btn');
|
|
@@ -769,15 +784,14 @@ function mountTrain(ctx) {
|
|
|
769
784
|
startBtn.disabled = true;
|
|
770
785
|
const stopBtn = el('button', 'fs-btn danger', '停止');
|
|
771
786
|
stopBtn.disabled = true;
|
|
772
|
-
const revealBtn = el('button', 'fs-btn', '打开目录');
|
|
773
787
|
const appendChk = el('input', 'fs-ck');
|
|
774
788
|
appendChk.type = 'checkbox';
|
|
775
|
-
appendChk.checked =
|
|
789
|
+
appendChk.checked = false; // 用户要求:不默认追加,切片时自己勾
|
|
776
790
|
appendChk.disabled = true;
|
|
777
791
|
const appendLabel = el('label', 'fs-meta', '追加到当前数据集');
|
|
778
792
|
appendLabel.style.display = 'none';
|
|
779
793
|
|
|
780
|
-
bar2.append(modeSel, lenIn, startBtn, stopBtn, appendChk, appendLabel, el('span', 'fs-grow')
|
|
794
|
+
bar2.append(modeSel, lenIn, startBtn, stopBtn, appendChk, appendLabel, el('span', 'fs-grow'));
|
|
781
795
|
|
|
782
796
|
const msg = el('div', 'fs-msg');
|
|
783
797
|
const prog = el('div', 'fs-prog');
|
|
@@ -802,10 +816,10 @@ function mountTrain(ctx) {
|
|
|
802
816
|
return { d, body };
|
|
803
817
|
};
|
|
804
818
|
|
|
805
|
-
const secA = mkSec('① 素材 → 数据集', '把歌放进来、扫描、切成训练用的片',
|
|
806
|
-
secA.body.append(bar, bar2, listBox, resultBox, dsBar
|
|
819
|
+
const secA = mkSec('① 素材 → 数据集', '把歌放进来、扫描、切成训练用的片', false);
|
|
820
|
+
secA.body.append(bar, bar2, importBar, listBox, resultBox, dsBar);
|
|
807
821
|
|
|
808
|
-
const secB = mkSec('② 训练', '一般只需要改「轮次」,其余都在展开项里',
|
|
822
|
+
const secB = mkSec('② 训练', '一般只需要改「轮次」,其余都在展开项里', false);
|
|
809
823
|
secB.body.append(trainBox);
|
|
810
824
|
|
|
811
825
|
const secC = mkSec('③ 高级:低音增强 / 音域加权', '给数据加降调副本、按音域调采样权重(有效但有限)', false);
|
|
@@ -817,6 +831,8 @@ function mountTrain(ctx) {
|
|
|
817
831
|
let checked = new Set();
|
|
818
832
|
let timer = null;
|
|
819
833
|
let lastDir = '';
|
|
834
|
+
let lastSecState = '';
|
|
835
|
+
let lastResumeAuto = '';
|
|
820
836
|
|
|
821
837
|
const say = (t, bad) => {
|
|
822
838
|
msg.textContent = t || '';
|
|
@@ -1245,16 +1261,16 @@ function mountTrain(ctx) {
|
|
|
1245
1261
|
pruneAfterLbl.title = '按下面「每 N 轮留一个」保留,其余删掉。不勾就只是提醒你手动清。';
|
|
1246
1262
|
const abChk = el('input', 'fs-ck');
|
|
1247
1263
|
abChk.type = 'checkbox';
|
|
1248
|
-
abChk.checked =
|
|
1264
|
+
abChk.checked = false; // 用户要求:不默认勾,想要就自己点
|
|
1249
1265
|
const abLbl = el('label', 'fs-meta', '训练完生成选模对比');
|
|
1250
1266
|
abLbl.prepend(abChk);
|
|
1251
1267
|
abLbl.title = '用同一句训练切片,final 和最后两个中间档各唱一遍,进作品库对比听';
|
|
1252
1268
|
const lowChk = el('input', 'fs-ck');
|
|
1253
1269
|
lowChk.type = 'checkbox';
|
|
1254
|
-
lowChk.checked =
|
|
1270
|
+
lowChk.checked = false; // 用户要求:不默认勾(实测只是有限改善)
|
|
1255
1271
|
const lowLbl = el('label', 'fs-meta', '低音增强');
|
|
1256
1272
|
lowLbl.prepend(lowChk);
|
|
1257
|
-
lowLbl.title = '
|
|
1273
|
+
lowLbl.title = '有限改善:把每个切片合成 -2/-4 半音的副本一起训练。实测只能缓解、不能根治"低音不像"(模型在低音区本来就没有音色记忆),且 F0/特征提取时间约 ×3';
|
|
1258
1274
|
chkRow.append(resumeLbl, rebuildLbl, pruneAfterLbl, abLbl, lowLbl, el('span', 'fs-grow'), startT, stopT);
|
|
1259
1275
|
|
|
1260
1276
|
const tProg = el('div', 'fs-prog');
|
|
@@ -1386,6 +1402,19 @@ function mountTrain(ctx) {
|
|
|
1386
1402
|
const log = st.log || { done: 0, losses: [], latest: null, secPerEpoch: null, error: '' };
|
|
1387
1403
|
const total = st.total || 0;
|
|
1388
1404
|
|
|
1405
|
+
// 分区自动展开:谁在跑就展开谁;都空闲就全收起(用户手动展开的不动)
|
|
1406
|
+
const secState = running ? 'train' : (st.datasetBusy ? 'ds' : 'idle');
|
|
1407
|
+
if (secState !== lastSecState) {
|
|
1408
|
+
lastSecState = secState;
|
|
1409
|
+
secB.d.open = secState === 'train';
|
|
1410
|
+
secA.d.open = secState === 'ds';
|
|
1411
|
+
}
|
|
1412
|
+
// 有没训完的记录、当前又没在训练 → 自动勾「从上次存档继续」(每个实验只代勾一次)
|
|
1413
|
+
if (!running && log.done > 0 && st.exp && lastResumeAuto !== st.exp) {
|
|
1414
|
+
resumeChk.checked = true;
|
|
1415
|
+
lastResumeAuto = st.exp;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1389
1418
|
startT.disabled = running || st.datasetBusy;
|
|
1390
1419
|
// 即使不是本次启动的也能停:/stop 取消的是 worker 当前任务,跟谁提交的无关
|
|
1391
1420
|
stopT.disabled = !running;
|
|
@@ -1429,6 +1458,17 @@ function mountTrain(ctx) {
|
|
|
1429
1458
|
tMsg.classList.add('bad');
|
|
1430
1459
|
}
|
|
1431
1460
|
|
|
1461
|
+
// 顶栏状态始终反映正在进行的任务;空闲时不动(保留上一次操作的反馈)
|
|
1462
|
+
if (running) {
|
|
1463
|
+
msg.textContent = tMsg.textContent;
|
|
1464
|
+
msg.classList.toggle('bad', tMsg.classList.contains('bad'));
|
|
1465
|
+
fill.style.width = tFill.style.width;
|
|
1466
|
+
} else if (st.datasetBusy) {
|
|
1467
|
+
fill.style.width = '96%';
|
|
1468
|
+
msg.textContent = '数据集任务进行中…(切片中,取决于素材时长)';
|
|
1469
|
+
msg.classList.remove('bad');
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1432
1472
|
paintLoss(log);
|
|
1433
1473
|
|
|
1434
1474
|
tModels.replaceChildren();
|
|
@@ -1559,19 +1599,6 @@ function mountTrain(ctx) {
|
|
|
1559
1599
|
appendLabel.textContent = appendChk.checked ? '追加到当前数据集' : '新建数据集';
|
|
1560
1600
|
});
|
|
1561
1601
|
|
|
1562
|
-
notifyTest.addEventListener('click', async () => {
|
|
1563
|
-
notifyTest.disabled = true;
|
|
1564
|
-
notifyTest.textContent = '发送中…';
|
|
1565
|
-
try {
|
|
1566
|
-
const r = await ctx.invoke('trainNotifyTest');
|
|
1567
|
-
say((r && r.note) ? `通知:${r.note}${r.via ? `(${r.via})` : ''}` : '通知已发');
|
|
1568
|
-
} catch (e) {
|
|
1569
|
-
say(`测试通知失败:${(e && e.message) || e}`, true);
|
|
1570
|
-
} finally {
|
|
1571
|
-
notifyTest.disabled = false;
|
|
1572
|
-
notifyTest.textContent = '测试通知';
|
|
1573
|
-
}
|
|
1574
|
-
});
|
|
1575
1602
|
|
|
1576
1603
|
scanBtn.addEventListener('click', async () => {
|
|
1577
1604
|
const raw = String(pathIn.value || '').trim();
|
|
@@ -1618,7 +1645,6 @@ function mountTrain(ctx) {
|
|
|
1618
1645
|
});
|
|
1619
1646
|
|
|
1620
1647
|
stopBtn.addEventListener('click', () => void call('cancel', []).then(() => poll()));
|
|
1621
|
-
revealBtn.addEventListener('click', () => void call('reveal', []).catch(() => {}));
|
|
1622
1648
|
|
|
1623
1649
|
void poll();
|
|
1624
1650
|
void loadDatasets();
|
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.14",
|
|
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-ba6b0f93.js"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"doctor": "node tools/doctor.mjs"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {}
|
|
45
|
+
}
|