Commit
·
5b910df
1
Parent(s):
d73a358
solving some confusion about model status
Browse files- magentaRT_rt_tester.html +33 -5
magentaRT_rt_tester.html
CHANGED
|
@@ -589,7 +589,8 @@ async function scheduleWavBytes(arrayBuffer) {
|
|
| 589 |
const payload = {
|
| 590 |
size: (selSize?.value || undefined),
|
| 591 |
prewarm: !!(selPrewarm && selPrewarm.checked),
|
| 592 |
-
stop_active: !!(selStopActive && selStopActive.checked)
|
|
|
|
| 593 |
};
|
| 594 |
if (useBase) {
|
| 595 |
// Signal stock model: step="none" as per backend's selector
|
|
@@ -624,11 +625,38 @@ async function scheduleWavBytes(arrayBuffer) {
|
|
| 624 |
// Run once on load
|
| 625 |
checkHealthAndGate();
|
| 626 |
refreshFinetuneControls();
|
|
|
|
| 627 |
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 632 |
|
| 633 |
})();
|
| 634 |
</script>
|
|
|
|
| 589 |
const payload = {
|
| 590 |
size: (selSize?.value || undefined),
|
| 591 |
prewarm: !!(selPrewarm && selPrewarm.checked),
|
| 592 |
+
stop_active: !!(selStopActive && selStopActive.checked),
|
| 593 |
+
sync_assets: true,
|
| 594 |
};
|
| 595 |
if (useBase) {
|
| 596 |
// Signal stock model: step="none" as per backend's selector
|
|
|
|
| 625 |
// Run once on load
|
| 626 |
checkHealthAndGate();
|
| 627 |
refreshFinetuneControls();
|
| 628 |
+
refreshModelInfo();
|
| 629 |
|
| 630 |
+
async function refreshModelInfo() {
|
| 631 |
+
const el = document.getElementById("modelStatus");
|
| 632 |
+
if (!el) return;
|
| 633 |
+
try {
|
| 634 |
+
const r = await fetch("/model/config", { cache: "no-store" });
|
| 635 |
+
if (!r.ok) throw new Error("status " + r.status);
|
| 636 |
+
const cfg = await r.json();
|
| 637 |
+
|
| 638 |
+
const size = cfg.size || cfg.model_size || 'unknown';
|
| 639 |
+
const repo = cfg.ckpt_repo || cfg.repo_id || cfg.repo || (cfg.ckpt && cfg.ckpt.repo) || cfg.active_repo;
|
| 640 |
+
const step = cfg.ckpt_step || cfg.step || (cfg.ckpt && cfg.ckpt.step) || cfg.active_step;
|
| 641 |
+
const isBase = (!repo) || (step === "none");
|
| 642 |
+
|
| 643 |
+
const hasMean = !!(cfg.mean_loaded || cfg.has_mean_embed || cfg.mean_style_embed || cfg.mean);
|
| 644 |
+
const hasCentroids = !!(cfg.centroids_loaded || cfg.has_centroids || cfg.cluster_centroids || cfg.centroids);
|
| 645 |
+
|
| 646 |
+
let line = '';
|
| 647 |
+
if (isBase) {
|
| 648 |
+
line = `Model: base <strong>${size}</strong>`;
|
| 649 |
+
} else {
|
| 650 |
+
line = `Model: finetune <strong>${repo}</strong>@<strong>${step}</strong> (base <strong>${size}</strong>)`;
|
| 651 |
+
}
|
| 652 |
+
line += ` • assets: ${hasMean ? "mean✓" : "mean×"}/${hasCentroids ? "centroids✓" : "centroids×"}`;
|
| 653 |
+
|
| 654 |
+
el.innerHTML = `<div style="padding:8px;border-radius:6px;background:#0f1f2a;border:1px solid #214459">${line}</div>`;
|
| 655 |
+
} catch (e) {
|
| 656 |
+
const el = document.getElementById("modelStatus");
|
| 657 |
+
if (el) el.innerHTML = '';
|
| 658 |
+
}
|
| 659 |
+
}
|
| 660 |
|
| 661 |
})();
|
| 662 |
</script>
|