Skip to content

Free, open-source AI video generator for Mac. Run LTX-2.5 and MiniMax H3 (Hailuo) locally on Apple Silicon: text-to-video and image-to-video with sound, lip-sync, character LoRA training, songs from lyrics (YuE2) and image editing (Qwen-Image-Edit). One-click install via Pinokio. Offline: no cloud, no API key, no NVIDIA GPU.

release(v3.1.1): Ideogram output-card buttons hotfix

mrbizarro09e5a9f0d873
diff --git a/VERSION b/VERSION
index fd2a018..94ff29c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.1.0
+3.1.1
diff --git a/docs/STATE.md b/docs/STATE.md
index 8b01b4e..693df0a 100644
--- a/docs/STATE.md
+++ b/docs/STATE.md
@@ -1,6 +1,6 @@
# Phosphene — project state, history, open work
-**Public release: `v3.1.0`.** The entire v3.0 line shipped — v3.0.0 (Characters / Voice / Image Studio / A2V, May 23) → v3.0.1 (FFLF crash fix) → v3.0.2 (Boost/Turbo accel restored after a 2-month silent regression) → v3.0.3 (HiDream hidden, #15) → v3.0.4 (CivitAI SSL) → v3.0.5 (A2V kwarg signature shim, #5) → v3.0.6 (deep-review hardening) → v3.0.7 (GPU-race fix + /status version surfacing) → **v3.0.8 (ltx-2-mlx v0.14.8 catch-up — codec-only patches, I2V "mosaic"/Metal-watchdog fix #17, ASCII version-skew handshake fix)** → **v3.0.9 (custom I2V Width×height inputs restored for power users; Train-tab dev-transformer Download "unknown install key" fix — form-encoding, reported by @cocktailpeanut)** → **v3.0.10 (model-integrity self-heal — boot scan + `/status.model_integrity` + a one-click Repair banner for corrupt/partial weights, the leading *non-Metal* "mosaic" garbage-decode cause; safetensors header+size check)** → **v3.0.11 (latent helper-handshake hang fixed: `_read_until` mixed `select()` on the raw fd with a buffered `readline()`, so any event the helper emitted *right before* `ready` — a version-skew line, the new runtime fingerprint — got stranded in the TextIOWrapper buffer and the panel hung 120 s → "helper failed to start: None". This is the true root cause behind the mislabeled "⚠️-emoji" handshake break. Now reads the raw fd via `os.read()` into a carry buffer and drains every complete line before re-`select()`-ing. PLUS: every render log self-documents its runtime — mlx/mlx-metal version + Apple chip + macOS — surfaced in `/status`, the `helper ready ·` line, and a standalone `runtime |` line, the exact data needed to triangulate the remaining MLX-numerical "mosaic")** → **v3.0.12 (the REAL mosaic fix + 3 more. The mosaic is NOT a code bug or the missing-upscaler theory (both disproved by local repro — the bare 6-file Q4 set renders byte-identical-clean on M4 Max); it's stale/corrupt weight *content* — right size, wrong bytes — that v3.0.10's header+size check can't see (confirmed: ronyeoh/#18 + claude3d/#5 fixed it only by a fresh full re-download). Added **deep checksum verify vs upstream**: Settings → Model files → "Verify model files (checksum)" / `/models/verify-deep` hashes every weight + compares to HuggingFace's published SHA-256 (proven to match local), mismatches feed the existing one-click Repair re-download. Validated: flipped 16 bytes mid-file → header+size passed, deep-verify caught it. ALSO in v3.0.12: character-LoRA-shows-as-"style-only" fix (#5 — `list_user_loras` recovers trigger+kind from the `_v2` filename when the sidecar is missing); `cgi`→`email` multipart migration (Python-3.13-ready, removes the boot DeprecationWarning, adopted from @ssfeather's PR #22); dynamic 3–8 multi-keyframe UI (adopted from @youngbee12's PR #20, ported clean with the integrity feature preserved + a JS ReferenceError fixed). Folds in v3.0.11's handshake fix + runtime fingerprint.)** → **v3.0.13 (character LoRA fixes, #5 @claude3d: a multi-word/spaced character filename no longer mislabels as style-only — the id regex gated out spaces before the sidecar was read; and the Character tab no longer silently falls back to plain T2V — a UI desync left the avatar's selection ring lit after `character_id` was cleared. Plus an `enhancePrompt` element-id fix. Cherry-picked to prod `ce03139`, release `814dc2d`.)** → **v3.1.0 (Ideogram 4 — open-weight 9.3B text-rendering image model + a visual text-placement canvas that places exact text via normalized-bbox captions. mflux 0.18 `mflux-generate-ideogram4`; gated `ideogram-ai/ideogram-4-fp8` ~26 GB, needs a HF Read token + license. Fixed the gated-download 401 that would have hit EVERY user — the panel now exports its configured token to subprocess env via `_sync_hf_token_to_env` so a stale `hf auth login` cache can't shadow it; proven clean-room. Validated end-to-end: 8-text-element field-guide poster rendered clean, every label placed per its bbox.)** All validated end-to-end on the dev panel (deep-verify corrupt-detect + repair, /loras, byte-identical upload, multi-keyframe render, FFLF regression). See §4 for the full version history. The May-17 Codex C+ UI restructure (capability tiers, Q4 surface, Character as 5th mode pill, accel kill, HQ-speed move) and the Train-tab / LoRA-chrome work that followed are all baseline now, folded into v3.0.x. There is no `v2.0.6` tag.
+**Public release: `v3.1.1`.** The entire v3.0 line shipped — v3.0.0 (Characters / Voice / Image Studio / A2V, May 23) → v3.0.1 (FFLF crash fix) → v3.0.2 (Boost/Turbo accel restored after a 2-month silent regression) → v3.0.3 (HiDream hidden, #15) → v3.0.4 (CivitAI SSL) → v3.0.5 (A2V kwarg signature shim, #5) → v3.0.6 (deep-review hardening) → v3.0.7 (GPU-race fix + /status version surfacing) → **v3.0.8 (ltx-2-mlx v0.14.8 catch-up — codec-only patches, I2V "mosaic"/Metal-watchdog fix #17, ASCII version-skew handshake fix)** → **v3.0.9 (custom I2V Width×height inputs restored for power users; Train-tab dev-transformer Download "unknown install key" fix — form-encoding, reported by @cocktailpeanut)** → **v3.0.10 (model-integrity self-heal — boot scan + `/status.model_integrity` + a one-click Repair banner for corrupt/partial weights, the leading *non-Metal* "mosaic" garbage-decode cause; safetensors header+size check)** → **v3.0.11 (latent helper-handshake hang fixed: `_read_until` mixed `select()` on the raw fd with a buffered `readline()`, so any event the helper emitted *right before* `ready` — a version-skew line, the new runtime fingerprint — got stranded in the TextIOWrapper buffer and the panel hung 120 s → "helper failed to start: None". This is the true root cause behind the mislabeled "⚠️-emoji" handshake break. Now reads the raw fd via `os.read()` into a carry buffer and drains every complete line before re-`select()`-ing. PLUS: every render log self-documents its runtime — mlx/mlx-metal version + Apple chip + macOS — surfaced in `/status`, the `helper ready ·` line, and a standalone `runtime |` line, the exact data needed to triangulate the remaining MLX-numerical "mosaic")** → **v3.0.12 (the REAL mosaic fix + 3 more. The mosaic is NOT a code bug or the missing-upscaler theory (both disproved by local repro — the bare 6-file Q4 set renders byte-identical-clean on M4 Max); it's stale/corrupt weight *content* — right size, wrong bytes — that v3.0.10's header+size check can't see (confirmed: ronyeoh/#18 + claude3d/#5 fixed it only by a fresh full re-download). Added **deep checksum verify vs upstream**: Settings → Model files → "Verify model files (checksum)" / `/models/verify-deep` hashes every weight + compares to HuggingFace's published SHA-256 (proven to match local), mismatches feed the existing one-click Repair re-download. Validated: flipped 16 bytes mid-file → header+size passed, deep-verify caught it. ALSO in v3.0.12: character-LoRA-shows-as-"style-only" fix (#5 — `list_user_loras` recovers trigger+kind from the `_v2` filename when the sidecar is missing); `cgi`→`email` multipart migration (Python-3.13-ready, removes the boot DeprecationWarning, adopted from @ssfeather's PR #22); dynamic 3–8 multi-keyframe UI (adopted from @youngbee12's PR #20, ported clean with the integrity feature preserved + a JS ReferenceError fixed). Folds in v3.0.11's handshake fix + runtime fingerprint.)** → **v3.0.13 (character LoRA fixes, #5 @claude3d: a multi-word/spaced character filename no longer mislabels as style-only — the id regex gated out spaces before the sidecar was read; and the Character tab no longer silently falls back to plain T2V — a UI desync left the avatar's selection ring lit after `character_id` was cleared. Plus an `enhancePrompt` element-id fix. Cherry-picked to prod `ce03139`, release `814dc2d`.)** → **v3.1.0 (Ideogram 4 — open-weight 9.3B text-rendering image model + a visual text-placement canvas that places exact text via normalized-bbox captions. mflux 0.18 `mflux-generate-ideogram4`; gated `ideogram-ai/ideogram-4-fp8` ~26 GB, needs a HF Read token + license. Fixed the gated-download 401 that would have hit EVERY user — the panel now exports its configured token to subprocess env via `_sync_hf_token_to_env` so a stale `hf auth login` cache can't shadow it; proven clean-room. Validated end-to-end: 8-text-element field-guide poster rendered clean, every label placed per its bbox.)** → **v3.1.1 (Ideogram output-card buttons hotfix, reported by Mr Bizarro: an Ideogram image's prompt is a caption JSON, which broke every output surface that fed it into a plain box / inline onclick — the Recent-list Animate button was worked-but-dead because apostrophes/&/< in the caption terminated the single-quoted onclick. Display-layer fix: `_displayPromptFor` derives `high_level_description`, `escapeHtml` the onclick args, friendly `_imgEngineLabel`, and `loadParams` restores an Ideogram image into the visual canvas instead of dumping JSON. `params.prompt` stays the caption JSON; renders unaffected. Validated live.)** All validated end-to-end on the dev panel (deep-verify corrupt-detect + repair, /loras, byte-identical upload, multi-keyframe render, FFLF regression). See §4 for the full version history. The May-17 Codex C+ UI restructure (capability tiers, Q4 surface, Character as 5th mode pill, accel kill, HQ-speed move) and the Train-tab / LoRA-chrome work that followed are all baseline now, folded into v3.0.x. There is no `v2.0.6` tag.
Current `dev` head: see `git log -1` for the live SHA. `dev` tracks `beta/main` (private repo — see §1).
diff --git a/mlx_ltx_panel.py b/mlx_ltx_panel.py
index eddfb0a..f3705b1 100644
--- a/mlx_ltx_panel.py
+++ b/mlx_ltx_panel.py
@@ -26643,8 +26643,8 @@ async function poll() {
hl.innerHTML = `<li class="empty-state"><span></span><span>${empty}</span><span></span><span></span></li>`;
}
else hl.innerHTML = filtered.slice(0, 20).map(j => {
- const titleText = escapeHtml(j.params.label || snippet(j.params.prompt, 60));
- const titleAttr = escapeHtml(j.params.prompt || '');
+ const titleText = escapeHtml(j.params.label || snippet(_displayPromptFor(j.params.prompt), 60));
+ const titleAttr = escapeHtml(_displayPromptFor(j.params.prompt));
let titleHtml;
if (j.status === 'failed' && j.error) {
titleHtml = `${titleText} ` +
@@ -26658,7 +26658,7 @@ async function poll() {
if (isPhoto && j.status === 'done' && j.output_path) {
const cands = (j.params.candidate_paths && j.params.candidate_paths.length)
? j.params.candidate_paths.length : 1;
- const engineLabel = escapeHtml(j.params.engine || 'image');
+ const engineLabel = escapeHtml(_imgEngineLabel(j.params.engine));
// Reuse the server-built mtime-versioned URL when available
// (currentOutputs has each entry's `&v=<mtime>` cache-bust),
// falling back to a plain URL otherwise. Each job's output_path
@@ -26671,9 +26671,12 @@ async function poll() {
const thumbSrc = _thumbUrl(matchedOutput
? matchedOutput.url
: `/image?path=${encodeURIComponent(j.output_path)}`, 200);
- const animateArgs = JSON.stringify({
- path: j.output_path, prompt: j.params.prompt || ''
- }).replace(/"/g, '&quot;');
+ // escapeHtml (not a bare " -> &quot; replace) so apostrophes/&/< in an
+ // Ideogram caption can't terminate the single-quoted onclick attribute,
+ // and pre-fill the readable description rather than the raw caption JSON.
+ const animateArgs = escapeHtml(JSON.stringify({
+ path: j.output_path, prompt: _displayPromptFor(j.params.prompt)
+ }));
return `
<li class="${j.status}" data-photo="1">
<span class="badge">photo</span>
@@ -26995,6 +26998,36 @@ async function remakeInQuality(payload) {
}
}
+// Ideogram 4 stores params.prompt as a structured caption JSON string (root
+// keys high_level_description / style_description / compositional_deconstruction)
+// because mflux reads it from a --prompt-file verbatim. Every UI surface that
+// shows a prompt or pre-fills it into a PLAIN box (Animate→i2v, titles) wants a
+// readable string, never the raw JSON. Parse it and prefer high_level_description;
+// any other engine's plain-text prompt just round-trips unchanged.
+function _parseIdeoCaption(s) {
+ if (typeof s !== 'string') return null;
+ const t = s.trim();
+ if (t.charAt(0) !== '{') return null;
+ try {
+ const o = JSON.parse(t);
+ if (o && typeof o === 'object' && typeof o.high_level_description === 'string') return o;
+ } catch (_) {}
+ return null;
+}
+function _displayPromptFor(prompt) {
+ const cap = _parseIdeoCaption(prompt);
+ return cap ? cap.high_level_description : (prompt || '');
+}
+// Friendly engine label from the internal token stamped on image jobs
+// (params.engine = "mflux/ideogram" etc.). Falls back to the raw token.
+function _imgEngineLabel(token) {
+ const map = {
+ 'mflux/ideogram': 'Ideogram 4', 'mflux/hidream': 'HiDream',
+ 'mflux/qwen_edit': 'Qwen-Edit', 'mflux/flux2': 'FLUX.2', 'mflux': 'mflux'
+ };
+ return map[token] || (token || 'image');
+}
+
function animateFromPhoto(payload) {
if (!payload || !payload.path) return;
// Switch to i2v mode (pill + form fields). setMode('i2v') hides the
@@ -27451,7 +27484,7 @@ async function animateActive() {
// Image sidecars use schema "phosphene/library/image@1" with
// a top-level `prompt`; video sidecars nest it under `params`.
// Cover both shapes so the UI works regardless of source.
- prompt = (data && (data.prompt || (data.params && data.params.prompt))) || '';
+ prompt = _displayPromptFor((data && (data.prompt || (data.params && data.params.prompt))) || '');
}
} catch (e) {}
}
@@ -27531,6 +27564,29 @@ async function loadParams() {
if (!r.ok) return;
const data = await r.json();
const p = data.params;
+ // Image-Studio sidecars (Ideogram 4 etc.) carry a TOP-LEVEL prompt that is a
+ // structured caption JSON, not the video params shape below — the p.mode
+ // dispatch would dump JSON into the i2v prompt box (or throw when p is
+ // undefined). Detect an Ideogram caption and restore it into Image Studio +
+ // its visual canvas instead of the video form.
+ const _ideoSrc = _parseIdeoCaption((data && (data.prompt || (p && p.prompt))) || '');
+ if (_ideoSrc) {
+ const wf = document.querySelector('[data-workflow="studio"]');
+ if (wf) wf.click(); // switch to Images
+ const eng = document.getElementById('imgStudioEngine');
+ if (eng) {
+ eng.value = 'ideogram4_inline';
+ if (typeof ideoSyncVisibility === 'function') ideoSyncVisibility(); // reveal the canvas
+ }
+ const pe = document.getElementById('imgStudioPrompt');
+ if (pe) pe.value = _ideoSrc.high_level_description || '';
+ const ta = document.getElementById('ideoRawJson');
+ if (ta) {
+ ta.value = JSON.stringify(_ideoSrc, null, 2);
+ if (typeof ideoApplyRaw === 'function') { try { ideoApplyRaw(); } catch (_) {} } // rehydrate boxes
+ }
+ return;
+ }
// If this clip came from the Characters tab, restore the Characters
// compose state instead of dumping the user into Manual. The sidecar
// carries the source flag + the original compose chips verbatim