Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(trainer): der Basisdateien-Download bleibt sichtbar, wenn man den Reiter wechselt

David03b6ee6956bb
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1f46e7ed..44b2a3d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -264,8 +264,9 @@ and the built-in engine has a name of its own, the LU Engine.
comes back afterwards, so it no longer squats the memory the recipe needs;
and a run that still runs out of memory on the card says what to close.
The step counter moves with every training step instead of once per epoch
- (it used to sit on 0 for twenty minutes). Lines from winget stay out of the
- note under the button.
+ (it used to sit on 0 for twenty minutes), and the base-file download keeps
+ showing its progress when you leave the tab and come back. Lines from winget
+ stay out of the note under the button.
- **AMD on Windows is read from the HIP SDK itself.** The only ROCm probe ran
rocm-smi, which the Windows SDK does not ship, so an installed ROCm went
unseen. LU reads HIP_PATH and hipinfo now and names the card architecture,
diff --git a/src/api/__tests__/base-download-running.test.ts b/src/api/__tests__/base-download-running.test.ts
new file mode 100644
index 00000000..a6323b58
--- /dev/null
+++ b/src/api/__tests__/base-download-running.test.ts
@@ -0,0 +1,35 @@
+/**
+ * The Character Studio panel picks a running base-file download back up when
+ * it is mounted again (Phase G finding, 2026-09-06). Pins the predicate and the
+ * mount hook.
+ *
+ * Run: npx vitest run src/api/__tests__/base-download-running.test.ts
+ */
+import { describe, it, expect } from 'vitest'
+import fs from 'node:fs'
+import path from 'node:path'
+import { baseDownloadRunning, TRAINER_BASE_FILES } from '../trainer'
+
+describe('baseDownloadRunning', () => {
+ it('is true while any base file downloads or connects', () => {
+ for (const f of TRAINER_BASE_FILES) {
+ expect(baseDownloadRunning({ [f.filename]: { status: 'downloading' } })).toBe(true)
+ expect(baseDownloadRunning({ [f.filename]: { status: 'connecting' } })).toBe(true)
+ }
+ })
+
+ it('is false when the base files are done, failed, absent, or another file downloads', () => {
+ const [a, b, c] = TRAINER_BASE_FILES.map((f) => f.filename)
+ expect(baseDownloadRunning({})).toBe(false)
+ expect(baseDownloadRunning({ [a]: { status: 'complete' }, [b]: { status: 'error' }, [c]: undefined })).toBe(false)
+ expect(baseDownloadRunning({ 'some-other-model.gguf': { status: 'downloading' } })).toBe(false)
+ })
+
+ it('is asked by the panel on mount, before the button decides what it says', () => {
+ const src = fs.readFileSync(path.join(__dirname, '..', '..', 'components', 'create', 'experimental', 'SpecialIntentControls.tsx'), 'utf8')
+ const mount = src.indexOf('if (live && baseDownloadRunning(prog)) setBusy(\'bases\')')
+ const button = src.indexOf("'Download base files'")
+ expect(mount).toBeGreaterThan(0)
+ expect(button).toBeGreaterThan(mount)
+ })
+})
diff --git a/src/api/trainer.ts b/src/api/trainer.ts
index 577d59df..48959bc2 100644
--- a/src/api/trainer.ts
+++ b/src/api/trainer.ts
@@ -55,6 +55,21 @@ export const TRAINER_BASE_FILES = [
},
] as const
+/**
+ * Is one of the base files still coming in? The download outlives the
+ * Character Studio panel: leave the tab while 19 GB flow and come back, and
+ * the button read "Download base files" again with no note while the tray kept
+ * counting (Phase G, Windows box, 2026-09-06). The panel asks this on mount.
+ */
+export function baseDownloadRunning(
+ progress: Record<string, { status: string } | undefined>,
+): boolean {
+ return TRAINER_BASE_FILES.some((f) => {
+ const row = progress[f.filename]
+ return !!row && (row.status === 'downloading' || row.status === 'connecting')
+ })
+}
+
export async function installCharacterTrainer(installPath?: string): Promise<{ status: string }> {
return backendCall('install_character_trainer', { installPath: installPath ?? null })
}
diff --git a/src/components/create/experimental/SpecialIntentControls.tsx b/src/components/create/experimental/SpecialIntentControls.tsx
index a981bbd4..d4ae5c23 100644
--- a/src/components/create/experimental/SpecialIntentControls.tsx
+++ b/src/components/create/experimental/SpecialIntentControls.tsx
@@ -16,7 +16,7 @@ import { useCloudCatalogStore, cloudModelById, modelForOp } from '../../../store
import { listLoras, deleteLora, type CloudLora } from '../../../api/cloud/loras'
import {
characterTrainerStatus, installCharacterTrainer, parseLocalCharacterLora,
- TRAINER_BASE_FILES, type TrainerStatus,
+ TRAINER_BASE_FILES, baseDownloadRunning, type TrainerStatus,
} from '../../../api/trainer'
import { startModelDownload, getDownloadProgress } from '../../../api/discover'
import { useDownloadStore } from '../../../stores/downloadStore'
@@ -272,6 +272,18 @@ function LocalTrainControls() {
}, [])
useEffect(() => { refresh() }, [refresh])
+ // A base-file download outlives this panel. Leave the tab and come back and
+ // the button read "Download base files" again with no note, while the 19 GB
+ // kept flowing in the tray (Phase G, Windows box, 06.09.2026). On mount the
+ // meter picks a running download back up, and the poll below carries on.
+ useEffect(() => {
+ let live = true
+ getDownloadProgress()
+ .then((prog) => { if (live && baseDownloadRunning(prog)) setBusy('bases') })
+ .catch(() => {})
+ return () => { live = false }
+ }, [])
+
// While an install or a bases download runs, poll its progress into `note`.
useEffect(() => {
if (!busy) return
diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.ts
index d97fe4f6..76f625aa 100644
--- a/src/lib/release-notes.ts
+++ b/src/lib/release-notes.ts
@@ -86,7 +86,7 @@ export const RELEASE_NOTES: ReleaseNote[] = [
'The ComfyUI installer checks that the environment it just built can import ComfyUI, installs what is missing, and names a missing Visual C++ runtime instead of ending in a silent crash.',
'Repair environment runs the same check with a time limit and a Cancel button that stops it, and the trainer setup stopped blaming the network for failures that had nothing to do with the network.',
'Character Studio sets itself up on a machine whose Python is too new. The trainer needs Python 3.10 to 3.12, and LU built its environment from whatever Python was newest, so a machine with 3.14 failed at the last step on every update since August. The setup now picks a Python from that range by itself, installs 3.12 on Windows if there is none, and rebuilds an environment that came from the wrong one. The failure text under the button also stopped being cut after one line. Reported in Discord ticket 0004.',
- 'The local trainer no longer hands out instructions. On the way from Set up trainer to a finished character every dead end fixes itself or names its cause: the trainer source comes as an archive and needs no git on the machine, the drive is checked for room before the first byte, a download that breaks off is retried twice, a missing Windows runtime library for PyTorch is installed by LU through winget instead of a link to microsoft.com, the setup proves that PyTorch loads before it calls the environment ready, a card with less than 12 GB hears that before ten minutes of caching, the local chat model is paused for the run and comes back afterwards instead of squatting the memory the recipe needs, and a run that still runs out of memory on the card says what to close. The step counter moves with every training step instead of once per epoch, and winget output stays out of the note under the button.',
+ 'The local trainer no longer hands out instructions. On the way from Set up trainer to a finished character every dead end fixes itself or names its cause: the trainer source comes as an archive and needs no git on the machine, the drive is checked for room before the first byte, a download that breaks off is retried twice, a missing Windows runtime library for PyTorch is installed by LU through winget instead of a link to microsoft.com, the setup proves that PyTorch loads before it calls the environment ready, a card with less than 12 GB hears that before ten minutes of caching, the local chat model is paused for the run and comes back afterwards instead of squatting the memory the recipe needs, and a run that still runs out of memory on the card says what to close. The step counter moves with every training step instead of once per epoch, the base-file download keeps showing its progress when you leave the tab and come back, and winget output stays out of the note under the button.',
'A ComfyUI that will not start names the cause. A missing Visual C++ runtime, or a graphics driver older than the PyTorch that was installed, used to arrive as "the Python environment looks broken" next to a Repair button, and neither of those lives in the folder Repair rebuilds. The message now says which of the two it is, and LU no longer starts a repair that cannot fix it.',
'AMD on Windows is read from the HIP SDK itself. The only ROCm probe ran rocm-smi, which the Windows SDK does not ship, so an installed ROCm went unseen. LU reads HIP_PATH and hipinfo now and names the card architecture, and an image run that fails names that architecture and get_arch_list instead of a HIP traceback. This is marked as researched rather than proven, because there is no RDNA4 card here.',
'The Model Manager stopped putting system RAM in the GPU field. ComfyUI reports system memory on a CPU device in a field called vram_total, so a machine with 64 GB of RAM read as if it had 62 GB of video memory.',