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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
refine: Freydis captions were Codex-authored + uploaded via manual-caption path
[._.]/ Adam Eivyb6160c40dfa6
diff --git a/PLAN.md b/PLAN.mdindex d0f3de1a54..605ad60bdd 100644--- a/PLAN.md+++ b/PLAN.md@@ -20,7 +20,7 @@ independently.<!-- reference-watch proposals: slug-tagged, picked up by /claim later -->-- [ ] [lora-training-caption-strips-invariant-identity] **Character-LoRA captions must NOT describe invariant identity — warn/strip it, or the trigger token never learns the character.** Surfaced 2026-06-14 training Freydis (dataset `90043893`). The first 4B LoRA (run `d36562a0`) rendered a generic auburn-haired woman from the bare trigger `freydis_of_quaervarr portrait`, but rendered Freydis *correctly* when the full identity description was in the prompt — proving her identity (white hair, circlet, tooth necklace, leather armor) got bound to the caption PHRASES, not the trigger token. Every one of the 25 captions repeated her invariant features. Fix path that worked: rewrite captions to keep only the trigger + what VARIES (pose, framing, weapon, setting, style) and drop invariant identity, so the trigger absorbs it (retrain ~35 min). Product improvements: (a) PortOS's own auto-captioner (`server/services/loraDatasetCaption.js`) already says "do not mention the character's name" and scopes to pose/clothing/accessories — but canon-generated or hand-written captions (like Freydis's, full of lore weapon names) over-describe identity; (b) add a caption-lint/warn in the dataset workbench that flags when the SAME descriptive fragment (hair/eyes/skin/signature items) appears across most captions — that's identity that should move to the trigger; (c) optionally offer a one-click "strip shared identity fragments" that diffs captions and removes the common invariant block (the manual rewrite done for Freydis, generalized); (d) document the character-LoRA caption recipe in the workbench UI ("describe what changes shot-to-shot, not who she is"). Estimated scope: medium.+- [ ] [lora-training-caption-strips-invariant-identity] **Character-LoRA captions must NOT describe invariant identity — warn/strip it, or the trigger token never learns the character.** Surfaced 2026-06-14 training Freydis (dataset `90043893`). The first 4B LoRA (run `d36562a0`) rendered a generic auburn-haired woman from the bare trigger `freydis_of_quaervarr portrait`, but rendered Freydis *correctly* when the full identity description was in the prompt — proving her identity (white hair, circlet, tooth necklace, leather armor) got bound to the caption PHRASES, not the trigger token. Every one of the 25 captions repeated her invariant features. Fix path that worked: rewrite captions to keep only the trigger + what VARIES (pose, framing, weapon, setting, style) and drop invariant identity, so the trigger absorbs it (retrain ~35 min). **Caption source matters:** Freydis's images were `source: upload` with `captionSource: manual` — i.e. **Codex authored the captions externally (from the character canon/lore — hence "Northwind Cairnblade") and they were submitted through PortOS's manual-caption path** (`loraDatasets.js:393`), NOT produced by PortOS's vision auto-captioner. Codex described *the character* (identity-first), which is backwards for trigger-binding. The root fix is the external Codex prompt that authors these captions (it must follow the character-LoRA recipe: describe only what varies); PortOS's role is a safety net (lint/strip) since it can't control external caption authors. Product improvements: (a) PortOS's own auto-captioner (`server/services/loraDatasetCaption.js`) already says "do not mention the character's name" and scopes to pose/clothing/accessories — that path is fine; the canon-generation path is the offender; (b) add a caption-lint/warn in the dataset workbench that flags when the SAME descriptive fragment (hair/eyes/skin/signature items) appears across most captions — that's identity that should move to the trigger; (c) optionally offer a one-click "strip shared identity fragments" that diffs captions and removes the common invariant block (the manual rewrite done for Freydis, generalized); (d) document the character-LoRA caption recipe in the workbench UI ("describe what changes shot-to-shot, not who she is"). Estimated scope: medium.- [ ] [lora-training-default-base-tier-too-heavy] **Reconsider the LoRA-training memory tier + default steps — unquantized 9B is ~25× slower than 4B on a 128GB box for a character LoRA.** Surfaced 2026-06-14 training Freydis (dataset `90043893`). `deriveMfluxMemoryConfig` (`server/services/loraTraining/runtimes.js`) maps ≥96GB → `{quantize:null}` (full bf16). On the M5 Max 128GB, a `flux2-klein-9b` bf16 run at 768px/600 steps **failed to complete a single real training step in 14 min** (the 32GB base materialized for the fused `value_and_grad` forward+backward hits memory/swap pressure), whereas `flux2-klein-4b` ran steady at **~3.5s/step → ~35min total** (run `d36562a0`). The base-model size dominated; `TRAINING_DEFAULTS.steps` 600→400 was minor. Proposed: (a) for single-character LoRAs default to the 4B base (or 9B-8bit) rather than unquantized 9B even when RAM allows it — speed/fidelity tradeoff strongly favors the lighter base; (b) revisit `TRAINING_DEFAULTS.steps` (600 may be 1.5-2× more than needed for 25-image faces — the checkpoint picker lets the user grab an earlier checkpoint); (c) re-measure whether `low_ram:true` is still warranted on a 128GB box once the base is lighter (the in-RAM-cache rejection was decided during the swap-thrash that coincided with the panics). Expose base-quant/low_ram as request params (currently only steps/rank/lr/resolution/checkpointEvery/sampleEvery are in `loraTrainingParamsSchema`) so a run can opt into a heavier base without a code change. Validate fidelity: confirm a 4B Freydis LoRA is acceptable before changing the default. Estimated scope: medium.