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

retire the LTX-2 Unified video model in favour of LTX-2.3

[._.]/ Adam Eivyba0e8b303b0f
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 4de0f8c013..2b205d1dcb 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -4,6 +4,10 @@
- **Freeing a model's disk space on Media → Models is now done from the model's own row.** The page listed the same models twice for two unrelated reasons: a catalog list at the top (what you can pick in the gen forms) where a downloaded built-in showed a padlock and no way to act on it, and a separate "Cached Models" list far below (what is on disk) where the delete actually lived. Reclaiming 12 GB meant recognizing the model a second time under a different name, after scrolling past the whole catalog. The two lists are now joined on the HuggingFace repo: each catalog row shows its own on-disk size, and carries its own **Delete weights** button — built-ins included, because the padlock only ever meant "you can't rename or remove this catalog entry," never "you can't reclaim the download." User-added models keep a separate **Remove** for the catalog entry itself, so the two very different deletes are distinct actions with distinct wording instead of one ambiguous trash icon. The catalog also moved above the add-from-HuggingFace form, so managing what you already have doesn't start with scrolling. The section below now lists only downloads the catalog does *not* cover — text encoders, and weights left behind by a model you removed — and says so. Every delete on the page, weights and LoRAs alike, now arms an inline confirm first: these are multi-gigabyte, no-undo actions that were one stray tap away.
+- **LTX-2 Unified is retired from the video model list.** The original ~42 GB `notapalindrome/ltx2-mlx-av` model had been sitting in the Legacy section of every video model picker since LTX-2.3 arrived, and there is no longer a reason to pick it: LTX-2.3 Unified Beta is the quality ceiling for the same runtime, and LTX-2.3 Distilled Q4 — the shipped default — is both better *and* half the download. It's gone from fresh installs, and an upgrade removes it from your registry too, so a 42 GB dead end stops being one keystroke away in the dropdown. Two things are deliberately left alone: if you re-pointed that entry at your own repo or a fork, it's your model and it stays; and if it was your configured default, the default moves to LTX-2.3 Distilled Q4 rather than silently landing on the 48 GB Unified Beta. Nothing you already rendered changes, but a saved project that still names `ltx2_unified` will need a model picked before it re-renders. Already-downloaded LTX-2 weights stay in the HuggingFace cache — the Cached Models section on Media → Models now lists them as weights left behind by a removed model, with a **Delete weights** button, if you want the disk back.
+
+- Internal: retiring a built-in video model now has a `RETIRED_VIDEO_MODELS` table in `server/lib/mediaModels.js` rather than living only in a migration. The migration alone would have been undone by the boot that applied it — the registry is cached at import time, before `bootstrapServices()` reaches the migration runner, and the next registry edit writes that stale cached object back to disk. The table is the load-time twin (same arrangement `applyVideoDisclosures`/migration 237 and `backfillKvRepo`/migration 064 already use), carries the successor id so a default naming a retired model repoints instead of falling through to whatever happens to be first, and shares the fork-preservation guard with the migration — asserted equal across the two copies so a typo in either can't silently no-op one half. `scripts/migrations/_lib.js` also gained `readMediaRegistry`/`writeMediaRegistry`, the strict-read → skip → platform-array shell that migration 244 and the new 247 were carrying verbatim.
+
- **Picking a source image on Video Gen now shows you the images.** Every gallery slot on the Video Gen form — the image-to-video source frame, the FFLF first/last pair, each multi-keyframe row, and each IC-LoRA reference row — used to be a dropdown of bare filenames capped at the 50 newest renders, which meant choosing a frame by guessing at `ltx-1754...png`. Those dropdowns are now the same searchable thumbnail-grid picker the Image Gen image-to-image form uses: your whole gallery, with previews, full-text search across prompt/model/seed/LoRA, and universe/collection and type filters. Uploading a frame from disk works exactly as before.
- **Accepting a restricted model's license now counts everywhere, and the acceptance appears where you're blocked.** Generating a music video scene with MiniMax H3 failed with "requires acknowledgement of its territory restrictions, Community License, and Acceptable Use Policy" — even for someone who had already ticked exactly that box on the Video Gen page, because the acknowledgement was only remembered in that page's browser storage and no other screen had a way to show it. The acknowledgement is now a property of the install: accept it once, on any screen, and every render path is authorized — the Video Gen page, the music video scene board, and background producers like pipeline stages and scheduled agent runs that have no way to ask you. The music video board also shows the acknowledgement panel inline next to its renderer picker, so the terms are readable and acceptable on the screen that triggers the render; when a render is refused anyway, the message now says where the acceptance is made instead of naming rules with no way to reach them. Acceptance is keyed to the exact reviewed license version, so a future revision asks again rather than inheriting an old approval. And because the recorded acknowledgement is the *only* thing that authorizes a render — a request can no longer assert its own — withdrawing it takes effect everywhere at once, including on work already sitting in the render queue.
diff --git a/data.reference/media-models.json b/data.reference/media-models.json
index 95a3f2e11a..7e7ed252f4 100644
--- a/data.reference/media-models.json
+++ b/data.reference/media-models.json
@@ -2,28 +2,6 @@
"_doc": "PortOS media model registry. Edit to add models, tune defaults, or switch the text encoder. Restart the server to apply changes.",
"video": {
"macos": [
- {
- "id": "ltx2_unified",
- "name": "LTX-2 Unified (~42 GB)",
- "repo": "notapalindrome/ltx2-mlx-av",
- "runtime": "mlx_video",
- "steps": 30,
- "guidance": 3,
- "deprecated": true,
- "disclosure": {
- "modelCardUrl": "https://huggingface.co/notapalindrome/ltx2-mlx-av",
- "weightsLicense": {
- "name": "MIT",
- "url": "https://opensource.org/license/mit"
- },
- "runtimeLicense": {
- "name": "MIT",
- "url": "https://pypi.org/project/mlx-video-with-audio/"
- },
- "estimatedDownloadGb": 44.7,
- "reviewedAt": "2026-08-09"
- }
- },
{
"id": "ltx23_unified",
"name": "LTX-2.3 Unified Beta (~48 GB, bf16 quality ceiling)",
diff --git a/scripts/migrations/244-minimax-h3-image-to-video.js b/scripts/migrations/244-minimax-h3-image-to-video.js
index 66e38eef83..53dc4148b5 100644
--- a/scripts/migrations/244-minimax-h3-image-to-video.js
+++ b/scripts/migrations/244-minimax-h3-image-to-video.js
@@ -26,8 +26,7 @@
* repo/revision is left alone entirely — its files may not exist there.
*/
-import { join } from 'path';
-import { atomicWrite, readJSONFileStrict } from '../../server/lib/fileUtils.js';
+import { readMediaRegistry, writeMediaRegistry } from './_lib.js';
const REL_PATH = 'data/media-models.json';
const H3_ID = 'minimax_h3_8bit';
@@ -46,25 +45,8 @@ const PROCESSOR_FILES = [
export default {
async up({ rootDir }) {
- const path = join(rootDir, REL_PATH);
- // `ok` separates "never written" (fresh install — the seed will carry this
- // change) from "unreadable or corrupt", where rewriting the file would
- // destroy a registry we couldn't read.
- const { ok, value: config } = await readJSONFileStrict(path, null);
- if (!ok) {
- console.log(`⚠️ ${REL_PATH}: unreadable or invalid JSON, skipping`);
- return;
- }
- if (config == null) {
- console.log(`📄 ${REL_PATH} not present — skipping (fresh install seeds from data.reference)`);
- return;
- }
-
- const macos = Array.isArray(config?.video?.macos) ? config.video.macos : null;
- if (!macos) {
- console.log(`⚠️ ${REL_PATH}: no video.macos[] array — skipping`);
- return;
- }
+ const { ok, config, entries: macos, path } = await readMediaRegistry({ rootDir });
+ if (!ok) return;
const entry = macos.find((m) => m?.id === H3_ID);
if (!entry) {
@@ -99,7 +81,7 @@ export default {
}
if (changed) {
- await atomicWrite(path, `${JSON.stringify(config, null, 2)}\n`);
+ await writeMediaRegistry(path, config);
console.log(`📝 ${REL_PATH}: enabled MiniMax H3 image-to-video + FFLF (added the Qwen3-VL processor files)`);
} else {
console.log(`✅ ${REL_PATH}: MiniMax H3 already keyframe-capable, no changes`);
diff --git a/scripts/migrations/247-retire-ltx2-unified.js b/scripts/migrations/247-retire-ltx2-unified.js
new file mode 100644
index 0000000000..594b833f37
--- /dev/null
+++ b/scripts/migrations/247-retire-ltx2-unified.js
@@ -0,0 +1,72 @@
+/**
+ * Retire the LTX-2 Unified video model from existing registries.
+ *
+ * `ltx2_unified` (notapalindrome/ltx2-mlx-av, ~42 GB) shipped `deprecated: true`
+ * once LTX-2.3 landed and is now removed outright: LTX-2.3 Unified Beta is the
+ * bf16 quality ceiling for the same `mlx_video` runtime, and LTX-2.3 Distilled
+ * Q4 is both smaller (~22 GB) and better than LTX-2 was. Keeping a strictly
+ * worse 42 GB download in the picker only costs users disk and render time.
+ *
+ * `data/media-models.json` is gitignored runtime state and is not a
+ * JSON_MERGE_TARGET, so a fresh install gets the shorter list from
+ * data.reference/media-models.json while existing installs need this patch.
+ * Removing the entry from `DEFAULT_REGISTRY` alone is NOT enough — the user's
+ * persisted list is the source of truth for the picker, and
+ * `appendNewlyShippedEntries` never deletes from it.
+ *
+ * This is the on-disk half of the retirement; `RETIRED_VIDEO_MODELS` in
+ * `server/lib/mediaModels.js` is the load-time half, and it is the one that
+ * actually governs what the pickers show — the registry is cached at import
+ * time, before the runner reaches this migration. The two share the same
+ * constants (asserted in this migration's test) and the same preservation rule:
+ * an entry a user re-pointed at a different `repo` is their model, not the
+ * retired built-in, and survives untouched.
+ *
+ * `video.defaultMacos` is repointed at `ltx23_distilled_q4` only when the
+ * removal actually happened and that replacement is present; otherwise
+ * `getDefaultVideoModelId()`'s "unknown default → first available" fallback
+ * would silently land on the 48 GB Unified Beta.
+ *
+ * `_shippedDefaults.video.macos` intentionally keeps the id: it records what has
+ * ever been delivered to this install, nothing re-adds a model that is no longer
+ * in `DEFAULT_REGISTRY`, and `warnDrift` ignores ids that aren't current
+ * built-ins, so no boot warning results.
+ */
+
+import { readMediaRegistry, writeMediaRegistry } from './_lib.js';
+
+export const RETIRED_ID = 'ltx2_unified';
+export const SHIPPED_REPO = 'notapalindrome/ltx2-mlx-av';
+export const REPLACEMENT_ID = 'ltx23_distilled_q4';
+
+export default {
+ async up({ rootDir }) {
+ const { ok, config, entries: macos, path } = await readMediaRegistry({ rootDir });
+ if (!ok) return;
+
+ const entry = macos.find((m) => m?.id === RETIRED_ID);
+ if (!entry) {
+ console.log(`✅ media-models: no '${RETIRED_ID}' entry — already retired, nothing to migrate`);
+ return;
+ }
+ if (entry.repo !== SHIPPED_REPO) {
+ console.log(`✅ media-models: '${RETIRED_ID}' points at ${entry.repo} — user-repointed, leaving it alone`);
+ return;
+ }
+
+ config.video.macos = macos.filter((m) => m?.id !== RETIRED_ID);
+
+ // When the replacement was deleted too, leave defaultMacos pointing at the
+ // retired id and let getDefaultVideoModelId() fall back to whatever this
+ // install still has, rather than naming a model that isn't there.
+ let defaultNote = '';
+ if (config.video.defaultMacos === RETIRED_ID
+ && config.video.macos.some((m) => m?.id === REPLACEMENT_ID)) {
+ config.video.defaultMacos = REPLACEMENT_ID;
+ defaultNote = `; default video model → ${REPLACEMENT_ID}`;
+ }
+
+ await writeMediaRegistry(path, config);
+ console.log(`📝 media-models: retired '${RETIRED_ID}' — superseded by LTX-2.3${defaultNote}`);
+ },
+};
diff --git a/scripts/migrations/247-retire-ltx2-unified.test.js b/scripts/migrations/247-retire-ltx2-unified.test.js
new file mode 100644
index 0000000000..49d628ba05
--- /dev/null
+++ b/scripts/migrations/247-retire-ltx2-unified.test.js
@@ -0,0 +1,149 @@
+import { describe, it, expect, beforeEach, afterEach } from 'vitest';
+import { mkdtempSync, readFileSync, rmSync, writeFileSync, mkdirSync } from 'fs';
+import { tmpdir } from 'os';
+import { join } from 'path';
+import { repoRoot } from './_testHelpers.js';
+import { RETIRED_VIDEO_MODELS } from '../../server/lib/mediaModels.js';
+import migration, { RETIRED_ID, SHIPPED_REPO, REPLACEMENT_ID } from './247-retire-ltx2-unified.js';
+
+const REFERENCE_PATH = join(repoRoot, 'data.reference', 'media-models.json');
+
+const writeJson = (path, value) => writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`);
+const readJson = (path) => JSON.parse(readFileSync(path, 'utf-8'));
+
+const shippedLtx2 = () => ({
+ id: RETIRED_ID,
+ name: 'LTX-2 Unified (~42 GB)',
+ repo: SHIPPED_REPO,
+ runtime: 'mlx_video',
+ steps: 30,
+ guidance: 3,
+ deprecated: true,
+});
+
+const registryWith = (ltx2, overrides = {}) => ({
+ video: {
+ macos: [
+ ...(ltx2 ? [ltx2] : []),
+ { id: 'ltx23_unified', name: 'LTX-2.3 Unified Beta' },
+ { id: REPLACEMENT_ID, name: 'LTX-2.3 Distilled Q4' },
+ ],
+ windows: [{ id: 'ltx_video', name: 'LTX-Video 0.9.5' }],
+ defaultMacos: 'ltx23_unified',
+ defaultWindows: 'ltx_video',
+ ...overrides,
+ },
+ image: [],
+ _shippedDefaults: { video: { macos: [RETIRED_ID, REPLACEMENT_ID], windows: ['ltx_video'] } },
+});
+
+const idsIn = (config) => config.video.macos.map((entry) => entry.id);
+
+describe('migration 247 — retire LTX-2 Unified', () => {
+ let rootDir;
+ let path;
+
+ beforeEach(() => {
+ rootDir = mkdtempSync(join(tmpdir(), 'migration-247-'));
+ mkdirSync(join(rootDir, 'data'), { recursive: true });
+ path = join(rootDir, 'data', 'media-models.json');
+ });
+
+ afterEach(() => rmSync(rootDir, { recursive: true, force: true }));
+
+ // The migration freezes its own constants (per the migration convention) but
+ // it is only half the retirement — mediaModels.js drops the same entry at
+ // load. If the two copies drift, one half silently stops matching anything.
+ it('froze the same id, repo, and replacement as the registry loader', () => {
+ expect(RETIRED_VIDEO_MODELS[RETIRED_ID]).toEqual({
+ shippedRepo: SHIPPED_REPO,
+ replacement: REPLACEMENT_ID,
+ });
+ });
+
+ // The migration exists to bring persisted registries in line with the seed a
+ // fresh install gets. If the seed ever re-gained the entry the two paths would
+ // silently diverge, so assert the seed agrees the model is gone.
+ it('matches data.reference, which no longer ships the entry', () => {
+ const seeded = JSON.parse(readFileSync(REFERENCE_PATH, 'utf-8'));
+ expect(seeded.video.macos.some((entry) => entry.id === RETIRED_ID)).toBe(false);
+ expect(seeded.video.macos.some((entry) => entry.id === REPLACEMENT_ID)).toBe(true);
+ });
+
+ it('removes the retired entry and leaves the LTX-2.3 models in place', async () => {
+ writeJson(path, registryWith(shippedLtx2()));
+ await migration.up({ rootDir });
+
+ expect(idsIn(readJson(path))).toEqual(['ltx23_unified', REPLACEMENT_ID]);
+ });
+
+ it('keeps _shippedDefaults intact so nothing re-adds the model', async () => {
+ writeJson(path, registryWith(shippedLtx2()));
+ await migration.up({ rootDir });
+
+ expect(readJson(path)._shippedDefaults.video.macos).toContain(RETIRED_ID);
+ });
+
+ it('repoints a default that pointed at the retired model', async () => {
+ writeJson(path, registryWith(shippedLtx2(), { defaultMacos: RETIRED_ID }));
+ await migration.up({ rootDir });
+
+ expect(readJson(path).video.defaultMacos).toBe(REPLACEMENT_ID);
+ });
+
+ it('leaves the stale default alone when the replacement is not installed', async () => {
+ const config = registryWith(shippedLtx2(), { defaultMacos: RETIRED_ID });
+ config.video.macos = config.video.macos.filter((entry) => entry.id !== REPLACEMENT_ID);
+ writeJson(path, config);
+ await migration.up({ rootDir });
+
+ const after = readJson(path);
+ expect(idsIn(after)).toEqual(['ltx23_unified']);
+ // Load-time fallback picks the first available model; inventing an id the
+ // install doesn't have would be worse than leaving the stale value.
+ expect(after.video.defaultMacos).toBe(RETIRED_ID);
+ });
+
+ it('does not touch a default pointing at another model', async () => {
+ writeJson(path, registryWith(shippedLtx2()));
+ await migration.up({ rootDir });
+
+ expect(readJson(path).video.defaultMacos).toBe('ltx23_unified');
+ });
+
+ it('is idempotent', async () => {
+ writeJson(path, registryWith(shippedLtx2()));
+ await migration.up({ rootDir });
+ const once = readJson(path);
+ await migration.up({ rootDir });
+ expect(readJson(path)).toEqual(once);
+ });
+
+ // The repo guard runs before any default handling, so a re-pointed entry that
+ // is ALSO the configured default must come through completely untouched.
+ it('skips an entry the user re-pointed at another repo, default included', async () => {
+ const forked = shippedLtx2();
+ forked.repo = 'example-org/ltx2-fork';
+ const before = registryWith(forked, { defaultMacos: RETIRED_ID });
+ writeJson(path, before);
+ await migration.up({ rootDir });
+ expect(readJson(path)).toEqual(before);
+ });
+
+ it('does nothing when the user already deleted the entry', async () => {
+ const before = registryWith(null);
+ writeJson(path, before);
+ await migration.up({ rootDir });
+ expect(readJson(path)).toEqual(before);
+ });
+
+ it('skips a missing registry file (fresh install seeds from data.reference)', async () => {
+ await expect(migration.up({ rootDir })).resolves.toBeUndefined();
+ });
+
+ it('skips an invalid registry file rather than throwing', async () => {
+ writeFileSync(path, '{ not json');
+ await expect(migration.up({ rootDir })).resolves.toBeUndefined();
+ expect(readFileSync(path, 'utf-8')).toBe('{ not json');
+ });
+});
diff --git a/scripts/migrations/_lib.js b/scripts/migrations/_lib.js
index 3632ab4121..5188eec0d8 100644
--- a/scripts/migrations/_lib.js
+++ b/scripts/migrations/_lib.js
@@ -13,6 +13,10 @@
* 5. Provider-seed migrations — `makeProviderSeedMigration` collapses the
* read → guard → add-missing-ids → write shell every migration that ships
* a new `data/providers.json` entry repeats (149, 152, 185, 195, 201, 231).
+ * 6. Media-model-registry migrations — `readMediaRegistry` /
+ * `writeMediaRegistry` collapse the strict-read → absent/unreadable skip →
+ * platform-array guard shell shared by every migration that patches
+ * `data/media-models.json` (244, 247, …).
*
* The runner (`scripts/run-migrations.js`) explicitly skips `_`-prefixed
* files so this module is never imported as a migration.
@@ -22,6 +26,7 @@ import { readFile, writeFile, unlink, readdir, rename, mkdir, stat } from 'fs/pr
import { join } from 'path';
import { pathToFileURL } from 'url';
import { createHash } from 'crypto';
+import { atomicWrite, readJSONFileStrict } from '../../server/lib/fileUtils.js';
// ---- monolithic → per-record split-migration family ----
//
@@ -533,6 +538,49 @@ export async function writeLayoutsDoc(path, doc) {
await writeFile(path, JSON.stringify(doc, null, 2));
}
+// ---- media-model-registry migration family ----
+
+const MEDIA_MODELS_REL_PATH = 'data/media-models.json';
+
+/**
+ * Read `data/media-models.json` for a registry-patching migration. Collapses
+ * the preamble every such migration repeats (244, 247, …): resolve the path,
+ * strict-read it, and pull out one platform's entry array.
+ *
+ * `readJSONFileStrict`'s `ok` flag is what separates "never written" (fresh
+ * install — the seed in `data.reference/` already carries the change) from
+ * "unreadable or corrupt", where rewriting the file would destroy a registry we
+ * couldn't read. Both are skips, but only one of them is a warning.
+ *
+ * Returns `{ ok: false }` when the caller should do nothing, or
+ * `{ ok: true, config, entries, path }` — mutate `config` in place, then persist
+ * with `writeMediaRegistry(path, config)`. `platform` selects which
+ * `config.video.<platform>` array lands in `entries`.
+ */
+export async function readMediaRegistry({ rootDir, platform = 'macos' } = {}) {
+ const path = join(rootDir, MEDIA_MODELS_REL_PATH);
+ const { ok, value: config } = await readJSONFileStrict(path, null);
+ if (!ok) {
+ console.log(`⚠️ ${MEDIA_MODELS_REL_PATH}: unreadable or invalid JSON, skipping`);
+ return { ok: false };
+ }
+ if (config == null) {
+ console.log(`📄 ${MEDIA_MODELS_REL_PATH} not present — skipping (fresh install seeds from data.reference)`);
+ return { ok: false };
+ }
+ const entries = config?.video?.[platform];
+ if (!Array.isArray(entries)) {
+ console.log(`⚠️ ${MEDIA_MODELS_REL_PATH}: no video.${platform}[] array — skipping`);
+ return { ok: false };
+ }
+ return { ok: true, config, entries, path };
+}
+
+/** Persist a media-model registry with the canonical trailing-newline shape. */
+export async function writeMediaRegistry(path, config) {
+ await atomicWrite(path, `${JSON.stringify(config, null, 2)}\n`);
+}
+
// ---- brain seed-record migration family ----
//
// `scripts/setup-data.js` copies `data.reference/` wholesale, so a FRESH install
diff --git a/server/lib/mediaModels.js b/server/lib/mediaModels.js
index b12c7b9d92..9dbcd11c92 100644
--- a/server/lib/mediaModels.js
+++ b/server/lib/mediaModels.js
@@ -60,12 +60,11 @@ const DEFAULT_REGISTRY = {
macos: applyVideoFinishProfiles(applyVideoDisclosures([
// notapalindrome's mlx-video-with-audio runtime — single PyPI package,
// T2V/I2V only, FFLF degrades to last-frame conditioning (one --image arg).
- // LTX-2 (the older 42 GB model) stays deprecated — superseded by 2.3.
- // The 2.3 Unified Beta and Distilled Q4 are no longer deprecated:
- // 2.3 Unified bf16 is the quality ceiling for the mlx_video runtime, and
- // is now practical on 128 GB unified-memory hardware. Distilled Q4 is
- // still the shipped default because it works on smaller boxes.
- { id: 'ltx2_unified', name: 'LTX-2 Unified (~42 GB)', repo: 'notapalindrome/ltx2-mlx-av', runtime: 'mlx_video', steps: 30, guidance: 3.0, deprecated: true },
+ // LTX-2 Unified (the older 42 GB model) was retired in favour of 2.3 —
+ // see RETIRED_VIDEO_MODELS. 2.3 Unified bf16 is the quality ceiling for
+ // the mlx_video runtime and is practical on 128 GB unified-memory
+ // hardware, while Distilled Q4 is both smaller and better than LTX-2 was,
+ // and stays the shipped default because it works on smaller boxes.
{ id: 'ltx23_unified', name: 'LTX-2.3 Unified Beta (~48 GB, bf16 quality ceiling)', repo: 'notapalindrome/ltx23-mlx-av', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
{ id: 'ltx23_distilled_q4', name: 'LTX-2.3 Distilled Q4 (~22 GB)', repo: 'notapalindrome/ltx23-mlx-av-q4', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
// dgrauet's ltx-2-mlx runtime — true KeyframeInterpolationPipeline,
@@ -630,6 +629,9 @@ const appendNewlyShippedEntries = (userList, defaultList, shippedIds) => {
// with 'mlx_video' (the legacy default) for known-legacy ids so the
// dispatch in videoGen/local.js routes them through `python -m
// mlx_video.generate_av` rather than treating undefined as ltx2.
+// 'ltx2_unified' is retired (see RETIRED_VIDEO_MODELS) but stays here: an
+// install that re-pointed its entry at a fork keeps that entry, and it still
+// needs the runtime backfill.
const LEGACY_MLX_VIDEO_IDS = new Set(['ltx2_unified', 'ltx23_unified', 'ltx23_distilled_q4', 'ltx_video']);
const backfillRuntime = (list) => {
if (!Array.isArray(list)) return list;
@@ -641,6 +643,59 @@ const backfillRuntime = (list) => {
});
};
+// Built-in video models that were delivered to installs and have since been
+// withdrawn. Dropping an id from DEFAULT_REGISTRY is NOT enough on its own: the
+// user's persisted list is what the pickers read, and appendNewlyShippedEntries
+// only ever adds. This is the load-time twin of the retirement migration (247
+// for ltx2_unified) — and it is the load-bearing half, because the registry is
+// cached at import time, BEFORE bootstrapServices() runs migrations, and
+// persistRegistry writes the whole cached object back on the next registry
+// edit. Without this the migration's deletion is undone by the same boot that
+// applied it.
+//
+// `replacement` repoints a `defaultMacos`/`defaultWindows` that named the
+// retired model. getDefaultVideoModelId() would otherwise fall back to the
+// first available entry, which is not necessarily the intended successor.
+//
+// Preservation guard mirrors backfillKvRepo: an entry whose `repo` no longer
+// matches the shipped one is a fork the user pointed at deliberately, so it
+// stays — that is also the escape hatch for anyone who wants a retired model
+// back.
+//
+// Exported so the matching retirement migration can assert it froze the same
+// id/repo/replacement — a typo in either copy would otherwise turn one half of
+// the retirement into a silent no-op with every test still green.
+export const RETIRED_VIDEO_MODELS = Object.freeze({
+ ltx2_unified: Object.freeze({
+ shippedRepo: 'notapalindrome/ltx2-mlx-av',
+ replacement: 'ltx23_distilled_q4',
+ }),
+});
+
+const isRetired = (entry) => {
+ if (!isPlainObject(entry) || typeof entry.id !== 'string') return false;
+ const spec = RETIRED_VIDEO_MODELS[entry.id];
+ // `spec &&` is load-bearing, not defensive: several entries (the Windows
+ // `ltx_video`) carry no `repo` at all, and without the guard an absent spec
+ // would compare `undefined === undefined` and retire every one of them.
+ return Boolean(spec) && entry.repo === spec.shippedRepo;
+};
+
+const dropRetiredEntries = (list) => (
+ Array.isArray(list) ? list.filter((entry) => !isRetired(entry)) : list
+);
+
+// Repoint a platform default that named a model this load just retired. Falls
+// through to the original id when the successor isn't installed either — then
+// getDefaultVideoModelId()'s "unknown default → first available" warning is the
+// honest outcome, rather than naming a model this install doesn't have.
+const resolveRetiredDefault = (configuredId, entries) => {
+ const replacement = RETIRED_VIDEO_MODELS[configuredId]?.replacement;
+ if (!replacement) return configuredId;
+ if (entries.some((entry) => entry?.id === configuredId)) return configuredId; // fork kept it
+ return entries.some((entry) => entry?.id === replacement) ? replacement : configuredId;
+};
+
// Build the initial shippedIds set for one platform on first encounter
// (no _shippedDefaults field yet).
//
@@ -734,6 +789,22 @@ const normalizeRegistry = (parsed) => {
list: [...shippedImageIds, ...imageResult.newlyShipped],
};
+ // applyVideoDisclosures is the load-time twin of migration 237: installs
+ // that persisted their registry before `disclosure` existed pick it up
+ // here without waiting for the migration, and both paths share the same
+ // preservation guards (user value wins, forked repo keeps Unknown).
+ // dropRetiredEntries is the same arrangement for migration 247, and runs
+ // FIRST so a withdrawn model isn't handed a disclosure or a Finish edge on
+ // its way out. sanitizeFinishProfiles runs LAST (after the backfill and
+ // after the user's own entries are merged in) so an edge that points at a
+ // model this install deleted — or a hand-edited typo — is dropped with a
+ // warning instead of surfacing a Finish button targeting nothing.
+ const videoEntries = (entries) => sanitizeFinishProfiles(applyVideoFinishProfiles(
+ applyVideoDisclosures(backfillRuntime(dropRetiredEntries(entries))),
+ ));
+ const macosEntries = videoEntries(macosResult.entries);
+ const windowsEntries = videoEntries(windowsResult.entries);
+
return {
...DEFAULT_REGISTRY,
...safe,
@@ -742,16 +813,14 @@ const normalizeRegistry = (parsed) => {
video: {
...DEFAULT_REGISTRY.video,
...safeVideo,
- // applyVideoDisclosures is the load-time twin of migration 237: installs
- // that persisted their registry before `disclosure` existed pick it up
- // here without waiting for the migration, and both paths share the same
- // preservation guards (user value wins, forked repo keeps Unknown).
- // sanitizeFinishProfiles runs LAST (after the backfill and after the
- // user's own entries are merged in) so an edge that points at a model
- // this install deleted — or a hand-edited typo — is dropped with a
- // warning instead of surfacing a Finish button targeting nothing.
- macos: sanitizeFinishProfiles(applyVideoFinishProfiles(applyVideoDisclosures(backfillRuntime(macosResult.entries)))),
- windows: sanitizeFinishProfiles(applyVideoFinishProfiles(applyVideoDisclosures(backfillRuntime(windowsResult.entries)))),
+ macos: macosEntries,
+ windows: windowsEntries,
+ defaultMacos: resolveRetiredDefault(
+ safeVideo.defaultMacos ?? DEFAULT_REGISTRY.video.defaultMacos, macosEntries,
+ ),
+ defaultWindows: resolveRetiredDefault(
+ safeVideo.defaultWindows ?? DEFAULT_REGISTRY.video.defaultWindows, windowsEntries,
+ ),
},
_shippedDefaults: {
...(safe._shippedDefaults || {}),
diff --git a/server/lib/mediaModels.test.js b/server/lib/mediaModels.test.js
index f14996e685..7cb064b7ad 100644
--- a/server/lib/mediaModels.test.js
+++ b/server/lib/mediaModels.test.js
@@ -416,17 +416,100 @@ describe('mediaModels registry', () => {
logSpy.mockRestore();
});
+ // Retirement has to bite at LOAD, not only in the migration: the registry is
+ // cached at import time (before bootstrapServices runs migrations) and
+ // persistRegistry writes the whole cached object back on the next edit, so a
+ // migration-only retirement is undone by the boot that applied it.
+ describe('retired video models', () => {
+ const RETIRED_ID = 'ltx2_unified';
+ const SHIPPED_REPO = 'notapalindrome/ltx2-mlx-av';
+
+ // _shippedDefaults claims every current built-in so appendNewlyShippedEntries
+ // adds nothing — these cases are about what the load REMOVES, and an
+ // "everything else is new" fixture would bury it under a dozen appends.
+ const shippedMacosIds = JSON.parse(readFileSync(SAMPLE_REGISTRY_PATH, 'utf-8'))
+ .video.macos.map((e) => e.id).concat(RETIRED_ID);
+
+ const writeRegistry = (macos, defaultMacos = 'ltx23_distilled_q4') => writeFileSync(
+ registryFile,
+ JSON.stringify({
+ video: { macos, windows: [], defaultMacos, defaultWindows: 'ltx_video' },
+ image: [],
+ textEncoders: [{ id: 't', label: 't', repo: 'r' }],
+ selectedTextEncoder: 't',
+ _shippedDefaults: { video: { macos: shippedMacosIds, windows: [] } },
+ }),
+ );
+ const retiredEntry = (repo = SHIPPED_REPO) => ({
+ id: RETIRED_ID, name: 'LTX-2 Unified', repo, runtime: 'mlx_video', steps: 30, guidance: 3.0,
+ });
+ const survivor = { id: 'ltx23_distilled_q4', name: 'LTX-2.3 Q4', repo: 'notapalindrome/ltx23-mlx-av-q4', runtime: 'mlx_video', steps: 25, guidance: 3.0 };
+
+ it('drops a persisted entry that still points at the shipped repo', async () => {
+ writeRegistry([retiredEntry(), survivor]);
+ const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {});
+ const { loadMediaModels } = await import('./mediaModels.js');
+ expect(loadMediaModels().video.macos.map((e) => e.id)).toEqual(['ltx23_distilled_q4']);
+ logSpy.mockRestore();
+ });
+
+ // The fork is the escape hatch: a user who re-pointed the entry owns it.
+ it('keeps an entry the user re-pointed at another repo', async () => {
+ writeRegistry([retiredEntry('example-org/ltx2-fork'), survivor]);
+ const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {});
+ const { loadMediaModels } = await import('./mediaModels.js');
+ expect(loadMediaModels().video.macos.map((e) => e.id)).toContain(RETIRED_ID);
+ logSpy.mockRestore();
+ });
+
+ it('repoints a default that named the retired model at its replacement', async () => {
+ writeRegistry([retiredEntry(), survivor], RETIRED_ID);
+ const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {});
+ const { loadMediaModels, getDefaultVideoModelId } = await import('./mediaModels.js');
+ expect(loadMediaModels().video.defaultMacos).toBe('ltx23_distilled_q4');
+ if (process.platform !== 'win32') expect(getDefaultVideoModelId()).toBe('ltx23_distilled_q4');
+ logSpy.mockRestore();
+ });
+
+ it('leaves the default alone when the fork kept the retired entry', async () => {
+ writeRegistry([retiredEntry('example-org/ltx2-fork'), survivor], RETIRED_ID);
+ const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {});
+ const { loadMediaModels } = await import('./mediaModels.js');
+ expect(loadMediaModels().video.defaultMacos).toBe(RETIRED_ID);
+ logSpy.mockRestore();
+ });
+
+ it('leaves the stale default alone when the replacement is gone too', async () => {
+ writeRegistry([retiredEntry()], RETIRED_ID);
+ const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {});
+ const { loadMediaModels } = await import('./mediaModels.js');
+ // Nothing left to name — getDefaultVideoModelId's "unknown default →
+ // first available" warning is the honest outcome.
+ expect(loadMediaModels().video.defaultMacos).toBe(RETIRED_ID);
+ logSpy.mockRestore();
+ });
+
+ it('does not re-add the retired model as a newly-shipped built-in', async () => {
+ writeRegistry([survivor]);
+ const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {});
+ const { loadMediaModels } = await import('./mediaModels.js');
+ expect(loadMediaModels().video.macos.some((e) => e.id === RETIRED_ID)).toBe(false);
+ logSpy.mockRestore();
+ });
+ });
+
it('user-deleted built-in video model is NOT re-added on subsequent load', async () => {
const platformKey = process.platform === 'win32' ? 'windows' : 'macos';
const otherKey = process.platform === 'win32' ? 'macos' : 'windows';
// Simulate a registry that already has _shippedDefaults (post-bootstrap)
- // but is missing one model the user deleted (ltx2_unified).
- const deletedId = 'ltx2_unified';
+ // but is missing one model the user deleted. The id MUST still be a current
+ // built-in — a retired one would pass this assertion for the wrong reason
+ // (nothing re-adds a model that left DEFAULT_REGISTRY).
+ const deletedId = 'ltx23_dgrauet_q8';
const remainingMacos = [
{ id: 'ltx23_unified', name: 'LTX-2.3 Unified Beta (~48 GB)', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
{ id: 'ltx23_distilled_q4', name: 'LTX-2.3 Distilled Q4 (~22 GB)', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
{ id: 'ltx23_dgrauet_q4', name: 'LTX-2.3 dgrauet Q4', runtime: 'ltx2', steps: 8, guidance: 3.0 },
- { id: 'ltx23_dgrauet_q8', name: 'LTX-2.3 dgrauet Q8', runtime: 'ltx2', steps: 8, guidance: 3.0 },
];
const shippedMacosIds = [deletedId, ...remainingMacos.map((e) => e.id)];
writeFileSync(registryFile, JSON.stringify({
@@ -462,7 +545,6 @@ describe('mediaModels registry', () => {
// Simulate a registry that pre-dates a newly-shipped model: _shippedDefaults
// exists but does NOT include 'ltx23_dgrauet_q8' (as if it shipped later).
const existingMacos = [
- { id: 'ltx2_unified', name: 'LTX-2 Unified', runtime: 'mlx_video', steps: 30, guidance: 3.0 },
{ id: 'ltx23_unified', name: 'LTX-2.3 Unified', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
{ id: 'ltx23_distilled_q4', name: 'LTX-2.3 Q4', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
{ id: 'ltx23_dgrauet_q4', name: 'LTX-2.3 dgrauet Q4', runtime: 'ltx2', steps: 8, guidance: 3.0 },
@@ -679,7 +761,6 @@ describe('mediaModels registry', () => {
// _shippedDefaults includes ltx23_dgrauet_q8 (it was added in a prior
// load), but the user has now removed it from their video list.
const userMacos = [
- { id: 'ltx2_unified', name: 'LTX-2 Unified', runtime: 'mlx_video', steps: 30, guidance: 3.0 },
{ id: 'ltx23_unified', name: 'LTX-2.3 Unified', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
{ id: 'ltx23_distilled_q4', name: 'LTX-2.3 Q4', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
{ id: 'ltx23_dgrauet_q4', name: 'LTX-2.3 dgrauet Q4', runtime: 'ltx2', steps: 8, guidance: 3.0 },
@@ -779,7 +860,7 @@ describe('mediaModels registry', () => {
// have it.
const driftedId = 'ltx23_dgrauet_q4';
const userPlatformList = platformKey === 'macos' ? [
- { id: 'ltx2_unified', name: 'LTX-2 Unified', runtime: 'mlx_video', steps: 30, guidance: 3.0 },
+ { id: 'ltx23_unified', name: 'LTX-2.3 Unified', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
// ltx23_dgrauet_q4 deliberately absent (drift)
] : [
{ id: 'ltx_video', name: 'LTX', runtime: 'mlx_video', steps: 25, guidance: 3.0 },
@@ -788,7 +869,7 @@ describe('mediaModels registry', () => {
video: {
[platformKey]: userPlatformList,
[otherKey]: [],
- defaultMacos: 'ltx2_unified',
+ defaultMacos: 'ltx23_unified',
defaultWindows: 'ltx_video',
},
image: [],
@@ -796,7 +877,7 @@ describe('mediaModels registry', () => {
selectedTextEncoder: 't',
_shippedDefaults: {
video: {
- macos: platformKey === 'macos' ? ['ltx2_unified', driftedId] : [],
+ macos: platformKey === 'macos' ? ['ltx23_unified', driftedId] : [],
windows: platformKey === 'windows' ? ['ltx_video'] : [],
},
image: { list: [] },
diff --git a/server/lib/videoDisclosure.js b/server/lib/videoDisclosure.js
index 866effd30b..2470e16394 100644
--- a/server/lib/videoDisclosure.js
+++ b/server/lib/videoDisclosure.js
@@ -32,7 +32,6 @@ export const VIDEO_DISCLOSURE_REVIEWED_AT = '2026-08-09';
// License descriptors reused across entries. `url` points at the primary text
// of the license, or at the model card when the card declares a custom license
// without publishing a distinct document.
-const MIT = { name: 'MIT', url: 'https://opensource.org/license/mit' };
const APACHE_2 = { name: 'Apache-2.0', url: 'https://www.apache.org/licenses/LICENSE-2.0' };
const TENCENT_HUNYUAN_WEIGHTS = {
name: 'Tencent Hunyuan Community License',
@@ -116,16 +115,6 @@ export const VIDEO_MODEL_DISCLOSURES = Object.freeze({
],
},
},
- ltx2_unified: {
- shippedRepo: 'notapalindrome/ltx2-mlx-av',
- disclosure: {
- modelCardUrl: hfModelCard('notapalindrome/ltx2-mlx-av'),
- weightsLicense: MIT,
- runtimeLicense: RUNTIME_LICENSE.mlx_video,
- estimatedDownloadGb: 44.7,
- reviewedAt: VIDEO_DISCLOSURE_REVIEWED_AT,
- },
- },
ltx23_unified: {
shippedRepo: 'notapalindrome/ltx23-mlx-av',
disclosure: {
@@ -241,7 +230,7 @@ export const VIDEO_MODEL_DISCLOSURES = Object.freeze({
});
// Deep-freeze the nested disclosure objects so a consumer can't mutate the
-// shared descriptors (`MIT`, `APACHE_2`, …) through one entry and corrupt every
+// shared descriptors (`APACHE_2`, `RUNTIME_LICENSE.*`, …) through one entry and corrupt every
// other entry that reuses them.
for (const spec of Object.values(VIDEO_MODEL_DISCLOSURES)) {
for (const value of Object.values(spec.disclosure)) {