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.
Python ai-filmmakingai-videoai-video-generatorapple-siliconhailuoimage-to-videolip-synclocal-ailora-trainingltx-2ltx-2-5ltx-videomacosminimax-h3mlxmusic-generationoffline-aipinokiotext-to-videovideo-generation
release(v3.8.2): the codec patch never ran, and nothing noticed
mrbizarroc394ce748270
diff --git a/README.md b/README.mdindex 6a40d06..9f85f58 100644--- a/README.md+++ b/README.md@@ -32,7 +32,7 @@ Key differences from the standard A2V path:</p>-> **Current release: v3.8.1.** Hotfix: Update and Install could abort at the video-engine pin with `error: Your local changes to the following files would be overwritten by checkout: … video_vae.py`, and retrying never cleared it. Both paths now discard local edits in the app-managed vendored checkout before moving the pin, then re-apply the codec patch. v3.8.0 brought Storyboard — describe a film in a sentence, get a shot list you can edit before anything renders — plus the fix for the install failure that had been breaking every fresh install and every Update since hatchling 1.32.0 shipped. Full notes on the [releases page](https://github.com/mrbizarro/phosphene/releases).+> **Current release: v3.8.2 — update to it if you are on v3.8.1.** On v3.8.1 the Update run could end several steps early without saying so, and the step it skipped was the one that patches the video encoder. The result had no visible symptom: renders completed normally but were encoded 4:2:0 `yuv420p`, which shows up as blocky compression on faces and skin. v3.8.2 runs that patch immediately after the engine reinstall, removes what was ending the run early, and makes the patch verify its own work and fail loudly instead of quietly. v3.8.1 fixed an Update that could abort at the video-engine pin (`your local changes … would be overwritten by checkout: … video_vae.py`) and could never be retried; v3.8.0 brought Storyboard — describe a film in a sentence, get a shot list you can edit before anything renders — plus the fix for the install failure that had been breaking every fresh install since hatchling 1.32.0 shipped. Full notes on the [releases page](https://github.com/mrbizarro/phosphene/releases).## Overviewdiff --git a/VERSION b/VERSIONindex f280719..a08ffae 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-3.8.1+3.8.2diff --git a/docs/STATE.md b/docs/STATE.mdindex 06e571b..72ca9e0 100644--- a/docs/STATE.md+++ b/docs/STATE.md@@ -1,6 +1,6 @@# Phosphene — project state, history, open work-**Public release: `v3.8.1`** (see the v3.8.1 + v3.8.0 CHANGELOG entries below; the narrative in this paragraph stops at v3.1.1 and is kept as history). 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.+**Public release: `v3.8.2`** (see the v3.8.2 + v3.8.1 + v3.8.0 CHANGELOG entries below; the narrative in this paragraph stops at v3.1.1 and is kept as history). 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.> **🌍 2026-08-12 — THE GEOIP KILL (analytics schema-v2 Phase 1): every event now tells PostHog not to locate it.** The panel has never sent a location field. It didn't have to: PostHog derives country, city, subdivision, timezone and the city's coordinates from the connecting IP by **default**, and the previous posture — in `_analytics_post`'s own docstring — was *"we neither add to nor suppress that."* Now suppressed, on every event, via `_ANALYTICS_RECEIVER_DIRECTIVES` spread **last** into the properties block so no call site can override it.>@@ -742,6 +742,40 @@ Reconciled against the deep review (2026-05-31). Everything that was a recent fi> handoff, not a user changelog. v3.8.0 is written up here as well because a release that> changes the install path deserves a line somebody can find with grep.+#### v3.8.2 — the codec patch never ran, and nothing noticed+- **Symptom: none.** That is what made it dangerous. After updating to v3.8.1 the app reported+ a finished update, the engine pin had moved, the version handshake was green — and+ `video_vae.py` in site-packages was still upstream. Every render was encoded 4:2:0+ `yuv420p`: no error, no warning, just blocky compression on faces and skin, which is the one+ thing Phosphene patches the encoder to avoid.+- **Cause 1 — the run truncated.** Pinokio's own session log for a real v3.1.1 → v3.8.1 update+ records steps 0–7 of 18 and then nothing. The last step executed was `certifi`, a plain+ `pip install --upgrade`, whose output carried pip's *"ERROR: pip's dependency resolver does+ not currently take into account all the packages that are installed"* block — a permanent+ side effect of `mlx-vlm` being installed `--no-deps`, which makes pip's post-install+ consistency pass complain after any step that actually changes something. pip still exits 0+ (measured); the run ended anyway, and every step after it was skipped in silence. Confirmed+ on that install: no `smolagents`, no `mflux`, no `mlx-teacache` — those steps had not run in+ a long time either.+- **Cause 2 — the patch sat too late.** It was eleven steps down, behind litellm, smolagents,+ mflux and the IC-LoRA fetches: all optional, all able to end the run before the one step+ that is not optional.+- **Cause 3 — the patch script guessed.** `_find` walked a hardcoded list of relative paths+ resolved against the working directory, so running it by hand from anywhere but the app root+ reported `MISSING — target file not found` on an install whose file was sitting right there.+- **Fixes.** The codec patch now runs *immediately* after the uv reinstall that replaces+ site-packages, before any optional step exists to truncate the run — and a gate enforces that+ ordering. Every remaining plain-pip step in `update.js` is now a uv step (same installs, same+ broken metadata, zero resolver-ERROR output — measured side by side); `install.js` was+ already all-uv, which is why fresh installs patched correctly. `patch_ltx_codec.py` resolves+ its target through the running interpreter's own import machinery — the file the panel will+ actually import, editable install or not — with the path list kept only as a fallback,+ anchored on the script's directory rather than the CWD. And after patching it re-reads the+ resolved file, asserts both markers, and exits non-zero behind a banner if they are absent.+- **If you rendered anything on v3.8.1, re-render it after updating.** Those clips are 4:2:0.+ Nothing else is affected: no re-download, no weight change, no pin change (still `871694d` /+ `0.14.19+ltx25.1`).+#### v3.8.1 — the Update that could not be retried- **Update / Install aborted at the video-engine pin, permanently.** Both paths move thevendored `ltx-2-mlx` checkout with `git checkout <sha>`, and for an affected install thatdiff --git a/patch_ltx_codec.py b/patch_ltx_codec.pyindex 3cce8ec..07523d3 100644--- a/patch_ltx_codec.py+++ b/patch_ltx_codec.py@@ -53,6 +53,20 @@ from __future__ import annotationsimport sysfrom pathlib import Path+# 3.8.2: the fallback list. It is now genuinely a FALLBACK — see _find.+#+# The old code used ONLY this list, resolved against the process CWD, and that+# was two bugs in one. It guessed at a layout (hardcoded `python3.11`, hardcoded+# venv directory names) instead of asking the interpreter that will actually do+# the importing, and because the paths were relative to CWD the same install+# reported "MISSING — target file not found" when the script was run from+# anywhere but the app root — which is exactly what happened when the owner ran+# it by hand on a machine whose file was sitting right there.+#+# Anchored on the script's own directory now, not the CWD, so even the fallback+# works from any working directory.+_HERE = Path(__file__).resolve().parent+VENV_ROOTS = ["ltx-2-mlx/env/lib/python3.11/site-packages", # Pinokio"ltx-2-mlx/.venv/lib/python3.11/site-packages", # manual@@ -60,13 +74,63 @@ VENV_ROOTS = ["ltx-2-mlx/packages/ltx-pipelines-mlx/src", # editable (ltx-pipelines)]+# Which packages own which sub-paths, for the import-based resolution below.+_PKG_OF = {+ "ltx_core_mlx": "ltx_core_mlx",+ "ltx_pipelines_mlx": "ltx_pipelines_mlx",+}+++def _find_by_import(rel: str) -> Path | None:+ """Resolve `rel` through the RUNNING interpreter's own import machinery.++ This is the authoritative answer to "which file will the panel import?",+ which is the only file worth patching. Run under the venv's python+ (install.js / update.js both invoke `ltx-2-mlx/env/bin/python3.11`) it+ lands on that venv's copy — site-packages when the packages are installed+ normally, the vendored source when they are installed editable. Either way+ it is the file the runtime loads, with no assumptions about directory+ names, python minor version, or working directory.++ `find_spec` on a TOP-LEVEL package does not execute it, so this stays+ cheap and cannot be broken by an import-time failure deeper in the tree.+ """+ import importlib.util++ top = rel.split("/", 1)[0]+ pkg = _PKG_OF.get(top)+ if pkg is None:+ return None+ try:+ spec = importlib.util.find_spec(pkg)+ except Exception:+ return None+ if spec is None or not spec.origin:+ return None+ # spec.origin is <pkg>/__init__.py; its parent is the package root, which+ # is what `rel` is relative to (minus the leading package name).+ root = Path(spec.origin).resolve().parent.parent+ p = root / rel+ return p if p.exists() else None+def _find(rel: str) -> Path | None:- """Resolve a package-relative path under the first venv root that contains it."""+ """Resolve a package-relative path: ask the interpreter first, then guess.++ Order matters. The import-based answer is the file the runtime actually+ loads; the path list is a last resort for the case where the packages are+ not importable at all (a half-finished install), kept so the script still+ has something to say instead of silently doing nothing.+ """+ p = _find_by_import(rel)+ if p is not None:+ print(f" [resolve] via import: {p}")+ return pfor root in VENV_ROOTS:- p = Path(root) / rel- if p.exists():- return p+ cand = _HERE / root / rel+ if cand.exists():+ print(f" [resolve] via path fallback: {cand}")+ return candreturn None@@ -175,6 +239,21 @@ def apply_patch(target: Path, old: str, new: str, marker: str, label: str,return OUTCOME_APPLIED+def _shout(*lines: str) -> None:+ """Print a failure the Pinokio console cannot be skim-read past.++ The old single-line stderr message scrolled off inside a wall of pip+ output. A patch that did not apply means every clip is encoded 4:2:0;+ that deserves a banner.+ """+ bar = "!" * 72+ print(f"\n{bar}", file=sys.stderr)+ print("!! PHOSPHENE: CODEC PATCH FAILURE", file=sys.stderr)+ for line in lines:+ print(f"!! {line}", file=sys.stderr)+ print(f"{bar}\n", file=sys.stderr)++def main() -> int:print("Applying LTX23MLX codec patch (ltx-2-mlx 871694d / 0.14.19+ltx25.1 — only the codec edit remains):")@@ -193,21 +272,43 @@ def main() -> int:)if outcome in (OUTCOME_MISSING, OUTCOME_DRIFT):- print(- f"\nERROR: codec patch failed to apply ({outcome}).\n"- "This exits non-zero so install.js / update.js fail loud rather than\n"- "silently ship a 4:2:0 yuv420p install (visible block artifacts on\n"- "faces/skin). If a pin-bump restructured decode_and_stream's ffmpeg\n"- "line, update PATCH_CODEC_OLD in patch_ltx_codec.py to match the new\n"- "upstream text, then re-run.",- file=sys.stderr,+ _shout(+ f"codec patch failed to apply ({outcome}).",+ "Without it every render is encoded 4:2:0 yuv420p — visible blocky",+ "artifacts on faces and skin. This exits non-zero so install.js /",+ "update.js fail loud instead of shipping it silently.",+ "If a pin-bump restructured decode_and_stream's ffmpeg line, update",+ "PATCH_CODEC_OLD in patch_ltx_codec.py to match, then re-run.",)return 2+ # 3.8.2: VERIFY, do not trust the outcome code.+ #+ # v3.8.1 shipped an entire fleet of unpatched installs while every log line+ # anyone looked at said the update had finished. The patch step never ran at+ # all (the Pinokio run truncated several steps earlier), and nothing+ # downstream ever asked the only question that matters: does the file the+ # runtime imports actually carry the patch? Ask it here, out of the same+ # interpreter that resolved the target, and fail loud when the answer is no.+ verify = _find("ltx_core_mlx/model/video_vae/video_vae.py")+ if verify is None or not verify.exists():+ _shout("codec patch verification could not find the target after patching.")+ return 3+ vtext = verify.read_text()+ missing = [m for m in ("LTX_OUTPUT_PIX_FMT", "+faststart") if m not in vtext]+ if missing:+ _shout(+ f"codec patch VERIFICATION FAILED — missing {', '.join(missing)}",+ f"in {verify}",+ "The runtime would encode 4:2:0 yuv420p (blocky faces). Not shipping",+ "this silently.",+ )+ return 4+if outcome == OUTCOME_APPLIED:- print("Done — codec patch applied.")+ print(f"Done — codec patch applied and verified in {verify}")else:- print("Codec patch already applied (no change).")+ print(f"Codec patch already applied and verified in {verify}")return 0diff --git a/update.js b/update.jsindex 5d1caf8..44e079c 100644--- a/update.js+++ b/update.js@@ -140,7 +140,22 @@ module.exports = {{method: "shell.run",params: {- message: "./ltx-2-mlx/env/bin/pip install --force-reinstall --no-deps 'mlx==0.31.1' 'mlx-lm==0.31.1' 'mlx-metal==0.31.1'"+ // 3.8.2: uv, not the venv's pip. Every plain-pip step in this file is+ // now a uv step, for one reason: mlx-vlm is deliberately installed+ // --no-deps, so its metadata is permanently unsatisfiable, and pip+ // runs a dependency-consistency pass after ANY install that actually+ // changes something. That pass prints+ // ERROR: pip's dependency resolver does not currently take into+ // account all the packages that are installed...+ // even when the install succeeded and pip exits 0 (measured). The+ // mflux step below already switched to uv for exactly this noise —+ // "this is what made cocktailpeanut's update look broken even though+ // mflux installed fine". On the owner's v3.8.1 run it was worse than+ // cosmetic: the Pinokio run ENDED at the certifi step that emitted+ // that block (session log: last `step: 7` of 18) and every remaining+ // step was skipped in silence. uv does the same installs and emits+ // none of it. One lane, one failure mode.+ message: "uv pip install --python ./ltx-2-mlx/env/bin/python --reinstall --no-deps 'mlx==0.31.1' 'mlx-lm==0.31.1' 'mlx-metal==0.31.1'"}},// Re-install ltx-core-mlx + ltx-pipelines-mlx + ltx-trainer-mlx from@@ -191,6 +206,33 @@ module.exports = {message: "uv pip install --python env/bin/python --reinstall --no-deps --build-constraints ../pip-build-constraints.txt ./packages/ltx-core-mlx ./packages/ltx-pipelines-mlx ./packages/ltx-trainer"}},+ // ---- Re-apply the codec patch — HERE, not at the bottom (3.8.2) --------+ //+ // This step used to sit eleven steps down, after litellm / smolagents /+ // mflux / the IC-LoRA fetches. On the owner's own machine the v3.8.1 run+ // executed steps 0-7 and STOPPED — Pinokio's own session log records+ // `step: 7` as the last one, the `certifi` step, whose plain-pip output+ // carried pip's "ERROR: pip's dependency resolver does not currently take+ // into account..." block (a side effect of mlx-vlm being installed+ // --no-deps). Everything after it, including this patch, silently never+ // ran, and the update still presented as finished. Corroborated on that+ // install: no smolagents, no mflux, no mlx-teacache, and an UNPATCHED+ // video_vae.py in site-packages — i.e. every render encoded 4:2:0.+ //+ // So: the patch runs IMMEDIATELY after the reinstall that replaces+ // site-packages, before a single optional package step can end the run.+ // Ordering is the fix; the pip->uv conversion below removes the trigger;+ // and patch_ltx_codec.py now verifies its own work and exits non-zero+ // with a banner if the file the runtime imports lacks the patch. Three+ // independent lines of defence, because the failure is invisible: an+ // unpatched install renders perfectly happily, just with blocky faces.+ //+ // It MUST stay after the uv reinstall above — that step overwrites+ // site-packages, so a patch applied before it would be thrown away.+ {+ method: "shell.run",+ params: { message: "./ltx-2-mlx/env/bin/python3.11 patch_ltx_codec.py" }+ },// 3.0: pyyaml + pydantic + tqdm + rich are ltx-trainer-mlx's// transitive deps. We just installed ltx-trainer with --no-deps so// those weren't resolved. Install them explicitly (idempotent — pip@@ -199,7 +241,7 @@ module.exports = {method: "shell.run",params: {path: "ltx-2-mlx",- message: "./env/bin/pip install 'pyyaml>=6.0' 'pydantic>=2.0' 'tqdm>=4.65' 'rich>=13.0'"+ message: "uv pip install --python env/bin/python 'pyyaml>=6.0' 'pydantic>=2.0' 'tqdm>=4.65' 'rich>=13.0'"}},// 3.0: auto-caption (Gemma 3 12B via mlx-vlm) needs mlx-vlm 0.4.4.@@ -211,7 +253,7 @@ module.exports = {method: "shell.run",params: {path: "ltx-2-mlx",- message: "./env/bin/pip install --no-deps 'mlx-vlm==0.4.4'"+ message: "uv pip install --python env/bin/python --no-deps 'mlx-vlm==0.4.4'"}},// Y1.022: hf_transfer is HuggingFace's Rust accelerator — 5-10× faster@@ -224,7 +266,7 @@ module.exports = {{method: "shell.run",params: {- message: "./ltx-2-mlx/env/bin/pip install --upgrade 'hf_transfer>=0.1.6'"+ message: "uv pip install --python ./ltx-2-mlx/env/bin/python --upgrade 'hf_transfer>=0.1.6'"}},// 2026-05-31 review fix (E3): ensure certifi is present on every update.@@ -234,7 +276,7 @@ module.exports = {{method: "shell.run",params: {- message: "./ltx-2-mlx/env/bin/pip install --upgrade certifi"+ message: "uv pip install --python ./ltx-2-mlx/env/bin/python --upgrade certifi"}},// litellm: replaces the stdlib urllib chat client in agent/engine.py@@ -247,7 +289,7 @@ module.exports = {{method: "shell.run",params: {- message: "./ltx-2-mlx/env/bin/pip install --upgrade 'litellm>=1.83.14'"+ message: "uv pip install --python ./ltx-2-mlx/env/bin/python --upgrade 'litellm>=1.83.14'"}},// smolagents: powers the optional CodeAgent runtime in@@ -320,16 +362,13 @@ module.exports = {].join("\n")}},- // Re-apply patches. Codec patch is required; I2V OOM patch is a no-op- // on dcd639e (older I2V structure) and reports drift gracefully now.- // mflux FBCache patch is idempotent (skips when its marker is already- // present); installs the cache path the first time and stays put.- // Pin to the venv's python3.11 to match install.js — `python3` on- // Pinokio hosts isn't guaranteed to be 3.11 (or even present on PATH).- {- method: "shell.run",- params: { message: "./ltx-2-mlx/env/bin/python3.11 patch_ltx_codec.py" }- },+ // The mflux FBCache patch stays HERE — it has to, because it patches+ // mflux, which is installed by the step directly above. (The codec patch+ // that used to sit alongside it moved up to run right after the ltx+ // package reinstall; see the 3.8.2 note there for why.) Idempotent —+ // skips when its marker is already present. Pin to the venv's python3.11+ // to match install.js: `python3` on Pinokio hosts isn't guaranteed to be+ // 3.11, or even present on PATH.{method: "shell.run",params: { message: "./ltx-2-mlx/env/bin/python3.11 patch_mflux_fbcache.py" }