Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

Merge remote-tracking branch 'origin/main' into next/issue-1321

[._.]/ Adam Eivy5a259af5afbd
diff --cc .changelog/NEXT.md
index 3cba8f2199,11f107b3ce..8680ccc3b0
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@@ -2,8 -2,8 +2,10 @@@
## Added
+- **[issue-1321] Override a LoRA run's base-model precision and memory mode per run.** A training run can now opt into a heavier or lighter frozen base than the one PortOS picks from your free memory, without editing any code: start a run with a **`baseQuant`** (16 = full bf16, or 8 / 4-bit QLoRA) and/or a **`lowRam`** toggle, and that run uses exactly those settings on the mflux engine. Leaving them unset keeps the existing automatic, memory-derived tier, so nothing changes for runs that don't ask. As a safety backstop, a per-run request still can't exceed an install's `LORA_TRAIN_MAX_QUANT_BITS` cap — the guard that keeps M5-class machines off the bf16 path that GPU-watchdog-panics them. (#1321)
+
+ - **[issue-1330] Phase-aware stall watchdog catches a wedged GPU mid-training and auto-resumes from the newest checkpoint.** The training job queue's idle watchdog only trips on *total* silence (no runner output for 30 minutes) — but a *soft* GPU hang during mflux/FLUX.2 training is invisible to it, because the trainer's heartbeat and telemetry threads keep emitting lines while the step loop is wedged, perpetually resetting the flat timer. PortOS now runs a **phase-aware** stall detector that keys off the trainer's `STAGE:`/`STEP:` line protocol: once steps are flowing it derives a per-step budget from the *observed* step rate (a few × the slowest recent interval, floored and capped below the flat watchdog) and enforces it **only during `STAGE:training`** — model-load, dataset-encode, mid-training sampling, and inter-segment cooldown stay on the generous flat watchdog so a legitimately slow phase is never false-killed. When training genuinely stalls, the wedged child is **SIGKILLed immediately** (SIGTERM relies on the GIL the hang holds) and the run **auto-resumes from its newest checkpoint** via the existing resume path — bounded to a couple of attempts per run so a config that wedges every segment can't resume-loop forever, after which the run stays failed for manual resume. This recovers *soft* hangs faster; it does **not** address the hard-reboot kernel panics (checkpoint-resume already covers those, since the machine is gone before any userspace watchdog runs). Off-switch: `settings.loraTraining.stallWatchdog = false`. (`server/services/loraTraining/stallDetector.js`, `server/services/loraTraining/index.js`, `server/lib/validation.js`) (#1330)
+
- **[issue-1335] Import can clean up paste/PDF formatting with AI as it brings a manuscript in.** Text imported from a PDF or paste arrives mangled — hard-wrapped lines, split drop-caps, hyphenated wraps, orphaned quotes — and until now every imported issue needed a manual Reformat pass in the editor afterward. The import Review panel gains an optional **Clean up formatting with AI** checkbox (off by default): when ticked, each issue's excerpt is run through the same word-preserving reformat pass the editor's Reformat button uses, so manuscripts (and comic scripts / screenplays) land already-clean. It's best-effort — a reformat that fails or would change any wording silently keeps the original text, so an import never breaks — and a live per-issue checklist shows progress while it runs. Left off by default because it's one AI pass per issue, so a large import opts in deliberately. (#1335)
- **[issue-1325] Video renders now record the exact runtime they ran on — and you can see it at a glance.** Garbled or "mosaic" video output is often a per-chip/per-runtime numerical quirk rather than an outright crash, and until now a render left no trace of the stack that produced it. Each local video render now stamps a one-line **runtime fingerprint** — the resolved ltx/mlx (or torch+CUDA on Windows) versions plus your chip, OS, and Python — into the render log and onto the saved history record, so a problem render self-documents the environment that made it. The Video Gen status header also shows your host chip/OS and the installed runtimes' versions on demand, without running a render — so a bug report can carry the version info that makes it actionable. (#1325)