odant-work 1.0.51 → 1.0.52
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/#system/package-manifest.json +8 -8
- package/MODELS/$ai/$folder/$class/$ai/handlers/pages/form/trainer/$handler/trainer.js +12 -3
- package/package.json +1 -1
- package/sources/client/folder.js +7 -1
- package/sources/data/progress.md +4 -0
- package/sources/modules/trainer/worker/local_infer_worker.py +2 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "odant-work",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"createdAt": 1794916599757,
|
|
5
|
-
"updatedAt":
|
|
5
|
+
"updatedAt": 1795078308370,
|
|
6
6
|
"files": {
|
|
7
7
|
"run.mjs": "f8918c612e8641e9beee06221be6680aa6fd21f25468451f2ac857fd51772266",
|
|
8
|
-
"package.json": "
|
|
9
|
-
"package-lock.json": "
|
|
8
|
+
"package.json": "9ddf28ca47a7d35f74ec1e61b6821793d010110caca23220223ef0cdf33fe831",
|
|
9
|
+
"package-lock.json": "ec288d8d4dd1b014a978068b65e02ad11f0b712dcd4ba120d563599e4e02752c",
|
|
10
10
|
"sources/client/class.js": "c3fb8f143fc83aaa2df1ddeddd412d2d4dfe88656578095babe2df34fb3b3922",
|
|
11
11
|
"sources/client/field.js": "ffdd50fa8b6ec515cc42da5fca96658ff2b20e274601a1f926e0031372467a19",
|
|
12
12
|
"sources/client/file.js": "667101d75fa30840370d5be232e518aaac7c1fd52ca05a12da560eef6c0848b0",
|
|
13
|
-
"sources/client/folder.js": "
|
|
13
|
+
"sources/client/folder.js": "138f78c7a04894f8dd87c4db4190b4be43d4fdf8d23e2075a2515c7db54e8e42",
|
|
14
14
|
"sources/client/handler.js": "2da3c811e4f5d6c0060a0bde28d131da6736be6618e9ea20e243b984fc546bdd",
|
|
15
15
|
"sources/client/index.js": "037ff635b149a617adf1219d34f0ba9dd936d5f60cea59e62d276a49468c3dc3",
|
|
16
16
|
"sources/client/readme.md": "a50aa4aa3a90606b2f446e2d29166aa26175ae87539901299e9347322ae4a2fe",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"sources/data/objects.js": "23f51d5b00cd766fe27879b874738bc9bd9056bd6e27285fb7a52926c0dbc6a8",
|
|
27
27
|
"sources/data/posting.js": "6595bb9ec632539ae7629504db327d25a491e61c1cdc598bb43d08ea0d45548d",
|
|
28
28
|
"sources/data/print.js": "704f0f2fc80c6466a4196e4650d763150cf9b592eab14ea67ece85d51100107c",
|
|
29
|
-
"sources/data/progress.md": "
|
|
29
|
+
"sources/data/progress.md": "e5f3e52c1b015940a36416656f85fc238f6c1de26b082b3bd6bd2022d807a0ec",
|
|
30
30
|
"sources/data/readme.md": "593fa2ae07aa91bc26d7542275da6953a9cd419240a9a49e00cb62fb9d5d8e36",
|
|
31
31
|
"sources/data/reports.js": "0330f404860fe2589a7d46a2f0fe690ca23249bd841a062a26718742d4fd11d6",
|
|
32
32
|
"sources/data/schema.js": "1c994f9adb76c156dc86601dd6b1046376b66549b041e1a58aa1727b5476bdbe",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"sources/modules/trainer/runner.js": "328843672fe0c1bd7e8c35c2e25285c31a9f749e04814e64c32e8cae74086024",
|
|
186
186
|
"sources/modules/trainer/tar-stream.js": "52f1739579a01818b53d04a93fd05a91c49a0716019f309a6fca951ba112794f",
|
|
187
187
|
"sources/modules/trainer/transfer.js": "2c603d538e0f85e1794e2f304081fac136f0ff72f85d8b00c2141c7402b3a1fb",
|
|
188
|
-
"sources/modules/trainer/worker/local_infer_worker.py": "
|
|
188
|
+
"sources/modules/trainer/worker/local_infer_worker.py": "b7d7924c0019af8ec72ec79b34e17aabe1281ea72c13448832f43838fc807eca",
|
|
189
189
|
"sources/modules/trainer/worker/unsloth_train.py": "7774d94ffa6f60eed20c57a8dfdc12621d5d9f74d594c605dff32ff70e321e33",
|
|
190
190
|
"sources/modules/user-profile/user-profile.js": "5c8fd002809848b204aee83a44161375e8144bffcc048fde748f4f778162bbef",
|
|
191
191
|
"sources/modules/user-profile/user-token.js": "3797685232684e9e80261a2e63f70cbff4ef1bcc3ded6f755800804e9848d7d9",
|
|
@@ -976,7 +976,7 @@
|
|
|
976
976
|
"MODULES/Register/STRUCTS/Паспорт/$struct/class.js": "4a50808e4db7741b0384a775177545d71686a680ccda7ef0ec68bf81f9c988b5",
|
|
977
977
|
"MODELS/$ai/$folder/$class/$ai/class.js": "fd9214a926ad7466d1ae17cec095ca46144d4db75112ec6b893140ca05f21fd2",
|
|
978
978
|
"MODELS/$ai/$folder/$class/$ai/handlers/pages/form/trainer/$handler/class.js": "fe5ba834156495c28a34acd4b70a6b6b3bdfccb67ec7bf99e92a292afbb66d19",
|
|
979
|
-
"MODELS/$ai/$folder/$class/$ai/handlers/pages/form/trainer/$handler/trainer.js": "
|
|
979
|
+
"MODELS/$ai/$folder/$class/$ai/handlers/pages/form/trainer/$handler/trainer.js": "50c677b727729a3fdcea165bbc4bbb94530f575ce92fc5026ccd9f5e96936ba3",
|
|
980
980
|
"MODELS/$ai/$folder/$class/$ai/methods/chat/$method/class.js": "02fbb40d8ce93fbf568a6a8036c199e2af815be3d63d81f815aeb1da999db717",
|
|
981
981
|
"MODELS/$ai/$folder/$class/$provider/class.js": "069073501b93a95bb9d77e59ce71e53c7a8bcab2564c391b551f68a2453ac486",
|
|
982
982
|
"MODELS/$ai/$folder/$class/$provider/handlers/pages/form/provider/$handler/class.js": "8d327820cefd696d351ac4fa7998994039e4d57ef7a9f8ae297209e4dd1b0a9e",
|
|
@@ -287,12 +287,12 @@ export default {
|
|
|
287
287
|
<textarea rows="2" :value="testTtsText" placeholder="Текст для озвучивания…" @input="testTtsText = $this.value"></textarea>
|
|
288
288
|
<div class="chips" style="gap:6px;" ~if="ttsKind !== 'base'">
|
|
289
289
|
<button type="button" class="btn" ~for="ttsVoicePresets"
|
|
290
|
-
:style="testTtsInstructions === $for.item.value ? 'border-color:var(--accent-color,#4f46e5);color:var(--accent-color,#4f46e5);' : ''"
|
|
290
|
+
:style="(isCustomVoice06B ? testTtsVoice === $for.item.speaker : testTtsInstructions === $for.item.value) ? 'border-color:var(--accent-color,#4f46e5);color:var(--accent-color,#4f46e5);' : ''"
|
|
291
291
|
@tap="selectTtsPreset($for.item)">
|
|
292
292
|
{{$for.item.label}}
|
|
293
293
|
</button>
|
|
294
294
|
</div>
|
|
295
|
-
<textarea rows="2" :value="testTtsInstructions" placeholder="Описание голоса и манеры (instruct): например «Мужской баритон, спокойная деловая интонация»…" @input="testTtsInstructions = $this.value"></textarea>
|
|
295
|
+
<textarea ~if="ttsKind === 'voice_design' || (ttsKind === 'custom_voice' && !isCustomVoice06B)" rows="2" :value="testTtsInstructions" placeholder="Описание голоса и манеры (instruct): например «Мужской баритон, спокойная деловая интонация»…" @input="testTtsInstructions = $this.value"></textarea>
|
|
296
296
|
<input ~if="ttsKind === 'custom_voice'" :value="testTtsVoice" placeholder="Голос (speaker): Ryan, Aiden, Dylan, Serena, Vivian…" @input="testTtsVoice = $this.value">
|
|
297
297
|
<div ~if="ttsKind === 'base'" style="font-size:12px;opacity:0.8;">Модель Base клонирует голос: для синтеза нужна эталонная запись (WAV) и её текст. Без эталона используйте VoiceDesign или CustomVoice.</div>
|
|
298
298
|
</div>
|
|
@@ -393,6 +393,12 @@ export default {
|
|
|
393
393
|
return 'base';
|
|
394
394
|
return 'voice_design';
|
|
395
395
|
},
|
|
396
|
+
get isCustomVoice06B() {
|
|
397
|
+
if (this.ttsKind !== 'custom_voice')
|
|
398
|
+
return false;
|
|
399
|
+
const id = String(this.info?.id || this.resolvedModelId || '').toLowerCase();
|
|
400
|
+
return id.includes('0.6b');
|
|
401
|
+
},
|
|
396
402
|
selectTtsPreset(p) {
|
|
397
403
|
if (!p)
|
|
398
404
|
return;
|
|
@@ -501,6 +507,9 @@ export default {
|
|
|
501
507
|
catch {
|
|
502
508
|
inf = await this.$item.fetch('info');
|
|
503
509
|
}
|
|
510
|
+
if (inf && typeof inf === 'object' && inf.DATA && !inf.engineSetup && !inf.weightFormat && (inf.DATA.engineSetup || inf.DATA.weightFormat || inf.DATA.speculation)) {
|
|
511
|
+
inf = { ...inf.DATA, id: inf.id || inf.DATA.id, label: inf.label || inf.DATA.label, path: inf.path || inf.DATA.path };
|
|
512
|
+
}
|
|
504
513
|
this.info = inf;
|
|
505
514
|
if (inf?.weightsRepair)
|
|
506
515
|
this.weightsRepair = inf.weightsRepair;
|
|
@@ -638,7 +647,7 @@ export default {
|
|
|
638
647
|
}
|
|
639
648
|
else if (m === 'tts') {
|
|
640
649
|
body.text = this.testTtsText.trim();
|
|
641
|
-
if (this.testTtsInstructions.trim())
|
|
650
|
+
if (!this.isCustomVoice06B && this.testTtsInstructions.trim())
|
|
642
651
|
body.instructions = this.testTtsInstructions.trim();
|
|
643
652
|
if (this.ttsKind === 'custom_voice' && this.testTtsVoice.trim())
|
|
644
653
|
body.voice = this.testTtsVoice.trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "odant-work",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.52",
|
|
4
4
|
"description": "ODANT-WORK — платформа цифровой организации (встроенная система учёта, документооборот, управление процессами и приватный мультимодальный ИИ)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "sources/work.js",
|
package/sources/client/folder.js
CHANGED
|
@@ -267,7 +267,13 @@ export class $folder extends $item {
|
|
|
267
267
|
|| method === 'save_files'
|
|
268
268
|
|| method === 'state'
|
|
269
269
|
|| method === 'delete_log_entry'
|
|
270
|
-
|| (typeof method === 'string' &&
|
|
270
|
+
|| (typeof method === 'string' && (
|
|
271
|
+
method.startsWith('sql_')
|
|
272
|
+
|| method.startsWith('trainer_')
|
|
273
|
+
|| method.startsWith('provider_')
|
|
274
|
+
|| method.startsWith('license_')
|
|
275
|
+
|| method.startsWith('messenger_')
|
|
276
|
+
))
|
|
271
277
|
|| (method === 'logs' && params.mode && params.mode !== 'folder' && params.mode !== 'files');
|
|
272
278
|
return WORK.fetch?.(this.short || '/', method, params, post_data).then(res => {
|
|
273
279
|
return isRawLogPayload ? res : WORK.__bind(res);
|
package/sources/data/progress.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# Прогресс: sources/data
|
|
2
2
|
|
|
3
3
|
## Последние изменения
|
|
4
|
+
- [~12:45, 19.11] Фикс подмены ответов `trainer_model_info` в `WORK.__bind` (исчезали `Формат весов`, `NPU (Ryzen AI)` и появлялась ложная `Спекуляция (MTP): Отключена`) и полировка `Qwen3-TTS 0.6B CustomVoice` (`sources/client/folder.js`, `MODELS/$ai/$folder/$class/$ai/handlers/pages/form/trainer/$handler/trainer.js`, `sources/modules/trainer/worker/local_infer_worker.py`, `tests/halogen-speculation.test.js`, `odant-work@1.0.52`):
|
|
5
|
+
- **Причина бага в карточке модели:** `trainer_model_info` возвращал объект с полем `path` (`/MODELS/Local/...`), поэтому `$folder.prototype.fetch` прогонял его через `WORK.__bind(res)`, превращая plain JSON-ответ в узел дерева `CORE.$class` и пряча `weightFormat`, `engineSetup`, `speculation`, `halogenOnline` в `.DATA`. При рендере шаблона срабатывал `_onEmpty`, возвращая truthy `Promise` (отсюда `Спекуляция (MTP): Отключена`, скрытый `NPU (Ryzen AI)` и исчезнувший `Формат весов`).
|
|
6
|
+
- **Исправление:** `trainer_*`, `provider_*`, `license_*` и `messenger_*` исключены из `WORK.__bind` в `sources/client/folder.js` (они возвращают чистые JSON-структуры, а не узлы дерева), плюс добавлена страховка распаковки `.DATA` в `form/trainer` `reload()`.
|
|
7
|
+
- **`Qwen3-TTS 0.6B CustomVoice`:** в карточке и в `local_infer_worker.py` для `0.6B` больше не передаётся неподдерживаемый `instruct` (остаётся чистый выбор диктора `Ryan`, `Aiden`, `Serena`, `Vivian`).
|
|
4
8
|
- [~11:45, 19.11] Ускорение голоса, умная выгрузка памяти, перевод `Qwen3-4B`/`0.6B` на GPU ROCm, авто-заголовки задач, диагностика NPU и бенчмарк длинного Prefill 4K (`sources/modules/trainer/worker/local_infer_worker.py`, `sources/modules/trainer/{local-engine,halogen,index}.js`, `sources/modules/agent/{voice,loop,session}.js`, `MODELS/$ai/$folder/$class/$ai/handlers/pages/form/trainer/$handler/trainer.js`, `tests/halogen-speculation.test.js`, `odant-work@1.0.51`):
|
|
5
9
|
- **Ускорение синтеза речи (`local_infer_worker.py`, `agent/voice.js`):** при загрузке `Qwen3-TTS` на GPU `cuda:0` декодер вокодера `speech_tokenizer` переносится на CPU целиком один раз (`_move_qwen_tts_vocoder_to_cpu`), устраняя сотни мелких перебросов `cuda:0 ↔ cpu` внутри `_install_rocm_miopen_fallback`; в голосовом режиме задач (`localVoiceModel`) при наличии быстрой `Qwen3-TTS-12Hz-0.6B-CustomVoice` ей автоматически отдаётся приоритет.
|
|
6
10
|
- **Умная выгрузка тяжёлой диффузии по простою и нехватке памяти (`local_infer_worker.py`, `local-engine.js`):** добавлен `_evict_memory_if_needed` + фоновый таймер простоя для `("image", ...)` (выгрузка `Z-Image-Turbo` через `WORK_IMAGE_IDLE_SEC = 600` с или при свободной RAM `< 20 ГБ`), тогда как лёгкие модели (RAG, TTS, ASR, 0.6B/4B) остаются горячими до критического порога `< 10 ГБ`.
|
|
@@ -1329,14 +1329,14 @@ def handle_tts(req, cache):
|
|
|
1329
1329
|
"language": language,
|
|
1330
1330
|
"speaker": _resolve_tts_speaker(mdl, req.get("voice")),
|
|
1331
1331
|
}
|
|
1332
|
-
if instructions:
|
|
1332
|
+
if instructions and "0.6b" not in weights_dir.lower():
|
|
1333
1333
|
kwargs["instruct"] = instructions
|
|
1334
1334
|
instruct_used = instructions
|
|
1335
1335
|
try:
|
|
1336
1336
|
wavs, sr = _call_tts_gen(mdl.generate_custom_voice, max_new_tokens, **kwargs)
|
|
1337
1337
|
except Exception as e:
|
|
1338
1338
|
# CustomVoice 0.6B не принимает instruct — повторяем без него.
|
|
1339
|
-
if "instruct" in kwargs and "instruct" in str(e).lower():
|
|
1339
|
+
if "instruct" in kwargs and ("instruct" in str(e).lower() or "0.6b" in weights_dir.lower()):
|
|
1340
1340
|
kwargs.pop("instruct")
|
|
1341
1341
|
instruct_used = ""
|
|
1342
1342
|
wavs, sr = _call_tts_gen(mdl.generate_custom_voice, max_new_tokens, **kwargs)
|