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
address review: 'Auto' clears saved defaults via explicit null (#1407)
Adam Eivya93bef6ad346
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 7906a57f72..4a125cd641 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -2,7 +2,7 @@## Added-- **[issue-1407] The LoRA-training form now exposes the per-run base-quant and low-RAM overrides.** The `baseQuant` (bf16 / 8-bit / 4-bit) and `lowRam` request params landed server-side under #1321 — schema, route threading, and the `LORA_TRAIN_MAX_QUANT_BITS` cap — but the training form had no controls for them, so opting a single run into a heavier or lighter frozen base than its memory-derived tier still meant a code change. The Train-LoRA panel now has two **Base quant** and **Low RAM spill** selects (both defaulting to **Auto**); "Auto" leaves the param absent so the server keeps its memory-derived default (no behavior change for anyone who doesn't touch them), while an explicit pick overrides the tier — still clamped by the install's `LORA_TRAIN_MAX_QUANT_BITS` ceiling. mflux runtime only. (`client/src/components/loraTraining/TrainingPanel.jsx`, #1407)+- **[issue-1407] The LoRA-training form now exposes the per-run base-quant and low-RAM overrides.** The `baseQuant` (bf16 / 8-bit / 4-bit) and `lowRam` request params landed server-side under #1321 — schema, route threading, and the `LORA_TRAIN_MAX_QUANT_BITS` cap — but the training form had no controls for them, so opting a single run into a heavier or lighter frozen base than its memory-derived tier still meant a code change. The Train-LoRA panel now has two **Base quant** and **Low RAM spill** selects (both defaulting to **Auto**); an explicit pick overrides the tier — still clamped by the install's `LORA_TRAIN_MAX_QUANT_BITS` ceiling — while "Auto" sends an explicit `null` that forces the memory-derived tier. (The `null` is a deliberate clear, not an omitted key: the server re-merges `settings.loraTraining.defaults` into every run, so an omitted key would silently keep a *saved* default — `null` lets "Auto" actually beat one.) The controls only show when the mflux engine is the one that'll run; the torch/FLUX2 path trains the bf16 base and ignores them. (`client/src/components/loraTraining/TrainingPanel.jsx`, `server/lib/validation.js`, #1407)- **CyberCity buildings now have real lit-room windows you can look into.** Online towers in the 3D city (CyberCity) render parallax interior-mapped window panes via the [three-fenestra](https://github.com/codedgar/three-fenestra) shader — a `MeshStandardMaterial` that fakes furnished 3D rooms behind flat glass, so as the camera moves you see *into* lit (and unlit) rooms rather than a flat emissive texture. Each building is a single instanced draw call: a deterministic per-pane seed drives the room-cell pick and per-window lit/unlit + warm/cool lighting entirely on the GPU, with the cool tone pulled toward the building's neon accent so windows stay in-family with the scene. The effect is night-only (by day a tower reads as a sunlit solid) and gated to the **high** quality preset and above, so medium/low machines keep the lighter flat-texture facade. (`client/src/components/city/BuildingWindows.jsx`, `client/src/utils/cityInteriorWindows.js`, `client/src/components/city/{Building,Borough}.jsx`)diff --git a/client/src/components/loraTraining/TrainingPanel.jsx b/client/src/components/loraTraining/TrainingPanel.jsxindex 3fb2ffd727..7a5950fdb4 100644--- a/client/src/components/loraTraining/TrainingPanel.jsx+++ b/client/src/components/loraTraining/TrainingPanel.jsx@@ -312,16 +312,19 @@ export default function TrainingPanel({ dataset, readiness, triggerSaving, onRun{/* Frozen-base overrides (issue #1407 / #1321) — only feed the mfluxconfig builder, so gate on the mflux engine being the one that'llrun (the torch/FLUX2 path always trains the bf16 base and ignores- these). "Auto" → param absent → server keeps its memory-derived tier- (still clamped by LORA_TRAIN_MAX_QUANT_BITS); '' → undefined so the- key drops out of the payload entirely (true "absent"). */}+ these). "Auto" sends an explicit `null` (NOT absent): the server+ re-merges saved settings.loraTraining.defaults into the run, so an+ omitted key would silently keep a configured default — `null` is a+ deliberate clear that forces the memory-derived tier (still clamped+ by LORA_TRAIN_MAX_QUANT_BITS). buildMfluxTrainConfig treats a+ null/non-boolean as "no override". */}{params && status?.runtimes?.mflux?.ready && (<div><label htmlFor="lt-param-baseQuant" className="block text-xs text-gray-400 mb-1">Base quant</label><selectid="lt-param-baseQuant"value={params.baseQuant ?? ''}- onChange={(e) => setParam('baseQuant', e.target.value === '' ? undefined : Number(e.target.value))}+ onChange={(e) => setParam('baseQuant', e.target.value === '' ? null : Number(e.target.value))}className="w-full bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm text-white"><option value="">Auto</option>@@ -337,7 +340,7 @@ export default function TrainingPanel({ dataset, readiness, triggerSaving, onRun<selectid="lt-param-lowRam"value={params.lowRam === true ? 'on' : params.lowRam === false ? 'off' : ''}- onChange={(e) => setParam('lowRam', e.target.value === '' ? undefined : e.target.value === 'on')}+ onChange={(e) => setParam('lowRam', e.target.value === '' ? null : e.target.value === 'on')}className="w-full bg-port-bg border border-port-border rounded px-2 py-1.5 text-sm text-white"><option value="">Auto</option>diff --git a/server/lib/validation.js b/server/lib/validation.jsindex beb6ebea2b..9453616fda 100644--- a/server/lib/validation.js+++ b/server/lib/validation.js@@ -848,14 +848,16 @@ const loraTrainingParamsSchema = z.object({checkpointEvery: z.number().int().min(0).max(5000).optional(),sampleEvery: z.number().int().min(0).max(5000).optional(),samplePrompt: z.string().max(2000).optional(),- // Per-run frozen-base overrides (issue #1321), mflux runtime only. `baseQuant`- // picks the quant of the frozen base — 16 = unquantized bf16, 8/4 = QLoRA- // bit-width — letting a run opt into a heavier/lighter base than the+ // Per-run frozen-base overrides (issue #1321/#1407), mflux runtime only.+ // `baseQuant` picks the quant of the frozen base — 16 = unquantized bf16, 8/4+ // = QLoRA bit-width — letting a run opt into a heavier/lighter base than the// memory-derived default without a code change. `lowRam` toggles the on-disk- // latent-cache spill. Both absent → the deriveMfluxMemoryConfig tier; an+ // latent-cache spill. `null` is the form's "Auto": a deliberate clear that+ // forces the deriveMfluxMemoryConfig tier even when a saved default exists+ // (distinct from absent, which lets the saved default merge through). An// explicit value still cannot exceed the LORA_TRAIN_MAX_QUANT_BITS cap.- baseQuant: z.union([z.literal(4), z.literal(8), z.literal(16)]).optional(),- lowRam: z.boolean().optional(),+ baseQuant: z.union([z.literal(4), z.literal(8), z.literal(16)]).nullable().optional(),+ lowRam: z.boolean().nullable().optional(),});// LoRA training settings slice (`settings.loraTraining`) — vision-captiondiff --git a/server/services/loraTraining/runtimes.test.js b/server/services/loraTraining/runtimes.test.jsindex 44a30ebe58..0f50bade90 100644--- a/server/services/loraTraining/runtimes.test.js+++ b/server/services/loraTraining/runtimes.test.js@@ -198,6 +198,15 @@ describe('buildMfluxTrainConfig', () => {// No override → memory-derived tier is untouched (128 GB → bf16).expect(buildMfluxTrainConfig({ ...base, totalMemGb: 128 }).quantize).toBeNull();});++ it('treats null baseQuant/lowRam ("Auto") as no override (issue #1407)', () => {+ // The form sends an explicit `null` for "Auto" (a deliberate clear that+ // beats a saved default), which must behave identically to absent: the+ // memory-derived tier wins. A null baseQuant must NOT be coerced to 0.+ const cfg = buildMfluxTrainConfig({ ...base, totalMemGb: 48, params: { baseQuant: null, lowRam: null } });+ expect(cfg.quantize).toBe(4); // 48 GB tier, not touched by the null clear+ expect(cfg.low_ram).toBe(true);+ });});describe('buildMfluxTrainArgs / buildFlux2TrainArgs', () => {