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(v4.17.5): renders that recover when macOS stops the GPU
mrbizarro2a84f89a08b0
diff --git a/README.md b/README.mdindex 0482832..68dc810 100644--- a/README.md+++ b/README.md@@ -19,7 +19,7 @@</p>-> **Current release: v4.17.4.** **Fewer renders that fail before they start.** A render no longer fails on a step count the fast model cannot use (it is set to 8 for you, with a note). If the Lip-sync voice separator is missing after an update, Phosphene installs it by itself and queued Lip-sync clips wait for it instead of failing. If the render engine did not finish installing, a bar at the top offers Repair engine, which fixes it in a few minutes without re-downloading any model. A missing picture, audio or LoRA file now offers Open in the form instead of a Retry that fails the same way. 4.17.3: Lip-sync follows the singing voice, estimates no longer borrow a bigger Mac's numbers, and errors say what to do. 4.17.0 was the big one: estimates for your Mac, faces kept in portrait and phone photos, Undo on Stop/Clear/Hide, Lip-sync as a Video mode, and an Editor with Sync to song, Match colour, slip and roll edits, Replace and versioned renders. Press Update in Pinokio, then restart. Full notes on the [releases page](https://github.com/mrbizarro/Phosphene/releases).+> **Current release: v4.17.5.** **Renders that recover when macOS stops the GPU.** On M1 and M2 Macs, when macOS stops a render because one GPU step ran too long, Phosphene now renders it again straight away in smaller GPU steps and remembers that size, instead of failing the same way every time; a size that still cannot finish is paused with a Retry smaller button. A job with no picture, clip or song is refused before it waits in the queue, a video LoRA picked for a song is named and refused, and the voice separator download resumes a broken connection. A failed install now says why (network, disk space, the package installer), and Update now on the version you already run says so instead of asking for a restart. 4.17.4: no more failures from a stray step count, the voice separator installs itself, and Repair engine fixes an unfinished install. 4.17.0 was the big one: estimates for your Mac, faces kept in portrait and phone photos, Undo on Stop/Clear/Hide, Lip-sync as a Video mode, and an Editor with Sync to song, Match colour, slip and roll edits, Replace and versioned renders. Press Update in Pinokio, then restart. Full notes on the [releases page](https://github.com/mrbizarro/Phosphene/releases).## Overviewdiff --git a/VERSION b/VERSIONindex 6680030..7693c4a 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-4.17.4+4.17.5diff --git a/conftest.py b/conftest.pyindex 9d0953e..621762d 100644--- a/conftest.py+++ b/conftest.py@@ -39,3 +39,129 @@ for _var, _sub in (("LTX_STATE_DIR", "state"),# version check; both were already set per-file, inconsistently.os.environ.setdefault("PHOSPHENE_ANALYTICS_DISABLED", "1")os.environ.setdefault("PHOSPHENE_DISABLE_VERSION_CHECK", "1")+++# ---- HERMETIC BY DEFAULT (4.17.5) -------------------------------------------+# A full run used to leave an 810 MB Hugging Face download in the system temp+# dir EVERY time (149 phos-hf-* folders, 14 GB, on the maintainer's Mac on+# 2026-10-03, with / at 2-3 GB free): test_image_partial_download pointed+# HF_HOME at a fresh temp dir for the whole process, and a later image-engine+# test resolved the Qwen-Edit Lightning LoRA through hf_hub_download - a real+# network fetch into that dir, never removed. So, for every pytest run:+# * every tempfile.mkdtemp / TemporaryDirectory (and every subprocess's+# TMPDIR) lands inside SANDBOX, and SANDBOX is removed when the run ends;+# * Hugging Face is offline (HF_HUB_OFFLINE=1) and hf_hub_download /+# snapshot_download RAISE inside a test, unless the test is marked+# @pytest.mark.hf_network on purpose - a test that downloads must say so.+# The release gate's unittest sweep does not load this file; scripts/+# release_gates.sh sets the same two environment rules for it.+import shutil # noqa: E402++import pytest # noqa: E402++_SANDBOX_TMP = SANDBOX / "tmp"+_SANDBOX_TMP.mkdir(parents=True, exist_ok=True)+tempfile.tempdir = str(_SANDBOX_TMP)+os.environ["TMPDIR"] = str(_SANDBOX_TMP) + "/"+os.environ.setdefault("HF_HUB_OFFLINE", "1")+os.environ.setdefault("HF_HUB_DISABLE_TELEMETRY", "1")+++class HfDownloadBlocked(RuntimeError):+ """A test reached a real Hugging Face download."""+++def _blocked(name: str):+ def _refuse(*args, **kwargs):+ what = kwargs.get("repo_id") or (args[0] if args else "?")+ # Product code often catches a failed fetch and carries on, which+ # would hide the attempt: PHOS_HF_GUARD_LOG=<file> lists every one.+ log = os.environ.get("PHOS_HF_GUARD_LOG")+ if log:+ with open(log, "a", encoding="utf-8") as fh:+ fh.write(f"{os.environ.get('PYTEST_CURRENT_TEST', '?')} {name} {what}\n")+ raise HfDownloadBlocked(+ f"a test called huggingface_hub.{name}({what!r}) - a real download. "+ f"Mock it, or mark the test @pytest.mark.hf_network if it must.")+ return _refuse+++def pytest_configure(config):+ config.addinivalue_line(+ "markers", "hf_network: this test may really download from Hugging Face")+ config.addinivalue_line(+ "markers", "network: this test may open connections off this machine")++[email protected](autouse=True)+def _no_hf_downloads(request, monkeypatch):+ if request.node.get_closest_marker("hf_network"):+ yield+ return+ try:+ import huggingface_hub+ import huggingface_hub.file_download as _fd+ import huggingface_hub._snapshot_download as _sd+ except ImportError:+ yield+ return+ for mod, name in ((huggingface_hub, "hf_hub_download"), (_fd, "hf_hub_download"),+ (huggingface_hub, "snapshot_download"), (_sd, "snapshot_download")):+ monkeypatch.setattr(mod, name, _blocked(name), raising=False)+ yield+++# ...and no test reaches the internet at all unless marked @pytest.mark.network:+# a connect() to anything but loopback raises. Local test servers, git over+# file paths and unix sockets are untouched.+import socket as _socket # noqa: E402++_REAL_CONNECT = _socket.socket.connect+_REAL_CONNECT_EX = _socket.socket.connect_ex+++class NetworkBlocked(OSError):+ """A test tried to open a connection off this machine."""+++def _is_local(address) -> bool:+ if not isinstance(address, tuple) or not address:+ return True # AF_UNIX path, etc.+ host = str(address[0])+ return host in ("localhost", "::1", "0.0.0.0") or host.startswith("127.")+++def _guarded(real):+ def connect(self, address, *a, **k):+ if not _is_local(address):+ log = os.environ.get("PHOS_HF_GUARD_LOG")+ if log:+ import threading+ import traceback+ with open(log, "a", encoding="utf-8") as fh:+ fh.write(f"{os.environ.get('PYTEST_CURRENT_TEST', '?')} "+ f"connect {address[0]} "+ f"thread={threading.current_thread().name}\n")+ if os.environ.get("PHOS_HF_GUARD_STACK"):+ fh.write("".join(traceback.format_stack(limit=30)))+ raise NetworkBlocked(+ f"a test tried to connect to {address[0]} - mock the network, or "+ f"mark the test @pytest.mark.network if it must")+ return real(self, address, *a, **k)+ return connect++[email protected](autouse=True)+def _no_network(request, monkeypatch):+ if request.node.get_closest_marker("network"):+ yield+ return+ monkeypatch.setattr(_socket.socket, "connect", _guarded(_REAL_CONNECT))+ monkeypatch.setattr(_socket.socket, "connect_ex", _guarded(_REAL_CONNECT_EX))+ yield+++def pytest_sessionfinish(session, exitstatus):+ # Everything this run wrote under SANDBOX (state, outputs, uploads, every+ # temp dir) goes when it ends - nothing is left in the system temp dir.+ shutil.rmtree(SANDBOX, ignore_errors=True)diff --git a/data/fleet_timings.json b/data/fleet_timings.jsonindex e9aa593..0927772 100644--- a/data/fleet_timings.json+++ b/data/fleet_timings.json@@ -1,5 +1,5 @@{- "built_at": "2026-10-02T13:17:32Z",+ "built_at": "2026-10-03T17:35:16Z","levels": {"cell": {"cells": {@@ -28,8 +28,8 @@"p75_sec": 180.0},"h3|i2v|draft_10s_dense|243.0|M5 Pro|64.0|best": {- "n": 4,- "p25_sec": 1200.0,+ "n": 36,+ "p25_sec": 900.0,"p50_sec": 1200.0,"p75_sec": 1200.0},@@ -51,6 +51,12 @@"p50_sec": 600.0,"p75_sec": 600.0},+ "h3|i2v|draft_10s|243.0|M2 Ultra|128.0|best": {+ "n": 3,+ "p25_sec": 1050.0,+ "p50_sec": 1200.0,+ "p75_sec": 1200.0+ },"h3|i2v|draft_10s|243.0|M4 Max|128.0|fast": {"n": 3,"p25_sec": 600.0,@@ -82,7 +88,7 @@"p75_sec": 180.0},"h3|i2v|draft_10s|243.0|M5 Pro|64.0|best": {- "n": 20,+ "n": 24,"p25_sec": 555.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -346,9 +352,9 @@"p75_sec": 90.0},"h3|i2v|draft_5s|124.0|M5 Pro|64.0|best": {- "n": 14,+ "n": 42,"p25_sec": 240.0,- "p50_sec": 300.0,+ "p50_sec": 240.0,"p75_sec": 300.0},"h3|i2v|draft_5s|124.0|M5 Pro|64.0|fast": {@@ -466,7 +472,7 @@"p75_sec": 1200.0},"h3|i2v|high_10s|243.0|M5 Pro|48.0|fast": {- "n": 5,+ "n": 11,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -490,7 +496,7 @@"p75_sec": 2400.0},"h3|i2v|high_15s|362.0|M4 Max|128.0|fast": {- "n": 614,+ "n": 629,"p25_sec": 1200.0,"p50_sec": 1200.0,"p75_sec": 1200.0@@ -544,7 +550,7 @@"p75_sec": 420.0},"h3|i2v|high_3s|73.0|M4 Max|128.0|fast": {- "n": 6,+ "n": 7,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 420.0@@ -586,7 +592,7 @@"p75_sec": 300.0},"h3|i2v|high_3s|73.0|M5 Pro|48.0|fast": {- "n": 103,+ "n": 127,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 180.0@@ -724,7 +730,7 @@"p75_sec": 1200.0},"h3|i2v|high_5s|124.0|M5 Max|128.0|fast": {- "n": 69,+ "n": 72,"p25_sec": 180.0,"p50_sec": 240.0,"p75_sec": 300.0@@ -736,7 +742,7 @@"p75_sec": 600.0},"h3|i2v|high_5s|124.0|M5 Pro|48.0|fast": {- "n": 251,+ "n": 378,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -844,7 +850,7 @@"p75_sec": 1800.0},"h3|i2v|native_5s|124.0|M5 Pro|64.0|best": {- "n": 4,+ "n": 8,"p25_sec": 1800.0,"p50_sec": 1800.0,"p75_sec": 1800.0@@ -993,12 +999,24 @@"p50_sec": 1200.0,"p75_sec": 1200.0},+ "h3|i2v|standard_10s|243.0|M5 Max|128.0|best": {+ "n": 5,+ "p25_sec": 240.0,+ "p50_sec": 240.0,+ "p75_sec": 600.0+ },"h3|i2v|standard_10s|243.0|M5 Max|128.0|fast": {- "n": 17,+ "n": 20,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0},+ "h3|i2v|standard_10s|243.0|M5 Max|64.0|best": {+ "n": 5,+ "p25_sec": 420.0,+ "p50_sec": 420.0,+ "p75_sec": 420.0+ },"h3|i2v|standard_10s|243.0|M5 Max|64.0|fast": {"n": 3,"p25_sec": 180.0,@@ -1012,7 +1030,7 @@"p75_sec": 300.0},"h3|i2v|standard_10s|243.0|M5 Pro|64.0|best": {- "n": 6,+ "n": 7,"p25_sec": 900.0,"p50_sec": 900.0,"p75_sec": 900.0@@ -1576,7 +1594,7 @@"p75_sec": 90.0},"h3|t2v|draft_3s|73.0|M5 Max|128.0|fast": {- "n": 16,+ "n": 20,"p25_sec": 30.0,"p50_sec": 45.0,"p75_sec": 60.0@@ -1726,13 +1744,13 @@"p75_sec": 420.0},"h3|t2v|draft_5s|124.0|M5 Max|128.0|best": {- "n": 126,+ "n": 127,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 180.0},"h3|t2v|draft_5s|124.0|M5 Max|128.0|fast": {- "n": 54,+ "n": 59,"p25_sec": 60.0,"p50_sec": 120.0,"p75_sec": 120.0@@ -1755,6 +1773,12 @@"p50_sec": 420.0,"p75_sec": 420.0},+ "h3|t2v|draft_5s|124.0|M5 Max|64.0|best": {+ "n": 3,+ "p25_sec": 105.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0+ },"h3|t2v|draft_5s|124.0|M5 Pro|48.0|fast": {"n": 7,"p25_sec": 60.0,@@ -2038,7 +2062,7 @@"p75_sec": 1800.0},"h3|t2v|native_3s|73.0|M4 Max|128.0|fast": {- "n": 13,+ "n": 19,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -2068,13 +2092,13 @@"p75_sec": 1800.0},"h3|t2v|native_5s|124.0|M4 Max|128.0|best": {- "n": 5,+ "n": 9,"p25_sec": 2400.0,"p50_sec": 2400.0,"p75_sec": 2400.0},"h3|t2v|native_5s|124.0|M4 Max|128.0|fast": {- "n": 5,+ "n": 19,"p25_sec": 1200.0,"p50_sec": 1200.0,"p75_sec": 1200.0@@ -2296,7 +2320,7 @@"p75_sec": 240.0},"h3|t2v|standard_3s|73.0|M5 Max|128.0|fast": {- "n": 4,+ "n": 6,"p25_sec": 45.0,"p50_sec": 45.0,"p75_sec": 45.0@@ -2506,7 +2530,7 @@"p75_sec": 600.0},"ltx|a2v|balanced|121.0|M4 Pro|48.0|any": {- "n": 16,+ "n": 17,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 600.0@@ -2524,10 +2548,10 @@"p75_sec": 105.0},"ltx|a2v|balanced|129.0|M4 Pro|48.0|any": {- "n": 3,+ "n": 5,"p25_sec": 420.0,"p50_sec": 420.0,- "p75_sec": 510.0+ "p75_sec": 600.0},"ltx|a2v|balanced|129.0|M5 Max|128.0|any": {"n": 3,@@ -2565,6 +2589,12 @@"p50_sec": 420.0,"p75_sec": 600.0},+ "ltx|a2v|balanced|153.0|M4 Pro|48.0|any": {+ "n": 5,+ "p25_sec": 600.0,+ "p50_sec": 600.0,+ "p75_sec": 600.0+ },"ltx|a2v|balanced|153.0|M5 Max|128.0|any": {"n": 3,"p25_sec": 120.0,@@ -2572,13 +2602,13 @@"p75_sec": 120.0},"ltx|a2v|balanced|161.0|M4 Pro|48.0|any": {- "n": 5,+ "n": 7,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0},"ltx|a2v|balanced|169.0|M4 Pro|48.0|any": {- "n": 3,+ "n": 4,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -2590,10 +2620,10 @@"p75_sec": 120.0},"ltx|a2v|balanced|177.0|M4 Pro|48.0|any": {- "n": 3,+ "n": 4,"p25_sec": 420.0,"p50_sec": 420.0,- "p75_sec": 420.0+ "p75_sec": 465.0},"ltx|a2v|balanced|193.0|M4 Pro|48.0|any": {"n": 5,@@ -2865,6 +2895,12 @@"p50_sec": 900.0,"p75_sec": 900.0},+ "ltx|a2v|high|169.0|M5|16.0|any": {+ "n": 5,+ "p25_sec": 420.0,+ "p50_sec": 600.0,+ "p75_sec": 600.0+ },"ltx|a2v|high|185.0|M5 Max|128.0|any": {"n": 4,"p25_sec": 420.0,@@ -2877,6 +2913,12 @@"p50_sec": 1200.0,"p75_sec": 1800.0},+ "ltx|a2v|high|193.0|M5|16.0|any": {+ "n": 13,+ "p25_sec": 600.0,+ "p50_sec": 900.0,+ "p75_sec": 900.0+ },"ltx|a2v|high|217.0|M4 Pro|24.0|any": {"n": 3,"p25_sec": 420.0,@@ -2889,6 +2931,12 @@"p50_sec": 900.0,"p75_sec": 1350.0},+ "ltx|a2v|high|217.0|M5|16.0|any": {+ "n": 11,+ "p25_sec": 600.0,+ "p50_sec": 600.0,+ "p75_sec": 900.0+ },"ltx|a2v|high|241.0|M1 Ultra|64.0|any": {"n": 22,"p25_sec": 420.0,@@ -2938,10 +2986,10 @@"p75_sec": 300.0},"ltx|a2v|high|241.0|M5|16.0|any": {- "n": 3,- "p25_sec": 360.0,+ "n": 9,+ "p25_sec": 600.0,"p50_sec": 600.0,- "p75_sec": 900.0+ "p75_sec": 600.0},"ltx|a2v|high|265.0|M1 Ultra|64.0|any": {"n": 4,@@ -3051,6 +3099,12 @@"p50_sec": 900.0,"p75_sec": 1200.0},+ "ltx|a2v|quick|241.0|M5 Pro|24.0|any": {+ "n": 7,+ "p25_sec": 120.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0+ },"ltx|a2v|standard|105.0|M4 Pro|48.0|any": {"n": 6,"p25_sec": 600.0,@@ -3063,6 +3117,12 @@"p50_sec": 180.0,"p75_sec": 285.0},+ "ltx|a2v|standard|121.0|M5 Max|64.0|any": {+ "n": 3,+ "p25_sec": 300.0,+ "p50_sec": 300.0,+ "p75_sec": 300.0+ },"ltx|a2v|standard|129.0|M4 Pro|48.0|any": {"n": 4,"p25_sec": 600.0,@@ -3075,6 +3135,12 @@"p50_sec": 600.0,"p75_sec": 1200.0},+ "ltx|a2v|standard|137.0|M5 Max|64.0|any": {+ "n": 3,+ "p25_sec": 300.0,+ "p50_sec": 300.0,+ "p75_sec": 300.0+ },"ltx|a2v|standard|145.0|M4 Pro|48.0|any": {"n": 14,"p25_sec": 600.0,@@ -3099,6 +3165,12 @@"p50_sec": 1050.0,"p75_sec": 1800.0},+ "ltx|a2v|standard|169.0|M5 Max|64.0|any": {+ "n": 4,+ "p25_sec": 420.0,+ "p50_sec": 420.0,+ "p75_sec": 420.0+ },"ltx|a2v|standard|177.0|M4 Pro|48.0|any": {"n": 6,"p25_sec": 975.0,@@ -3123,6 +3195,12 @@"p50_sec": 1200.0,"p75_sec": 1200.0},+ "ltx|a2v|standard|241.0|M5 Max|64.0|any": {+ "n": 21,+ "p25_sec": 600.0,+ "p50_sec": 600.0,+ "p75_sec": 600.0+ },"ltx|a2v|standard|73.0|M5 Max|128.0|any": {"n": 32,"p25_sec": 90.0,@@ -3141,11 +3219,17 @@"p50_sec": 120.0,"p75_sec": 165.0},- "ltx|extend|balanced|121.0|M1 Max|64.0|any": {+ "ltx|a2v|standard|97.0|M5 Max|64.0|any": {"n": 4,- "p25_sec": 1005.0,- "p50_sec": 1800.0,- "p75_sec": 3150.0+ "p25_sec": 240.0,+ "p50_sec": 270.0,+ "p75_sec": 300.0+ },+ "ltx|extend|balanced|121.0|M1 Max|64.0|any": {+ "n": 5,+ "p25_sec": 1200.0,+ "p50_sec": 1200.0,+ "p75_sec": 2400.0},"ltx|extend|balanced|121.0|M3 Ultra|256.0|any": {"n": 3,@@ -3244,7 +3328,7 @@"p75_sec": 300.0},"ltx|i2v|balanced|121.0|M1 Pro|16.0|any": {- "n": 24,+ "n": 28,"p25_sec": 240.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -3268,7 +3352,7 @@"p75_sec": 270.0},"ltx|i2v|balanced|121.0|M1|16.0|any": {- "n": 17,+ "n": 19,"p25_sec": 900.0,"p50_sec": 900.0,"p75_sec": 1200.0@@ -3316,7 +3400,7 @@"p75_sec": 120.0},"ltx|i2v|balanced|121.0|M2 Ultra|64.0|any": {- "n": 19,+ "n": 20,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 120.0@@ -3400,7 +3484,7 @@"p75_sec": 420.0},"ltx|i2v|balanced|121.0|M4 Max|36.0|any": {- "n": 316,+ "n": 352,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 120.0@@ -3412,13 +3496,13 @@"p75_sec": 180.0},"ltx|i2v|balanced|121.0|M4 Max|64.0|any": {- "n": 71,+ "n": 89,"p25_sec": 120.0,- "p50_sec": 180.0,- "p75_sec": 240.0+ "p50_sec": 120.0,+ "p75_sec": 180.0},"ltx|i2v|balanced|121.0|M4 Pro|24.0|any": {- "n": 133,+ "n": 138,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 240.0@@ -3466,10 +3550,10 @@"p75_sec": 60.0},"ltx|i2v|balanced|121.0|M5 Max|48.0|any": {- "n": 10,- "p25_sec": 67.5,+ "n": 12,+ "p25_sec": 60.0,"p50_sec": 90.0,- "p75_sec": 112.5+ "p75_sec": 97.5},"ltx|i2v|balanced|121.0|M5 Max|64.0|any": {"n": 73,@@ -3496,7 +3580,7 @@"p75_sec": 120.0},"ltx|i2v|balanced|121.0|M5|16.0|any": {- "n": 30,+ "n": 31,"p25_sec": 180.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -3519,8 +3603,14 @@"p50_sec": 240.0,"p75_sec": 300.0},+ "ltx|i2v|balanced|145.0|M4 Max|36.0|any": {+ "n": 6,+ "p25_sec": 120.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0+ },"ltx|i2v|balanced|145.0|M4 Pro|48.0|any": {- "n": 100,+ "n": 102,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -3537,6 +3627,12 @@"p50_sec": 180.0,"p75_sec": 180.0},+ "ltx|i2v|balanced|161.0|M4 Pro|48.0|any": {+ "n": 3,+ "p25_sec": 420.0,+ "p50_sec": 420.0,+ "p75_sec": 420.0+ },"ltx|i2v|balanced|169.0|M1 Max|32.0|any": {"n": 9,"p25_sec": 240.0,@@ -3550,8 +3646,8 @@"p75_sec": 510.0},"ltx|i2v|balanced|169.0|M1 Pro|16.0|any": {- "n": 14,- "p25_sec": 420.0,+ "n": 16,+ "p25_sec": 390.0,"p50_sec": 420.0,"p75_sec": 600.0},@@ -3580,10 +3676,10 @@"p75_sec": 300.0},"ltx|i2v|balanced|169.0|M2 Ultra|64.0|any": {- "n": 14,- "p25_sec": 180.0,- "p50_sec": 240.0,- "p75_sec": 240.0+ "n": 28,+ "p25_sec": 240.0,+ "p50_sec": 300.0,+ "p75_sec": 300.0},"ltx|i2v|balanced|169.0|M2|8.0|any": {"n": 3,@@ -3610,7 +3706,7 @@"p75_sec": 360.0},"ltx|i2v|balanced|169.0|M4 Max|36.0|any": {- "n": 157,+ "n": 162,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 120.0@@ -3622,7 +3718,7 @@"p75_sec": 300.0},"ltx|i2v|balanced|169.0|M4 Max|64.0|any": {- "n": 9,+ "n": 10,"p25_sec": 180.0,"p50_sec": 240.0,"p75_sec": 240.0@@ -3634,7 +3730,7 @@"p75_sec": 285.0},"ltx|i2v|balanced|169.0|M4 Pro|48.0|any": {- "n": 53,+ "n": 55,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 420.0@@ -3652,7 +3748,7 @@"p75_sec": 900.0},"ltx|i2v|balanced|169.0|M4|24.0|any": {- "n": 95,+ "n": 106,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -3669,6 +3765,12 @@"p50_sec": 105.0,"p75_sec": 120.0},+ "ltx|i2v|balanced|169.0|M5 Max|48.0|any": {+ "n": 3,+ "p25_sec": 105.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0+ },"ltx|i2v|balanced|169.0|M5 Max|64.0|any": {"n": 11,"p25_sec": 90.0,@@ -3682,7 +3784,7 @@"p75_sec": 120.0},"ltx|i2v|balanced|169.0|M5 Pro|48.0|any": {- "n": 36,+ "n": 38,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -3724,7 +3826,7 @@"p75_sec": 120.0},"ltx|i2v|balanced|193.0|M4 Pro|48.0|any": {- "n": 129,+ "n": 131,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 420.0@@ -3754,13 +3856,13 @@"p75_sec": 420.0},"ltx|i2v|balanced|241.0|M1 Max|32.0|any": {- "n": 42,+ "n": 53,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0},"ltx|i2v|balanced|241.0|M1 Max|64.0|any": {- "n": 83,+ "n": 84,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -3850,7 +3952,7 @@"p75_sec": 300.0},"ltx|i2v|balanced|241.0|M3 Pro|18.0|any": {- "n": 12,+ "n": 14,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 600.0@@ -3886,10 +3988,10 @@"p75_sec": 1200.0},"ltx|i2v|balanced|241.0|M4 Max|128.0|any": {- "n": 23,+ "n": 24,"p25_sec": 300.0,"p50_sec": 300.0,- "p75_sec": 510.0+ "p75_sec": 600.0},"ltx|i2v|balanced|241.0|M4 Max|36.0|any": {"n": 48,@@ -3910,13 +4012,13 @@"p75_sec": 420.0},"ltx|i2v|balanced|241.0|M4 Pro|24.0|any": {- "n": 329,+ "n": 349,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 420.0},"ltx|i2v|balanced|241.0|M4 Pro|48.0|any": {- "n": 193,+ "n": 205,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -3940,7 +4042,7 @@"p75_sec": 1200.0},"ltx|i2v|balanced|241.0|M4|32.0|any": {- "n": 13,+ "n": 18,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -3958,19 +4060,19 @@"p75_sec": 240.0},"ltx|i2v|balanced|241.0|M5 Max|64.0|any": {- "n": 12,+ "n": 17,"p25_sec": 120.0,- "p50_sec": 180.0,- "p75_sec": 420.0+ "p50_sec": 120.0,+ "p75_sec": 180.0},"ltx|i2v|balanced|241.0|M5 Pro|24.0|any": {- "n": 47,+ "n": 48,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 120.0},"ltx|i2v|balanced|241.0|M5 Pro|48.0|any": {- "n": 423,+ "n": 427,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -3982,10 +4084,10 @@"p75_sec": 300.0},"ltx|i2v|balanced|241.0|M5|16.0|any": {- "n": 18,+ "n": 19,"p25_sec": 420.0,"p50_sec": 420.0,- "p75_sec": 825.0+ "p75_sec": 750.0},"ltx|i2v|balanced|241.0|M5|24.0|any": {"n": 45,@@ -4005,6 +4107,12 @@"p50_sec": 45.0,"p75_sec": 45.0},+ "ltx|i2v|balanced|289.0|M1 Max|64.0|any": {+ "n": 3,+ "p25_sec": 900.0,+ "p50_sec": 900.0,+ "p75_sec": 1350.0+ },"ltx|i2v|balanced|289.0|M1 Ultra|64.0|any": {"n": 22,"p25_sec": 420.0,@@ -4246,7 +4354,7 @@"p75_sec": 180.0},"ltx|i2v|balanced|73.0|M4 Max|36.0|any": {- "n": 199,+ "n": 230,"p25_sec": 90.0,"p50_sec": 90.0,"p75_sec": 90.0@@ -4366,10 +4474,10 @@"p75_sec": 90.0},"ltx|i2v|balanced|97.0|M5 Pro|64.0|any": {- "n": 6,+ "n": 9,"p25_sec": 90.0,- "p50_sec": 90.0,- "p75_sec": 112.5+ "p50_sec": 120.0,+ "p75_sec": 120.0},"ltx|i2v|draft|121.0|M5 Pro|48.0|any": {"n": 3,@@ -4395,11 +4503,17 @@"p50_sec": 420.0,"p75_sec": 420.0},- "ltx|i2v|high_720p|241.0|M1 Max|64.0|any": {+ "ltx|i2v|high_720p|193.0|M1 Max|64.0|any": {"n": 3,- "p25_sec": 1500.0,+ "p25_sec": 1800.0,"p50_sec": 1800.0,- "p75_sec": 2100.0+ "p75_sec": 1800.0+ },+ "ltx|i2v|high_720p|241.0|M1 Max|64.0|any": {+ "n": 11,+ "p25_sec": 2400.0,+ "p50_sec": 2400.0,+ "p75_sec": 2400.0},"ltx|i2v|high_720p|241.0|M2 Max|64.0|any": {"n": 18,@@ -4438,7 +4552,7 @@"p75_sec": 600.0},"ltx|i2v|high|121.0|M3 Max|64.0|any": {- "n": 16,+ "n": 17,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -4600,10 +4714,10 @@"p75_sec": 300.0},"ltx|i2v|high|241.0|M4 Max|128.0|any": {- "n": 22,+ "n": 37,"p25_sec": 600.0,- "p50_sec": 600.0,- "p75_sec": 1125.0+ "p50_sec": 900.0,+ "p75_sec": 900.0},"ltx|i2v|high|241.0|M4 Max|36.0|any": {"n": 3,@@ -4648,8 +4762,8 @@"p75_sec": 300.0},"ltx|i2v|high|241.0|M5 Pro|48.0|any": {- "n": 3,- "p25_sec": 600.0,+ "n": 4,+ "p25_sec": 555.0,"p50_sec": 600.0,"p75_sec": 600.0},@@ -4767,6 +4881,12 @@"p50_sec": 180.0,"p75_sec": 240.0},+ "ltx|i2v|quick|113.0|M5 Pro|24.0|any": {+ "n": 4,+ "p25_sec": 60.0,+ "p50_sec": 60.0,+ "p75_sec": 60.0+ },"ltx|i2v|quick|121.0|M1 Max|32.0|any": {"n": 28,"p25_sec": 180.0,@@ -4786,7 +4906,7 @@"p75_sec": 300.0},"ltx|i2v|quick|121.0|M1 Pro|32.0|any": {- "n": 11,+ "n": 13,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -4846,13 +4966,13 @@"p75_sec": 60.0},"ltx|i2v|quick|121.0|M4 Max|64.0|any": {- "n": 13,+ "n": 14,"p25_sec": 90.0,"p50_sec": 90.0,"p75_sec": 120.0},"ltx|i2v|quick|121.0|M4 Pro|24.0|any": {- "n": 19,+ "n": 20,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -4864,7 +4984,7 @@"p75_sec": 180.0},"ltx|i2v|quick|121.0|M4|16.0|any": {- "n": 21,+ "n": 23,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 900.0@@ -4888,16 +5008,16 @@"p75_sec": 30.0},"ltx|i2v|quick|121.0|M5 Pro|24.0|any": {- "n": 77,+ "n": 78,"p25_sec": 90.0,"p50_sec": 90.0,"p75_sec": 90.0},"ltx|i2v|quick|121.0|M5 Pro|48.0|any": {- "n": 5,+ "n": 9,"p25_sec": 60.0,- "p50_sec": 600.0,- "p75_sec": 3600.0+ "p50_sec": 120.0,+ "p75_sec": 600.0},"ltx|i2v|quick|121.0|M5 Pro|64.0|any": {"n": 14,@@ -4923,12 +5043,24 @@"p50_sec": 60.0,"p75_sec": 60.0},+ "ltx|i2v|quick|129.0|M5 Pro|24.0|any": {+ "n": 3,+ "p25_sec": 60.0,+ "p50_sec": 60.0,+ "p75_sec": 60.0+ },"ltx|i2v|quick|145.0|M4 Pro|24.0|any": {"n": 3,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0},+ "ltx|i2v|quick|145.0|M5 Pro|24.0|any": {+ "n": 4,+ "p25_sec": 60.0,+ "p50_sec": 60.0,+ "p75_sec": 67.5+ },"ltx|i2v|quick|169.0|M1 Max|64.0|any": {"n": 13,"p25_sec": 180.0,@@ -4948,10 +5080,10 @@"p75_sec": 120.0},"ltx|i2v|quick|169.0|M4 Pro|24.0|any": {- "n": 4,+ "n": 6,"p25_sec": 180.0,"p50_sec": 210.0,- "p75_sec": 405.0+ "p75_sec": 240.0},"ltx|i2v|quick|169.0|M4 Pro|48.0|any": {"n": 11,@@ -4977,8 +5109,14 @@"p50_sec": 120.0,"p75_sec": 120.0},+ "ltx|i2v|quick|169.0|M5 Pro|48.0|any": {+ "n": 3,+ "p25_sec": 120.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0+ },"ltx|i2v|quick|241.0|M1 Max|32.0|any": {- "n": 23,+ "n": 50,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -5056,10 +5194,10 @@"p75_sec": 120.0},"ltx|i2v|quick|241.0|M5 Pro|48.0|any": {- "n": 18,+ "n": 19,"p25_sec": 90.0,"p50_sec": 120.0,- "p75_sec": 120.0+ "p75_sec": 210.0},"ltx|i2v|quick|241.0|M5 Pro|64.0|any": {"n": 3,@@ -5098,7 +5236,7 @@"p75_sec": 60.0},"ltx|i2v|quick|481.0|M1 Max|32.0|any": {- "n": 9,+ "n": 25,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -5343,6 +5481,12 @@"p50_sec": 90.0,"p75_sec": 105.0},+ "ltx|i2v|quick|81.0|M5 Pro|24.0|any": {+ "n": 5,+ "p25_sec": 45.0,+ "p50_sec": 45.0,+ "p75_sec": 45.0+ },"ltx|i2v|quick|97.0|M4 Pro|48.0|any": {"n": 3,"p25_sec": 120.0,@@ -5355,6 +5499,12 @@"p50_sec": 300.0,"p75_sec": 300.0},+ "ltx|i2v|quick|97.0|M5 Pro|24.0|any": {+ "n": 5,+ "p25_sec": 60.0,+ "p50_sec": 60.0,+ "p75_sec": 60.0+ },"ltx|i2v|quick|97.0|M5 Pro|48.0|any": {"n": 21,"p25_sec": 15.0,@@ -5362,7 +5512,7 @@"p75_sec": 15.0},"ltx|i2v|standard|121.0|M1 Max|32.0|any": {- "n": 209,+ "n": 246,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -5374,10 +5524,10 @@"p75_sec": 420.0},"ltx|i2v|standard|121.0|M1 Pro|16.0|any": {- "n": 12,+ "n": 14,"p25_sec": 240.0,- "p50_sec": 360.0,- "p75_sec": 600.0+ "p50_sec": 300.0,+ "p75_sec": 555.0},"ltx|i2v|standard|121.0|M1 Ultra|128.0|any": {"n": 7,@@ -5404,7 +5554,7 @@"p75_sec": 300.0},"ltx|i2v|standard|121.0|M2 Max|96.0|any": {- "n": 119,+ "n": 120,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -5494,7 +5644,7 @@"p75_sec": 420.0},"ltx|i2v|standard|121.0|M5 Max|128.0|any": {- "n": 82,+ "n": 83,"p25_sec": 90.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -5506,13 +5656,13 @@"p75_sec": 60.0},"ltx|i2v|standard|121.0|M5 Max|48.0|any": {- "n": 7,- "p25_sec": 52.5,- "p50_sec": 60.0,- "p75_sec": 105.0+ "n": 8,+ "p25_sec": 56.2,+ "p50_sec": 75.0,+ "p75_sec": 97.5},"ltx|i2v|standard|121.0|M5 Max|64.0|any": {- "n": 18,+ "n": 20,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 120.0@@ -5524,7 +5674,7 @@"p75_sec": 90.0},"ltx|i2v|standard|121.0|M5 Pro|48.0|any": {- "n": 63,+ "n": 67,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 180.0@@ -5559,6 +5709,12 @@"p50_sec": 120.0,"p75_sec": 120.0},+ "ltx|i2v|standard|137.0|M5 Max|64.0|any": {+ "n": 5,+ "p25_sec": 60.0,+ "p50_sec": 60.0,+ "p75_sec": 60.0+ },"ltx|i2v|standard|145.0|M2 Ultra|64.0|any": {"n": 52,"p25_sec": 300.0,@@ -5583,6 +5739,18 @@"p50_sec": 180.0,"p75_sec": 225.0},+ "ltx|i2v|standard|153.0|M5 Max|64.0|any": {+ "n": 6,+ "p25_sec": 90.0,+ "p50_sec": 90.0,+ "p75_sec": 90.0+ },+ "ltx|i2v|standard|161.0|M5 Max|64.0|any": {+ "n": 3,+ "p25_sec": 90.0,+ "p50_sec": 90.0,+ "p75_sec": 90.0+ },"ltx|i2v|standard|169.0|M1 Max|32.0|any": {"n": 120,"p25_sec": 420.0,@@ -5644,7 +5812,7 @@"p75_sec": 600.0},"ltx|i2v|standard|169.0|M4 Max|36.0|any": {- "n": 78,+ "n": 79,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 120.0@@ -5692,10 +5860,10 @@"p75_sec": 300.0},"ltx|i2v|standard|169.0|M5 Max|48.0|any": {- "n": 3,+ "n": 5,"p25_sec": 90.0,- "p50_sec": 90.0,- "p75_sec": 105.0+ "p50_sec": 120.0,+ "p75_sec": 120.0},"ltx|i2v|standard|169.0|M5 Max|64.0|any": {"n": 132,@@ -5710,7 +5878,7 @@"p75_sec": 90.0},"ltx|i2v|standard|169.0|M5 Pro|48.0|any": {- "n": 32,+ "n": 38,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -5776,7 +5944,7 @@"p75_sec": 1200.0},"ltx|i2v|standard|241.0|M1 Pro|16.0|any": {- "n": 21,+ "n": 22,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 600.0@@ -5914,7 +6082,7 @@"p75_sec": 600.0},"ltx|i2v|standard|241.0|M4|32.0|any": {- "n": 323,+ "n": 324,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 600.0@@ -5931,8 +6099,14 @@"p50_sec": 120.0,"p75_sec": 120.0},+ "ltx|i2v|standard|241.0|M5 Max|48.0|any": {+ "n": 3,+ "p25_sec": 150.0,+ "p50_sec": 180.0,+ "p75_sec": 180.0+ },"ltx|i2v|standard|241.0|M5 Max|64.0|any": {- "n": 45,+ "n": 58,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -5944,7 +6118,7 @@"p75_sec": 120.0},"ltx|i2v|standard|241.0|M5 Pro|48.0|any": {- "n": 29,+ "n": 30,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -5985,6 +6159,12 @@"p50_sec": 60.0,"p75_sec": 75.0},+ "ltx|i2v|standard|289.0|M1 Max|64.0|any": {+ "n": 3,+ "p25_sec": 1800.0,+ "p50_sec": 1800.0,+ "p75_sec": 1800.0+ },"ltx|i2v|standard|289.0|M2 Ultra|64.0|any": {"n": 67,"p25_sec": 600.0,@@ -6093,6 +6273,12 @@"p50_sec": 240.0,"p75_sec": 240.0},+ "ltx|i2v|standard|73.0|M2 Max|96.0|any": {+ "n": 4,+ "p25_sec": 180.0,+ "p50_sec": 180.0,+ "p75_sec": 180.0+ },"ltx|i2v|standard|73.0|M3 Max|36.0|any": {"n": 5,"p25_sec": 120.0,@@ -6142,7 +6328,7 @@"p75_sec": 240.0},"ltx|i2v|standard|73.0|M5 Max|128.0|any": {- "n": 158,+ "n": 163,"p25_sec": 60.0,"p50_sec": 60.0,"p75_sec": 120.0@@ -6154,7 +6340,7 @@"p75_sec": 45.0},"ltx|i2v|standard|73.0|M5 Pro|48.0|any": {- "n": 14,+ "n": 15,"p25_sec": 60.0,"p50_sec": 60.0,"p75_sec": 60.0@@ -6177,12 +6363,24 @@"p50_sec": 45.0,"p75_sec": 45.0},+ "ltx|i2v|standard|81.0|M5 Max|64.0|any": {+ "n": 8,+ "p25_sec": 45.0,+ "p50_sec": 45.0,+ "p75_sec": 45.0+ },"ltx|i2v|standard|89.0|M5 Max|128.0|any": {"n": 4,"p25_sec": 60.0,"p50_sec": 60.0,"p75_sec": 60.0},+ "ltx|i2v|standard|89.0|M5 Max|64.0|any": {+ "n": 4,+ "p25_sec": 45.0,+ "p50_sec": 45.0,+ "p75_sec": 45.0+ },"ltx|i2v|standard|97.0|M2 Ultra|64.0|any": {"n": 4,"p25_sec": 180.0,@@ -6513,6 +6711,12 @@"p50_sec": 600.0,"p75_sec": 600.0},+ "ltx|keyframe|standard|121.0|M2 Max|96.0|any": {+ "n": 6,+ "p25_sec": 600.0,+ "p50_sec": 600.0,+ "p75_sec": 600.0+ },"ltx|keyframe|standard|121.0|M5 Max|128.0|any": {"n": 3,"p25_sec": 240.0,@@ -6525,6 +6729,12 @@"p50_sec": 180.0,"p75_sec": 195.0},+ "ltx|keyframe|standard|169.0|M2 Max|96.0|any": {+ "n": 4,+ "p25_sec": 900.0,+ "p50_sec": 900.0,+ "p75_sec": 900.0+ },"ltx|keyframe|standard|169.0|M4 Max|128.0|any": {"n": 6,"p25_sec": 1200.0,@@ -6579,6 +6789,12 @@"p50_sec": 180.0,"p75_sec": 180.0},+ "ltx|keyframe|standard|73.0|M2 Max|96.0|any": {+ "n": 5,+ "p25_sec": 420.0,+ "p50_sec": 420.0,+ "p75_sec": 420.0+ },"ltx|keyframe|standard|73.0|M5 Max|128.0|any": {"n": 43,"p25_sec": 180.0,@@ -6591,6 +6807,12 @@"p50_sec": 300.0,"p75_sec": 300.0},+ "ltx|t2v|balanced|113.0|M4 Max|64.0|any": {+ "n": 10,+ "p25_sec": 120.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0+ },"ltx|t2v|balanced|113.0|M5 Max|128.0|any": {"n": 6,"p25_sec": 90.0,@@ -6652,13 +6874,13 @@"p75_sec": 180.0},"ltx|t2v|balanced|121.0|M2 Max|64.0|any": {- "n": 63,+ "n": 64,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 240.0},"ltx|t2v|balanced|121.0|M2 Max|96.0|any": {- "n": 46,+ "n": 53,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -6693,6 +6915,12 @@"p50_sec": 900.0,"p75_sec": 1050.0},+ "ltx|t2v|balanced|121.0|M2|24.0|any": {+ "n": 4,+ "p25_sec": 390.0,+ "p50_sec": 660.0,+ "p75_sec": 900.0+ },"ltx|t2v|balanced|121.0|M2|8.0|any": {"n": 7,"p25_sec": 510.0,@@ -6700,10 +6928,10 @@"p75_sec": 900.0},"ltx|t2v|balanced|121.0|M3 Max|36.0|any": {- "n": 3,+ "n": 5,"p25_sec": 120.0,"p50_sec": 120.0,- "p75_sec": 360.0+ "p75_sec": 120.0},"ltx|t2v|balanced|121.0|M3 Max|48.0|any": {"n": 15,@@ -6778,7 +7006,7 @@"p75_sec": 180.0},"ltx|t2v|balanced|121.0|M4 Max|48.0|any": {- "n": 14,+ "n": 15,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 180.0@@ -6790,7 +7018,7 @@"p75_sec": 180.0},"ltx|t2v|balanced|121.0|M4 Pro|24.0|any": {- "n": 208,+ "n": 211,"p25_sec": 180.0,"p50_sec": 240.0,"p75_sec": 240.0@@ -6838,13 +7066,13 @@"p75_sec": 60.0},"ltx|t2v|balanced|121.0|M5 Max|48.0|any": {- "n": 30,+ "n": 37,"p25_sec": 60.0,"p50_sec": 60.0,- "p75_sec": 180.0+ "p75_sec": 120.0},"ltx|t2v|balanced|121.0|M5 Max|64.0|any": {- "n": 52,+ "n": 53,"p25_sec": 60.0,"p50_sec": 60.0,"p75_sec": 90.0@@ -7023,6 +7251,12 @@"p50_sec": 240.0,"p75_sec": 405.0},+ "ltx|t2v|balanced|169.0|M6|32.0|any": {+ "n": 3,+ "p25_sec": 150.0,+ "p50_sec": 180.0,+ "p75_sec": 180.0+ },"ltx|t2v|balanced|193.0|M1 Max|64.0|any": {"n": 6,"p25_sec": 210.0,@@ -7150,10 +7384,10 @@"p75_sec": 180.0},"ltx|t2v|balanced|241.0|M4 Max|64.0|any": {- "n": 29,+ "n": 30,"p25_sec": 300.0,"p50_sec": 300.0,- "p75_sec": 300.0+ "p75_sec": 390.0},"ltx|t2v|balanced|241.0|M4 Pro|24.0|any": {"n": 79,@@ -7174,9 +7408,9 @@"p75_sec": 600.0},"ltx|t2v|balanced|241.0|M4|16.0|any": {- "n": 16,+ "n": 21,"p25_sec": 600.0,- "p50_sec": 1050.0,+ "p50_sec": 900.0,"p75_sec": 1200.0},"ltx|t2v|balanced|241.0|M4|24.0|any": {@@ -7192,7 +7426,7 @@"p75_sec": 180.0},"ltx|t2v|balanced|241.0|M5 Max|48.0|any": {- "n": 8,+ "n": 9,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -7737,6 +7971,12 @@"p50_sec": 300.0,"p75_sec": 300.0},+ "ltx|t2v|high|241.0|M5 Max|64.0|any": {+ "n": 3,+ "p25_sec": 270.0,+ "p50_sec": 300.0,+ "p75_sec": 300.0+ },"ltx|t2v|high|241.0|M5 Pro|64.0|any": {"n": 4,"p25_sec": 420.0,@@ -7845,6 +8085,12 @@"p50_sec": 180.0,"p75_sec": 180.0},+ "ltx|t2v|quick|113.0|M4 Max|64.0|any": {+ "n": 3,+ "p25_sec": 120.0,+ "p50_sec": 120.0,+ "p75_sec": 150.0+ },"ltx|t2v|quick|121.0|M1 Max|32.0|any": {"n": 27,"p25_sec": 180.0,@@ -7852,10 +8098,10 @@"p75_sec": 240.0},"ltx|t2v|quick|121.0|M1 Max|64.0|any": {- "n": 55,+ "n": 86,"p25_sec": 120.0,"p50_sec": 120.0,- "p75_sec": 150.0+ "p75_sec": 180.0},"ltx|t2v|quick|121.0|M1 Pro|16.0|any": {"n": 13,@@ -7864,7 +8110,7 @@"p75_sec": 420.0},"ltx|t2v|quick|121.0|M1 Pro|32.0|any": {- "n": 3,+ "n": 4,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -8038,7 +8284,7 @@"p75_sec": 60.0},"ltx|t2v|quick|121.0|M5|16.0|any": {- "n": 15,+ "n": 17,"p25_sec": 240.0,"p50_sec": 420.0,"p75_sec": 420.0@@ -8434,10 +8680,10 @@"p75_sec": 60.0},"ltx|t2v|quick|73.0|M3 Ultra|256.0|any": {- "n": 6,+ "n": 9,"p25_sec": 30.0,"p50_sec": 30.0,- "p75_sec": 41.2+ "p75_sec": 45.0},"ltx|t2v|quick|73.0|M3 Ultra|512.0|any": {"n": 17,@@ -8493,6 +8739,12 @@"p50_sec": 45.0,"p75_sec": 45.0},+ "ltx|t2v|quick|73.0|M5 Max|48.0|any": {+ "n": 4,+ "p25_sec": 30.0,+ "p50_sec": 37.5,+ "p75_sec": 45.0+ },"ltx|t2v|quick|73.0|M5 Max|64.0|any": {"n": 3,"p25_sec": 22.5,@@ -8698,10 +8950,10 @@"p75_sec": 300.0},"ltx|t2v|standard|121.0|M4|16.0|any": {- "n": 4,+ "n": 5,"p25_sec": 300.0,"p50_sec": 300.0,- "p75_sec": 375.0+ "p75_sec": 420.0},"ltx|t2v|standard|121.0|M4|24.0|any": {"n": 4,@@ -8722,7 +8974,7 @@"p75_sec": 60.0},"ltx|t2v|standard|121.0|M5 Max|48.0|any": {- "n": 13,+ "n": 14,"p25_sec": 60.0,"p50_sec": 60.0,"p75_sec": 60.0@@ -8818,10 +9070,10 @@"p75_sec": 172.5},"ltx|t2v|standard|169.0|M5 Pro|48.0|any": {- "n": 5,- "p25_sec": 240.0,+ "n": 15,+ "p25_sec": 180.0,"p50_sec": 240.0,- "p75_sec": 300.0+ "p75_sec": 240.0},"ltx|t2v|standard|169.0|M5 Pro|64.0|any": {"n": 3,@@ -8944,10 +9196,10 @@"p75_sec": 600.0},"ltx|t2v|standard|241.0|M4|16.0|any": {- "n": 23,+ "n": 32,"p25_sec": 600.0,- "p50_sec": 600.0,- "p75_sec": 900.0+ "p50_sec": 900.0,+ "p75_sec": 1200.0},"ltx|t2v|standard|241.0|M4|24.0|any": {"n": 5,@@ -8974,15 +9226,15 @@"p75_sec": 420.0},"ltx|t2v|standard|241.0|M5 Pro|24.0|any": {- "n": 18,+ "n": 19,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 120.0},"ltx|t2v|standard|241.0|M5 Pro|48.0|any": {- "n": 10,+ "n": 12,"p25_sec": 240.0,- "p50_sec": 240.0,+ "p50_sec": 270.0,"p75_sec": 300.0},"ltx|t2v|standard|241.0|M5 Pro|64.0|any": {@@ -9082,7 +9334,7 @@"p75_sec": 240.0},"ltx|t2v|standard|73.0|M4 Max|128.0|any": {- "n": 12,+ "n": 13,"p25_sec": 120.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -9111,6 +9363,12 @@"p50_sec": 180.0,"p75_sec": 180.0},+ "ltx|t2v|standard|73.0|M5 Pro|48.0|any": {+ "n": 4,+ "p25_sec": 56.2,+ "p50_sec": 60.0,+ "p75_sec": 60.0+ },"ltx|t2v|standard|73.0|M5|16.0|any": {"n": 5,"p25_sec": 90.0,@@ -9179,9 +9437,9 @@"p75_sec": 900.0},"h3|i2v|draft_10s_dense|243.0|M5 Pro|best": {- "n": 7,- "p25_sec": 600.0,- "p50_sec": 1200.0,+ "n": 39,+ "p25_sec": 900.0,+ "p50_sec": 900.0,"p75_sec": 1200.0},"h3|i2v|draft_10s_dense|243.0|M5 Pro|fast": {@@ -9208,9 +9466,15 @@"p50_sec": 600.0,"p75_sec": 600.0},- "h3|i2v|draft_10s|243.0|M3 Max|fast": {+ "h3|i2v|draft_10s|243.0|M2 Ultra|best": {"n": 3,- "p25_sec": 600.0,+ "p25_sec": 1050.0,+ "p50_sec": 1200.0,+ "p75_sec": 1200.0+ },+ "h3|i2v|draft_10s|243.0|M3 Max|fast": {+ "n": 3,+ "p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 900.0},@@ -9239,7 +9503,7 @@"p75_sec": 120.0},"h3|i2v|draft_10s|243.0|M5 Pro|best": {- "n": 20,+ "n": 24,"p25_sec": 555.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -9293,7 +9557,7 @@"p75_sec": 600.0},"h3|i2v|draft_15s|362.0|M5 Max|fast": {- "n": 6,+ "n": 7,"p25_sec": 240.0,"p50_sec": 240.0,"p75_sec": 240.0@@ -9341,10 +9605,10 @@"p75_sec": 60.0},"h3|i2v|draft_3s|73.0|M4 Max|best": {- "n": 13,- "p25_sec": 180.0,+ "n": 14,+ "p25_sec": 195.0,"p50_sec": 240.0,- "p75_sec": 240.0+ "p75_sec": 285.0},"h3|i2v|draft_3s|73.0|M4 Max|fast": {"n": 24,@@ -9455,9 +9719,9 @@"p75_sec": 90.0},"h3|i2v|draft_5s|124.0|M5 Pro|best": {- "n": 16,+ "n": 44,"p25_sec": 240.0,- "p50_sec": 270.0,+ "p50_sec": 240.0,"p75_sec": 300.0},"h3|i2v|draft_5s|124.0|M5 Pro|fast": {@@ -9557,16 +9821,16 @@"p75_sec": 675.0},"h3|i2v|high_10s|243.0|M5 Pro|best": {- "n": 34,+ "n": 35,"p25_sec": 1200.0,"p50_sec": 1200.0,"p75_sec": 1200.0},"h3|i2v|high_10s|243.0|M5 Pro|fast": {- "n": 7,+ "n": 13,"p25_sec": 600.0,"p50_sec": 600.0,- "p75_sec": 750.0+ "p75_sec": 600.0},"h3|i2v|high_15s|362.0|M1 Max|fast": {"n": 3,@@ -9587,7 +9851,7 @@"p75_sec": 2400.0},"h3|i2v|high_15s|362.0|M4 Max|fast": {- "n": 615,+ "n": 630,"p25_sec": 1200.0,"p50_sec": 1200.0,"p75_sec": 1200.0@@ -9635,7 +9899,7 @@"p75_sec": 900.0},"h3|i2v|high_3s|73.0|M4 Max|fast": {- "n": 16,+ "n": 17,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -9659,7 +9923,7 @@"p75_sec": 300.0},"h3|i2v|high_3s|73.0|M5 Pro|fast": {- "n": 103,+ "n": 127,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 180.0@@ -9749,7 +10013,7 @@"p75_sec": 1200.0},"h3|i2v|high_5s|124.0|M5 Max|fast": {- "n": 69,+ "n": 72,"p25_sec": 180.0,"p50_sec": 240.0,"p75_sec": 300.0@@ -9761,7 +10025,7 @@"p75_sec": 600.0},"h3|i2v|high_5s|124.0|M5 Pro|fast": {- "n": 252,+ "n": 379,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -9863,7 +10127,7 @@"p75_sec": 900.0},"h3|i2v|native_5s|124.0|M5 Pro|best": {- "n": 7,+ "n": 11,"p25_sec": 1800.0,"p50_sec": 1800.0,"p75_sec": 1800.0@@ -9989,20 +10253,20 @@"p75_sec": 1200.0},"h3|i2v|standard_10s|243.0|M5 Max|best": {- "n": 6,- "p25_sec": 420.0,+ "n": 12,+ "p25_sec": 285.0,"p50_sec": 420.0,- "p75_sec": 555.0+ "p75_sec": 420.0},"h3|i2v|standard_10s|243.0|M5 Max|fast": {- "n": 22,+ "n": 25,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0},"h3|i2v|standard_10s|243.0|M5 Pro|best": {- "n": 7,- "p25_sec": 750.0,+ "n": 8,+ "p25_sec": 825.0,"p50_sec": 900.0,"p75_sec": 900.0},@@ -10211,7 +10475,7 @@"p75_sec": 300.0},"h3|i2v|standard_5s|124.0|M5 Max|fast": {- "n": 6,+ "n": 7,"p25_sec": 90.0,"p50_sec": 90.0,"p75_sec": 90.0@@ -10481,10 +10745,10 @@"p75_sec": 90.0},"h3|t2v|draft_3s|73.0|M5 Max|fast": {- "n": 21,+ "n": 25,"p25_sec": 30.0,- "p50_sec": 30.0,- "p75_sec": 60.0+ "p50_sec": 45.0,+ "p75_sec": 45.0},"h3|t2v|draft_3s|73.0|M5 Pro|best": {"n": 11,@@ -10583,13 +10847,13 @@"p75_sec": 420.0},"h3|t2v|draft_5s|124.0|M5 Max|best": {- "n": 136,+ "n": 139,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 180.0},"h3|t2v|draft_5s|124.0|M5 Max|fast": {- "n": 58,+ "n": 63,"p25_sec": 60.0,"p50_sec": 120.0,"p75_sec": 120.0@@ -10883,7 +11147,7 @@"p75_sec": 1200.0},"h3|t2v|native_3s|73.0|M4 Max|fast": {- "n": 13,+ "n": 19,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -10913,13 +11177,13 @@"p75_sec": 1800.0},"h3|t2v|native_5s|124.0|M4 Max|best": {- "n": 15,+ "n": 19,"p25_sec": 2400.0,"p50_sec": 2400.0,"p75_sec": 2400.0},"h3|t2v|native_5s|124.0|M4 Max|fast": {- "n": 6,+ "n": 20,"p25_sec": 1200.0,"p50_sec": 1200.0,"p75_sec": 1200.0@@ -10997,7 +11261,7 @@"p75_sec": 1200.0},"h3|t2v|standard_10s|243.0|M5 Max|best": {- "n": 10,+ "n": 11,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 600.0@@ -11117,7 +11381,7 @@"p75_sec": 180.0},"h3|t2v|standard_3s|73.0|M5 Max|fast": {- "n": 13,+ "n": 15,"p25_sec": 45.0,"p50_sec": 45.0,"p75_sec": 45.0@@ -11261,7 +11525,7 @@"p75_sec": 600.0},"ltx|a2v|balanced|121.0|M4 Pro|any": {- "n": 16,+ "n": 17,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 600.0@@ -11279,10 +11543,10 @@"p75_sec": 90.0},"ltx|a2v|balanced|129.0|M4 Pro|any": {- "n": 3,+ "n": 5,"p25_sec": 420.0,"p50_sec": 420.0,- "p75_sec": 510.0+ "p75_sec": 600.0},"ltx|a2v|balanced|129.0|M5 Max|any": {"n": 4,@@ -11320,6 +11584,12 @@"p50_sec": 420.0,"p75_sec": 600.0},+ "ltx|a2v|balanced|153.0|M4 Pro|any": {+ "n": 5,+ "p25_sec": 600.0,+ "p50_sec": 600.0,+ "p75_sec": 600.0+ },"ltx|a2v|balanced|153.0|M5 Max|any": {"n": 3,"p25_sec": 120.0,@@ -11327,13 +11597,13 @@"p75_sec": 120.0},"ltx|a2v|balanced|161.0|M4 Pro|any": {- "n": 5,+ "n": 7,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0},"ltx|a2v|balanced|169.0|M4 Pro|any": {- "n": 3,+ "n": 4,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -11345,10 +11615,10 @@"p75_sec": 120.0},"ltx|a2v|balanced|177.0|M4 Pro|any": {- "n": 3,+ "n": 4,"p25_sec": 420.0,"p50_sec": 420.0,- "p75_sec": 420.0+ "p75_sec": 465.0},"ltx|a2v|balanced|193.0|M4 Pro|any": {"n": 5,@@ -11608,6 +11878,12 @@"p50_sec": 300.0,"p75_sec": 900.0},+ "ltx|a2v|high|169.0|M5|any": {+ "n": 5,+ "p25_sec": 420.0,+ "p50_sec": 600.0,+ "p75_sec": 600.0+ },"ltx|a2v|high|185.0|M5 Max|any": {"n": 4,"p25_sec": 420.0,@@ -11620,12 +11896,24 @@"p50_sec": 1200.0,"p75_sec": 1650.0},+ "ltx|a2v|high|193.0|M5|any": {+ "n": 13,+ "p25_sec": 600.0,+ "p50_sec": 900.0,+ "p75_sec": 900.0+ },"ltx|a2v|high|217.0|M4 Pro|any": {"n": 7,"p25_sec": 510.0,"p50_sec": 600.0,"p75_sec": 900.0},+ "ltx|a2v|high|217.0|M5|any": {+ "n": 11,+ "p25_sec": 600.0,+ "p50_sec": 600.0,+ "p75_sec": 900.0+ },"ltx|a2v|high|241.0|M1 Ultra|any": {"n": 22,"p25_sec": 420.0,@@ -11663,10 +11951,10 @@"p75_sec": 300.0},"ltx|a2v|high|241.0|M5|any": {- "n": 3,- "p25_sec": 360.0,+ "n": 9,+ "p25_sec": 600.0,"p50_sec": 600.0,- "p75_sec": 900.0+ "p75_sec": 600.0},"ltx|a2v|high|265.0|M1 Ultra|any": {"n": 4,@@ -11771,10 +12059,10 @@"p75_sec": 900.0},"ltx|a2v|high|73.0|M4 Pro|any": {- "n": 3,- "p25_sec": 150.0,- "p50_sec": 180.0,- "p75_sec": 540.0+ "n": 4,+ "p25_sec": 165.0,+ "p50_sec": 540.0,+ "p75_sec": 900.0},"ltx|a2v|high|73.0|M5 Max|any": {"n": 3,@@ -11812,6 +12100,12 @@"p50_sec": 900.0,"p75_sec": 1200.0},+ "ltx|a2v|quick|241.0|M5 Pro|any": {+ "n": 7,+ "p25_sec": 120.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0+ },"ltx|a2v|standard|105.0|M4 Pro|any": {"n": 6,"p25_sec": 600.0,@@ -11819,10 +12113,10 @@"p75_sec": 600.0},"ltx|a2v|standard|121.0|M5 Max|any": {- "n": 4,- "p25_sec": 165.0,- "p50_sec": 180.0,- "p75_sec": 285.0+ "n": 7,+ "p25_sec": 180.0,+ "p50_sec": 300.0,+ "p75_sec": 300.0},"ltx|a2v|standard|129.0|M4 Pro|any": {"n": 4,@@ -11836,12 +12130,24 @@"p50_sec": 600.0,"p75_sec": 1200.0},+ "ltx|a2v|standard|137.0|M5 Max|any": {+ "n": 3,+ "p25_sec": 300.0,+ "p50_sec": 300.0,+ "p75_sec": 300.0+ },"ltx|a2v|standard|145.0|M4 Pro|any": {"n": 14,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 1800.0},+ "ltx|a2v|standard|145.0|M5 Max|any": {+ "n": 4,+ "p25_sec": 240.0,+ "p50_sec": 270.0,+ "p75_sec": 330.0+ },"ltx|a2v|standard|153.0|M4 Pro|any": {"n": 4,"p25_sec": 600.0,@@ -11860,6 +12166,12 @@"p50_sec": 1050.0,"p75_sec": 1800.0},+ "ltx|a2v|standard|169.0|M5 Max|any": {+ "n": 4,+ "p25_sec": 420.0,+ "p50_sec": 420.0,+ "p75_sec": 420.0+ },"ltx|a2v|standard|177.0|M4 Pro|any": {"n": 6,"p25_sec": 975.0,@@ -11884,6 +12196,12 @@"p50_sec": 1200.0,"p75_sec": 1200.0},+ "ltx|a2v|standard|241.0|M5 Max|any": {+ "n": 22,+ "p25_sec": 600.0,+ "p50_sec": 600.0,+ "p75_sec": 600.0+ },"ltx|a2v|standard|73.0|M4 Pro|any": {"n": 4,"p25_sec": 420.0,@@ -11903,16 +12221,16 @@"p75_sec": 600.0},"ltx|a2v|standard|97.0|M5 Max|any": {- "n": 4,+ "n": 8,"p25_sec": 120.0,- "p50_sec": 120.0,- "p75_sec": 165.0+ "p50_sec": 240.0,+ "p75_sec": 300.0},"ltx|extend|balanced|121.0|M1 Max|any": {- "n": 4,- "p25_sec": 1005.0,- "p50_sec": 1800.0,- "p75_sec": 3150.0+ "n": 5,+ "p25_sec": 1200.0,+ "p50_sec": 1200.0,+ "p75_sec": 2400.0},"ltx|extend|balanced|121.0|M2 Max|any": {"n": 3,@@ -12011,7 +12329,7 @@"p75_sec": 300.0},"ltx|i2v|balanced|121.0|M1 Pro|any": {- "n": 36,+ "n": 40,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -12023,7 +12341,7 @@"p75_sec": 270.0},"ltx|i2v|balanced|121.0|M1|any": {- "n": 26,+ "n": 28,"p25_sec": 600.0,"p50_sec": 900.0,"p75_sec": 1200.0@@ -12041,7 +12359,7 @@"p75_sec": 300.0},"ltx|i2v|balanced|121.0|M2 Ultra|any": {- "n": 47,+ "n": 48,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 120.0@@ -12077,13 +12395,13 @@"p75_sec": 600.0},"ltx|i2v|balanced|121.0|M4 Max|any": {- "n": 450,+ "n": 504,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 120.0},"ltx|i2v|balanced|121.0|M4 Pro|any": {- "n": 316,+ "n": 321,"p25_sec": 180.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -12095,7 +12413,7 @@"p75_sec": 600.0},"ltx|i2v|balanced|121.0|M5 Max|any": {- "n": 164,+ "n": 166,"p25_sec": 60.0,"p50_sec": 60.0,"p75_sec": 90.0@@ -12107,9 +12425,9 @@"p75_sec": 120.0},"ltx|i2v|balanced|121.0|M5|any": {- "n": 84,+ "n": 85,"p25_sec": 120.0,- "p50_sec": 150.0,+ "p50_sec": 180.0,"p75_sec": 300.0},"ltx|i2v|balanced|137.0|M5 Pro|any": {@@ -12130,8 +12448,14 @@"p50_sec": 240.0,"p75_sec": 300.0},+ "ltx|i2v|balanced|145.0|M4 Max|any": {+ "n": 6,+ "p25_sec": 120.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0+ },"ltx|i2v|balanced|145.0|M4 Pro|any": {- "n": 100,+ "n": 102,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -12142,6 +12466,12 @@"p50_sec": 120.0,"p75_sec": 180.0},+ "ltx|i2v|balanced|161.0|M4 Pro|any": {+ "n": 3,+ "p25_sec": 420.0,+ "p50_sec": 420.0,+ "p75_sec": 420.0+ },"ltx|i2v|balanced|169.0|M1 Max|any": {"n": 32,"p25_sec": 300.0,@@ -12149,8 +12479,8 @@"p75_sec": 420.0},"ltx|i2v|balanced|169.0|M1 Pro|any": {- "n": 15,- "p25_sec": 420.0,+ "n": 17,+ "p25_sec": 300.0,"p50_sec": 420.0,"p75_sec": 600.0},@@ -12167,10 +12497,10 @@"p75_sec": 300.0},"ltx|i2v|balanced|169.0|M2 Ultra|any": {- "n": 15,- "p25_sec": 180.0,- "p50_sec": 240.0,- "p75_sec": 240.0+ "n": 29,+ "p25_sec": 240.0,+ "p50_sec": 300.0,+ "p75_sec": 300.0},"ltx|i2v|balanced|169.0|M2|any": {"n": 3,@@ -12191,31 +12521,31 @@"p75_sec": 120.0},"ltx|i2v|balanced|169.0|M4 Max|any": {- "n": 190,+ "n": 196,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 120.0},"ltx|i2v|balanced|169.0|M4 Pro|any": {- "n": 64,+ "n": 66,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 420.0},"ltx|i2v|balanced|169.0|M4|any": {- "n": 105,+ "n": 116,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0},"ltx|i2v|balanced|169.0|M5 Max|any": {- "n": 20,+ "n": 22,"p25_sec": 90.0,"p50_sec": 90.0,"p75_sec": 120.0},"ltx|i2v|balanced|169.0|M5 Pro|any": {- "n": 102,+ "n": 104,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -12257,7 +12587,7 @@"p75_sec": 120.0},"ltx|i2v|balanced|193.0|M4 Pro|any": {- "n": 129,+ "n": 131,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 420.0@@ -12281,7 +12611,7 @@"p75_sec": 420.0},"ltx|i2v|balanced|241.0|M1 Max|any": {- "n": 125,+ "n": 137,"p25_sec": 300.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -12335,10 +12665,10 @@"p75_sec": 300.0},"ltx|i2v|balanced|241.0|M3 Pro|any": {- "n": 16,+ "n": 18,"p25_sec": 420.0,"p50_sec": 420.0,- "p75_sec": 600.0+ "p75_sec": 555.0},"ltx|i2v|balanced|241.0|M3 Ultra|any": {"n": 81,@@ -12353,40 +12683,40 @@"p75_sec": 1200.0},"ltx|i2v|balanced|241.0|M4 Max|any": {- "n": 162,+ "n": 163,"p25_sec": 180.0,"p50_sec": 420.0,"p75_sec": 420.0},"ltx|i2v|balanced|241.0|M4 Pro|any": {- "n": 537,+ "n": 569,"p25_sec": 300.0,"p50_sec": 420.0,"p75_sec": 600.0},"ltx|i2v|balanced|241.0|M4|any": {- "n": 149,+ "n": 154,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 1200.0},"ltx|i2v|balanced|241.0|M5 Max|any": {- "n": 626,+ "n": 631,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 240.0},"ltx|i2v|balanced|241.0|M5 Pro|any": {- "n": 521,+ "n": 526,"p25_sec": 240.0,"p50_sec": 300.0,"p75_sec": 300.0},"ltx|i2v|balanced|241.0|M5|any": {- "n": 68,+ "n": 69,"p25_sec": 300.0,"p50_sec": 420.0,- "p75_sec": 675.0+ "p75_sec": 600.0},"ltx|i2v|balanced|25.0|M5|any": {"n": 3,@@ -12394,6 +12724,12 @@"p50_sec": 45.0,"p75_sec": 45.0},+ "ltx|i2v|balanced|289.0|M1 Max|any": {+ "n": 3,+ "p25_sec": 900.0,+ "p50_sec": 900.0,+ "p75_sec": 1350.0+ },"ltx|i2v|balanced|289.0|M1 Ultra|any": {"n": 22,"p25_sec": 420.0,@@ -12467,7 +12803,7 @@"p75_sec": 300.0},"ltx|i2v|balanced|481.0|M4 Max|any": {- "n": 17,+ "n": 18,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -12509,7 +12845,7 @@"p75_sec": 1950.0},"ltx|i2v|balanced|49.0|M4 Max|any": {- "n": 43,+ "n": 44,"p25_sec": 90.0,"p50_sec": 120.0,"p75_sec": 120.0@@ -12593,7 +12929,7 @@"p75_sec": 750.0},"ltx|i2v|balanced|73.0|M4 Max|any": {- "n": 229,+ "n": 260,"p25_sec": 90.0,"p50_sec": 90.0,"p75_sec": 90.0@@ -12659,7 +12995,7 @@"p75_sec": 60.0},"ltx|i2v|balanced|97.0|M5 Pro|any": {- "n": 28,+ "n": 31,"p25_sec": 90.0,"p50_sec": 90.0,"p75_sec": 90.0@@ -12688,11 +13024,17 @@"p50_sec": 420.0,"p75_sec": 420.0},- "ltx|i2v|high_720p|241.0|M1 Max|any": {+ "ltx|i2v|high_720p|193.0|M1 Max|any": {"n": 3,- "p25_sec": 1500.0,+ "p25_sec": 1800.0,"p50_sec": 1800.0,- "p75_sec": 2100.0+ "p75_sec": 1800.0+ },+ "ltx|i2v|high_720p|241.0|M1 Max|any": {+ "n": 11,+ "p25_sec": 2400.0,+ "p50_sec": 2400.0,+ "p75_sec": 2400.0},"ltx|i2v|high_720p|241.0|M2 Max|any": {"n": 18,@@ -12725,7 +13067,7 @@"p75_sec": 240.0},"ltx|i2v|high|121.0|M3 Max|any": {- "n": 20,+ "n": 21,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -12833,10 +13175,10 @@"p75_sec": 1200.0},"ltx|i2v|high|241.0|M4 Max|any": {- "n": 71,+ "n": 86,"p25_sec": 600.0,"p50_sec": 600.0,- "p75_sec": 750.0+ "p75_sec": 900.0},"ltx|i2v|high|241.0|M4 Pro|any": {"n": 12,@@ -12851,9 +13193,9 @@"p75_sec": 420.0},"ltx|i2v|high|241.0|M5 Pro|any": {- "n": 8,+ "n": 9,"p25_sec": 420.0,- "p50_sec": 510.0,+ "p50_sec": 420.0,"p75_sec": 600.0},"ltx|i2v|high|289.0|M2 Ultra|any": {@@ -12958,6 +13300,12 @@"p50_sec": 180.0,"p75_sec": 240.0},+ "ltx|i2v|quick|113.0|M5 Pro|any": {+ "n": 4,+ "p25_sec": 60.0,+ "p50_sec": 60.0,+ "p75_sec": 60.0+ },"ltx|i2v|quick|121.0|M1 Max|any": {"n": 49,"p25_sec": 180.0,@@ -12965,7 +13313,7 @@"p75_sec": 240.0},"ltx|i2v|quick|121.0|M1 Pro|any": {- "n": 22,+ "n": 24,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -13007,19 +13355,19 @@"p75_sec": 240.0},"ltx|i2v|quick|121.0|M4 Max|any": {- "n": 25,+ "n": 26,"p25_sec": 60.0,"p50_sec": 90.0,"p75_sec": 90.0},"ltx|i2v|quick|121.0|M4 Pro|any": {- "n": 58,+ "n": 59,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 180.0},"ltx|i2v|quick|121.0|M4|any": {- "n": 48,+ "n": 50,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 600.0@@ -13031,7 +13379,7 @@"p75_sec": 60.0},"ltx|i2v|quick|121.0|M5 Pro|any": {- "n": 96,+ "n": 101,"p25_sec": 90.0,"p50_sec": 90.0,"p75_sec": 120.0@@ -13048,12 +13396,24 @@"p50_sec": 60.0,"p75_sec": 60.0},+ "ltx|i2v|quick|129.0|M5 Pro|any": {+ "n": 3,+ "p25_sec": 60.0,+ "p50_sec": 60.0,+ "p75_sec": 60.0+ },"ltx|i2v|quick|145.0|M4 Pro|any": {"n": 3,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0},+ "ltx|i2v|quick|145.0|M5 Pro|any": {+ "n": 4,+ "p25_sec": 60.0,+ "p50_sec": 60.0,+ "p75_sec": 67.5+ },"ltx|i2v|quick|169.0|M1 Max|any": {"n": 14,"p25_sec": 180.0,@@ -13073,7 +13433,7 @@"p75_sec": 120.0},"ltx|i2v|quick|169.0|M4 Pro|any": {- "n": 15,+ "n": 17,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 240.0@@ -13091,8 +13451,8 @@"p75_sec": 45.0},"ltx|i2v|quick|169.0|M5 Pro|any": {- "n": 13,- "p25_sec": 90.0,+ "n": 16,+ "p25_sec": 112.5,"p50_sec": 120.0,"p75_sec": 120.0},@@ -13103,7 +13463,7 @@"p75_sec": 240.0},"ltx|i2v|quick|241.0|M1 Max|any": {- "n": 35,+ "n": 62,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -13163,10 +13523,10 @@"p75_sec": 180.0},"ltx|i2v|quick|241.0|M5 Pro|any": {- "n": 23,+ "n": 24,"p25_sec": 90.0,"p50_sec": 120.0,- "p75_sec": 210.0+ "p75_sec": 330.0},"ltx|i2v|quick|241.0|M5|any": {"n": 8,@@ -13199,10 +13559,10 @@"p75_sec": 60.0},"ltx|i2v|quick|481.0|M1 Max|any": {- "n": 15,+ "n": 31,"p25_sec": 300.0,- "p50_sec": 420.0,- "p75_sec": 600.0+ "p50_sec": 300.0,+ "p75_sec": 420.0},"ltx|i2v|quick|481.0|M1|any": {"n": 3,@@ -13307,8 +13667,8 @@"p75_sec": 97.5},"ltx|i2v|quick|73.0|M2|any": {- "n": 4,- "p25_sec": 225.0,+ "n": 5,+ "p25_sec": 240.0,"p50_sec": 240.0,"p75_sec": 240.0},@@ -13319,9 +13679,9 @@"p75_sec": 90.0},"ltx|i2v|quick|73.0|M3 Ultra|any": {- "n": 6,- "p25_sec": 33.8,- "p50_sec": 67.5,+ "n": 7,+ "p25_sec": 30.0,+ "p50_sec": 45.0,"p75_sec": 90.0},"ltx|i2v|quick|73.0|M3|any": {@@ -13366,6 +13726,12 @@"p50_sec": 420.0,"p75_sec": 600.0},+ "ltx|i2v|quick|81.0|M5 Pro|any": {+ "n": 5,+ "p25_sec": 45.0,+ "p50_sec": 45.0,+ "p75_sec": 45.0+ },"ltx|i2v|quick|97.0|M4 Pro|any": {"n": 3,"p25_sec": 120.0,@@ -13379,22 +13745,22 @@"p75_sec": 300.0},"ltx|i2v|quick|97.0|M5 Pro|any": {- "n": 22,+ "n": 26,"p25_sec": 15.0,"p50_sec": 15.0,"p75_sec": 15.0},"ltx|i2v|standard|121.0|M1 Max|any": {- "n": 222,+ "n": 259,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0},"ltx|i2v|standard|121.0|M1 Pro|any": {- "n": 13,+ "n": 15,"p25_sec": 240.0,"p50_sec": 300.0,- "p75_sec": 600.0+ "p75_sec": 510.0},"ltx|i2v|standard|121.0|M1 Ultra|any": {"n": 8,@@ -13409,7 +13775,7 @@"p75_sec": 2025.0},"ltx|i2v|standard|121.0|M2 Max|any": {- "n": 171,+ "n": 172,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0@@ -13469,13 +13835,13 @@"p75_sec": 420.0},"ltx|i2v|standard|121.0|M5 Max|any": {- "n": 112,- "p25_sec": 90.0,+ "n": 116,+ "p25_sec": 82.5,"p50_sec": 120.0,"p75_sec": 180.0},"ltx|i2v|standard|121.0|M5 Pro|any": {- "n": 148,+ "n": 152,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -13492,6 +13858,12 @@"p50_sec": 120.0,"p75_sec": 120.0},+ "ltx|i2v|standard|137.0|M5 Max|any": {+ "n": 5,+ "p25_sec": 60.0,+ "p50_sec": 60.0,+ "p75_sec": 60.0+ },"ltx|i2v|standard|145.0|M2 Ultra|any": {"n": 52,"p25_sec": 300.0,@@ -13511,10 +13883,22 @@"p75_sec": 420.0},"ltx|i2v|standard|145.0|M5 Max|any": {- "n": 11,+ "n": 13,"p25_sec": 60.0,- "p50_sec": 180.0,- "p75_sec": 210.0+ "p50_sec": 90.0,+ "p75_sec": 180.0+ },+ "ltx|i2v|standard|153.0|M5 Max|any": {+ "n": 8,+ "p25_sec": 90.0,+ "p50_sec": 90.0,+ "p75_sec": 97.5+ },+ "ltx|i2v|standard|161.0|M5 Max|any": {+ "n": 3,+ "p25_sec": 90.0,+ "p50_sec": 90.0,+ "p75_sec": 90.0},"ltx|i2v|standard|169.0|M1 Max|any": {"n": 136,@@ -13559,7 +13943,7 @@"p75_sec": 675.0},"ltx|i2v|standard|169.0|M4 Max|any": {- "n": 125,+ "n": 126,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 240.0@@ -13577,13 +13961,13 @@"p75_sec": 600.0},"ltx|i2v|standard|169.0|M5 Max|any": {- "n": 139,+ "n": 141,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0},"ltx|i2v|standard|169.0|M5 Pro|any": {- "n": 64,+ "n": 70,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 300.0@@ -13631,7 +14015,7 @@"p75_sec": 900.0},"ltx|i2v|standard|241.0|M1 Pro|any": {- "n": 21,+ "n": 22,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 600.0@@ -13709,19 +14093,19 @@"p75_sec": 600.0},"ltx|i2v|standard|241.0|M4|any": {- "n": 406,+ "n": 407,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 600.0},"ltx|i2v|standard|241.0|M5 Max|any": {- "n": 98,- "p25_sec": 300.0,+ "n": 112,+ "p25_sec": 180.0,"p50_sec": 300.0,"p75_sec": 300.0},"ltx|i2v|standard|241.0|M5 Pro|any": {- "n": 90,+ "n": 91,"p25_sec": 120.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -13744,6 +14128,12 @@"p50_sec": 60.0,"p75_sec": 75.0},+ "ltx|i2v|standard|289.0|M1 Max|any": {+ "n": 3,+ "p25_sec": 1800.0,+ "p50_sec": 1800.0,+ "p75_sec": 1800.0+ },"ltx|i2v|standard|289.0|M2 Ultra|any": {"n": 67,"p25_sec": 600.0,@@ -13841,9 +14231,9 @@"p75_sec": 240.0},"ltx|i2v|standard|73.0|M2 Max|any": {- "n": 11,- "p25_sec": 150.0,- "p50_sec": 240.0,+ "n": 14,+ "p25_sec": 180.0,+ "p50_sec": 210.0,"p75_sec": 240.0},"ltx|i2v|standard|73.0|M3 Max|any": {@@ -13877,16 +14267,16 @@"p75_sec": 240.0},"ltx|i2v|standard|73.0|M5 Max|any": {- "n": 163,+ "n": 168,"p25_sec": 60.0,"p50_sec": 60.0,"p75_sec": 120.0},"ltx|i2v|standard|73.0|M5 Pro|any": {- "n": 18,+ "n": 19,"p25_sec": 60.0,"p50_sec": 60.0,- "p75_sec": 82.5+ "p75_sec": 75.0},"ltx|i2v|standard|73.0|M5|any": {"n": 3,@@ -13895,15 +14285,15 @@"p75_sec": 1110.0},"ltx|i2v|standard|81.0|M5 Max|any": {- "n": 25,+ "n": 33,"p25_sec": 45.0,"p50_sec": 45.0,"p75_sec": 45.0},"ltx|i2v|standard|89.0|M5 Max|any": {- "n": 4,- "p25_sec": 60.0,- "p50_sec": 60.0,+ "n": 8,+ "p25_sec": 45.0,+ "p50_sec": 52.5,"p75_sec": 60.0},"ltx|i2v|standard|97.0|M2 Ultra|any": {@@ -13925,13 +14315,13 @@"p75_sec": 240.0},"ltx|i2v|standard|97.0|M5 Max|any": {- "n": 88,+ "n": 89,"p25_sec": 90.0,"p50_sec": 120.0,"p75_sec": 120.0},"ltx|i2v|standard|97.0|M5 Pro|any": {- "n": 10,+ "n": 12,"p25_sec": 15.0,"p50_sec": 15.0,"p75_sec": 15.0@@ -14057,8 +14447,8 @@"p75_sec": 600.0},"ltx|keyframe|balanced|73.0|M2 Max|any": {- "n": 11,- "p25_sec": 360.0,+ "n": 12,+ "p25_sec": 390.0,"p50_sec": 420.0,"p75_sec": 900.0},@@ -14230,6 +14620,12 @@"p50_sec": 600.0,"p75_sec": 600.0},+ "ltx|keyframe|standard|121.0|M2 Max|any": {+ "n": 6,+ "p25_sec": 600.0,+ "p50_sec": 600.0,+ "p75_sec": 600.0+ },"ltx|keyframe|standard|121.0|M4 Max|any": {"n": 3,"p25_sec": 300.0,@@ -14248,6 +14644,12 @@"p50_sec": 180.0,"p75_sec": 240.0},+ "ltx|keyframe|standard|169.0|M2 Max|any": {+ "n": 4,+ "p25_sec": 900.0,+ "p50_sec": 900.0,+ "p75_sec": 900.0+ },"ltx|keyframe|standard|169.0|M4 Max|any": {"n": 6,"p25_sec": 1200.0,@@ -14308,6 +14710,12 @@"p50_sec": 180.0,"p75_sec": 180.0},+ "ltx|keyframe|standard|73.0|M2 Max|any": {+ "n": 5,+ "p25_sec": 420.0,+ "p50_sec": 420.0,+ "p75_sec": 420.0+ },"ltx|keyframe|standard|73.0|M5 Max|any": {"n": 43,"p25_sec": 180.0,@@ -14320,6 +14728,12 @@"p50_sec": 300.0,"p75_sec": 300.0},+ "ltx|t2v|balanced|113.0|M4 Max|any": {+ "n": 10,+ "p25_sec": 120.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0+ },"ltx|t2v|balanced|113.0|M5 Max|any": {"n": 7,"p25_sec": 75.0,@@ -14351,7 +14765,7 @@"p75_sec": 900.0},"ltx|t2v|balanced|121.0|M2 Max|any": {- "n": 139,+ "n": 147,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -14369,16 +14783,16 @@"p75_sec": 120.0},"ltx|t2v|balanced|121.0|M2|any": {- "n": 11,+ "n": 14,"p25_sec": 420.0,- "p50_sec": 600.0,+ "p50_sec": 750.0,"p75_sec": 900.0},"ltx|t2v|balanced|121.0|M3 Max|any": {- "n": 36,- "p25_sec": 240.0,+ "n": 38,+ "p25_sec": 195.0,"p50_sec": 240.0,- "p75_sec": 255.0+ "p75_sec": 240.0},"ltx|t2v|balanced|121.0|M3 Pro|any": {"n": 19,@@ -14399,13 +14813,13 @@"p75_sec": 1200.0},"ltx|t2v|balanced|121.0|M4 Max|any": {- "n": 775,+ "n": 776,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 180.0},"ltx|t2v|balanced|121.0|M4 Pro|any": {- "n": 361,+ "n": 364,"p25_sec": 180.0,"p50_sec": 240.0,"p75_sec": 300.0@@ -14417,7 +14831,7 @@"p75_sec": 600.0},"ltx|t2v|balanced|121.0|M5 Max|any": {- "n": 168,+ "n": 176,"p25_sec": 60.0,"p50_sec": 60.0,"p75_sec": 90.0@@ -14477,8 +14891,8 @@"p75_sec": 420.0},"ltx|t2v|balanced|169.0|M2 Max|any": {- "n": 10,- "p25_sec": 300.0,+ "n": 11,+ "p25_sec": 270.0,"p50_sec": 300.0,"p75_sec": 300.0},@@ -14536,6 +14950,12 @@"p50_sec": 240.0,"p75_sec": 405.0},+ "ltx|t2v|balanced|169.0|M6|any": {+ "n": 3,+ "p25_sec": 150.0,+ "p50_sec": 180.0,+ "p75_sec": 180.0+ },"ltx|t2v|balanced|193.0|M1 Max|any": {"n": 6,"p25_sec": 210.0,@@ -14621,7 +15041,7 @@"p75_sec": 900.0},"ltx|t2v|balanced|241.0|M4 Max|any": {- "n": 262,+ "n": 263,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -14633,13 +15053,13 @@"p75_sec": 600.0},"ltx|t2v|balanced|241.0|M4|any": {- "n": 21,+ "n": 26,"p25_sec": 600.0,"p50_sec": 900.0,"p75_sec": 1200.0},"ltx|t2v|balanced|241.0|M5 Max|any": {- "n": 56,+ "n": 57,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 240.0@@ -15053,8 +15473,8 @@"p75_sec": 1200.0},"ltx|t2v|high|241.0|M5 Max|any": {- "n": 18,- "p25_sec": 255.0,+ "n": 19,+ "p25_sec": 240.0,"p50_sec": 300.0,"p75_sec": 300.0},@@ -15154,14 +15574,20 @@"p50_sec": 180.0,"p75_sec": 180.0},+ "ltx|t2v|quick|113.0|M4 Max|any": {+ "n": 3,+ "p25_sec": 120.0,+ "p50_sec": 120.0,+ "p75_sec": 150.0+ },"ltx|t2v|quick|121.0|M1 Max|any": {- "n": 82,+ "n": 113,"p25_sec": 120.0,"p50_sec": 120.0,"p75_sec": 180.0},"ltx|t2v|quick|121.0|M1 Pro|any": {- "n": 16,+ "n": 17,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -15239,7 +15665,7 @@"p75_sec": 60.0},"ltx|t2v|quick|121.0|M5|any": {- "n": 54,+ "n": 56,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 300.0@@ -15557,7 +15983,7 @@"p75_sec": 60.0},"ltx|t2v|quick|73.0|M3 Ultra|any": {- "n": 38,+ "n": 41,"p25_sec": 30.0,"p50_sec": 30.0,"p75_sec": 45.0@@ -15581,7 +16007,7 @@"p75_sec": 600.0},"ltx|t2v|quick|73.0|M5 Max|any": {- "n": 19,+ "n": 21,"p25_sec": 30.0,"p50_sec": 30.0,"p75_sec": 45.0@@ -15719,19 +16145,19 @@"p75_sec": 300.0},"ltx|t2v|standard|121.0|M4|any": {- "n": 10,+ "n": 11,"p25_sec": 300.0,"p50_sec": 300.0,- "p75_sec": 390.0+ "p75_sec": 420.0},"ltx|t2v|standard|121.0|M5 Max|any": {- "n": 86,+ "n": 87,"p25_sec": 60.0,"p50_sec": 120.0,"p75_sec": 120.0},"ltx|t2v|standard|121.0|M5 Pro|any": {- "n": 22,+ "n": 24,"p25_sec": 60.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -15779,15 +16205,15 @@"p75_sec": 420.0},"ltx|t2v|standard|169.0|M5 Max|any": {- "n": 103,+ "n": 104,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 180.0},"ltx|t2v|standard|169.0|M5 Pro|any": {- "n": 12,- "p25_sec": 202.5,- "p50_sec": 270.0,+ "n": 22,+ "p25_sec": 180.0,+ "p50_sec": 240.0,"p75_sec": 300.0},"ltx|t2v|standard|217.0|M4 Max|any": {@@ -15857,9 +16283,9 @@"p75_sec": 600.0},"ltx|t2v|standard|241.0|M4|any": {- "n": 28,+ "n": 37,"p25_sec": 600.0,- "p50_sec": 600.0,+ "p50_sec": 900.0,"p75_sec": 900.0},"ltx|t2v|standard|241.0|M5 Max|any": {@@ -15869,10 +16295,10 @@"p75_sec": 465.0},"ltx|t2v|standard|241.0|M5 Pro|any": {- "n": 31,+ "n": 34,"p25_sec": 120.0,"p50_sec": 120.0,- "p75_sec": 240.0+ "p75_sec": 285.0},"ltx|t2v|standard|241.0|M5|any": {"n": 59,@@ -15880,6 +16306,12 @@"p50_sec": 300.0,"p75_sec": 420.0},+ "ltx|t2v|standard|241.0|M6|any": {+ "n": 3,+ "p25_sec": 240.0,+ "p50_sec": 240.0,+ "p75_sec": 240.0+ },"ltx|t2v|standard|25.0|M1 Ultra|any": {"n": 10,"p25_sec": 45.0,@@ -15947,7 +16379,7 @@"p75_sec": 240.0},"ltx|t2v|standard|73.0|M4 Max|any": {- "n": 20,+ "n": 21,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 300.0@@ -15970,6 +16402,12 @@"p50_sec": 75.0,"p75_sec": 90.0},+ "ltx|t2v|standard|73.0|M5 Pro|any": {+ "n": 4,+ "p25_sec": 56.2,+ "p50_sec": 60.0,+ "p75_sec": 60.0+ },"ltx|t2v|standard|73.0|M5|any": {"n": 9,"p25_sec": 90.0,@@ -16013,10 +16451,10 @@"model": {"cells": {"h3|i2v|draft_10s_dense|243.0|best": {- "n": 16,- "p25_sec": 975.0,+ "n": 48,+ "p25_sec": 900.0,"p50_sec": 1200.0,- "p75_sec": 2400.0+ "p75_sec": 1200.0},"h3|i2v|draft_10s_dense|243.0|fast": {"n": 24,@@ -16025,7 +16463,7 @@"p75_sec": 600.0},"h3|i2v|draft_10s|243.0|best": {- "n": 59,+ "n": 64,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -16043,13 +16481,13 @@"p75_sec": 2400.0},"h3|i2v|draft_15s|362.0|fast": {- "n": 69,+ "n": 70,"p25_sec": 300.0,"p50_sec": 420.0,"p75_sec": 900.0},"h3|i2v|draft_3s|73.0|best": {- "n": 109,+ "n": 110,"p25_sec": 120.0,"p50_sec": 240.0,"p75_sec": 420.0@@ -16061,9 +16499,9 @@"p75_sec": 180.0},"h3|i2v|draft_5s|124.0|best": {- "n": 95,- "p25_sec": 300.0,- "p50_sec": 600.0,+ "n": 123,+ "p25_sec": 240.0,+ "p50_sec": 420.0,"p75_sec": 600.0},"h3|i2v|draft_5s|124.0|fast": {@@ -16085,13 +16523,13 @@"p75_sec": 2400.0},"h3|i2v|high_10s|243.0|best": {- "n": 179,+ "n": 180,"p25_sec": 1800.0,"p50_sec": 2400.0,"p75_sec": 2400.0},"h3|i2v|high_10s|243.0|fast": {- "n": 167,+ "n": 173,"p25_sec": 900.0,"p50_sec": 1200.0,"p75_sec": 1200.0@@ -16103,7 +16541,7 @@"p75_sec": 5400.0},"h3|i2v|high_15s|362.0|fast": {- "n": 653,+ "n": 668,"p25_sec": 1200.0,"p50_sec": 1200.0,"p75_sec": 1200.0@@ -16115,9 +16553,9 @@"p75_sec": 420.0},"h3|i2v|high_3s|73.0|fast": {- "n": 163,+ "n": 188,"p25_sec": 120.0,- "p50_sec": 120.0,+ "p50_sec": 180.0,"p75_sec": 180.0},"h3|i2v|high_5s|124.0|best": {@@ -16127,10 +16565,10 @@"p75_sec": 1200.0},"h3|i2v|high_5s|124.0|fast": {- "n": 637,+ "n": 767,"p25_sec": 300.0,"p50_sec": 300.0,- "p75_sec": 600.0+ "p75_sec": 420.0},"h3|i2v|native_10s_dense|243.0|fast": {"n": 3,@@ -16175,10 +16613,10 @@"p75_sec": 600.0},"h3|i2v|native_5s|124.0|best": {- "n": 48,+ "n": 52,"p25_sec": 2400.0,- "p50_sec": 3600.0,- "p75_sec": 4500.0+ "p50_sec": 2400.0,+ "p75_sec": 3600.0},"h3|i2v|native_5s|124.0|fast": {"n": 38,@@ -16199,13 +16637,13 @@"p75_sec": 1200.0},"h3|i2v|standard_10s|243.0|best": {- "n": 151,- "p25_sec": 1200.0,+ "n": 159,+ "p25_sec": 975.0,"p50_sec": 1200.0,"p75_sec": 1200.0},"h3|i2v|standard_10s|243.0|fast": {- "n": 259,+ "n": 262,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -16241,7 +16679,7 @@"p75_sec": 900.0},"h3|i2v|standard_5s|124.0|fast": {- "n": 401,+ "n": 402,"p25_sec": 240.0,"p50_sec": 240.0,"p75_sec": 300.0@@ -16301,21 +16739,21 @@"p75_sec": 90.0},"h3|t2v|draft_3s|73.0|fast": {- "n": 200,+ "n": 204,"p25_sec": 60.0,- "p50_sec": 180.0,+ "p50_sec": 120.0,"p75_sec": 240.0},"h3|t2v|draft_5s|124.0|best": {- "n": 498,+ "n": 501,"p25_sec": 120.0,"p50_sec": 300.0,"p75_sec": 600.0},"h3|t2v|draft_5s|124.0|fast": {- "n": 217,+ "n": 222,"p25_sec": 120.0,- "p50_sec": 240.0,+ "p50_sec": 210.0,"p75_sec": 300.0},"h3|t2v|high_10s_dense|243.0|best": {@@ -16343,7 +16781,7 @@"p75_sec": 1650.0},"h3|t2v|high_15s|362.0|best": {- "n": 58,+ "n": 59,"p25_sec": 3600.0,"p50_sec": 5400.0,"p75_sec": 5400.0@@ -16367,7 +16805,7 @@"p75_sec": 240.0},"h3|t2v|high_5s|124.0|best": {- "n": 95,+ "n": 96,"p25_sec": 600.0,"p50_sec": 900.0,"p75_sec": 1800.0@@ -16415,20 +16853,20 @@"p75_sec": 1800.0},"h3|t2v|native_3s|73.0|fast": {- "n": 21,+ "n": 27,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0},"h3|t2v|native_5s|124.0|best": {- "n": 22,+ "n": 26,"p25_sec": 2400.0,"p50_sec": 2400.0,"p75_sec": 2400.0},"h3|t2v|native_5s|124.0|fast": {- "n": 21,- "p25_sec": 900.0,+ "n": 35,+ "p25_sec": 1050.0,"p50_sec": 1200.0,"p75_sec": 1800.0},@@ -16445,7 +16883,7 @@"p75_sec": 675.0},"h3|t2v|standard_10s|243.0|best": {- "n": 75,+ "n": 76,"p25_sec": 900.0,"p50_sec": 2400.0,"p75_sec": 2400.0@@ -16475,13 +16913,13 @@"p75_sec": 555.0},"h3|t2v|standard_3s|73.0|fast": {- "n": 97,+ "n": 99,"p25_sec": 60.0,"p50_sec": 90.0,"p75_sec": 240.0},"h3|t2v|standard_5s|124.0|best": {- "n": 168,+ "n": 170,"p25_sec": 300.0,"p50_sec": 600.0,"p75_sec": 1200.0@@ -16511,16 +16949,16 @@"p75_sec": 765.0},"ltx|a2v|balanced|121.0|any": {- "n": 84,+ "n": 85,"p25_sec": 300.0,"p50_sec": 420.0,"p75_sec": 420.0},"ltx|a2v|balanced|129.0|any": {- "n": 8,- "p25_sec": 112.5,- "p50_sec": 270.0,- "p75_sec": 465.0+ "n": 10,+ "p25_sec": 120.0,+ "p50_sec": 420.0,+ "p75_sec": 555.0},"ltx|a2v|balanced|137.0|any": {"n": 15,@@ -16535,26 +16973,26 @@"p75_sec": 600.0},"ltx|a2v|balanced|153.0|any": {- "n": 4,+ "n": 8,"p25_sec": 120.0,- "p50_sec": 120.0,- "p75_sec": 240.0+ "p50_sec": 600.0,+ "p75_sec": 600.0},"ltx|a2v|balanced|161.0|any": {- "n": 7,- "p25_sec": 270.0,+ "n": 9,+ "p25_sec": 420.0,"p50_sec": 600.0,"p75_sec": 600.0},"ltx|a2v|balanced|169.0|any": {- "n": 8,+ "n": 9,"p25_sec": 120.0,- "p50_sec": 360.0,+ "p50_sec": 600.0,"p75_sec": 600.0},"ltx|a2v|balanced|177.0|any": {- "n": 5,- "p25_sec": 120.0,+ "n": 6,+ "p25_sec": 195.0,"p50_sec": 420.0,"p75_sec": 420.0},@@ -16685,7 +17123,7 @@"p75_sec": 1215.0},"ltx|a2v|high|169.0|any": {- "n": 176,+ "n": 179,"p25_sec": 300.0,"p50_sec": 420.0,"p75_sec": 900.0@@ -16697,19 +17135,19 @@"p75_sec": 420.0},"ltx|a2v|high|193.0|any": {- "n": 22,- "p25_sec": 360.0,- "p50_sec": 600.0,+ "n": 35,+ "p25_sec": 600.0,+ "p50_sec": 900.0,"p75_sec": 1200.0},"ltx|a2v|high|217.0|any": {- "n": 27,- "p25_sec": 465.0,+ "n": 38,+ "p25_sec": 600.0,"p50_sec": 600.0,- "p75_sec": 1125.0+ "p75_sec": 900.0},"ltx|a2v|high|241.0|any": {- "n": 103,+ "n": 109,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 1200.0@@ -16799,10 +17237,10 @@"p75_sec": 5400.0},"ltx|a2v|high|73.0|any": {- "n": 17,- "p25_sec": 165.0,- "p50_sec": 270.0,- "p75_sec": 675.0+ "n": 18,+ "p25_sec": 180.0,+ "p50_sec": 300.0,+ "p75_sec": 900.0},"ltx|a2v|high|81.0|any": {"n": 7,@@ -16823,10 +17261,10 @@"p75_sec": 1200.0},"ltx|a2v|quick|241.0|any": {- "n": 8,- "p25_sec": 495.0,- "p50_sec": 900.0,- "p75_sec": 1200.0+ "n": 15,+ "p25_sec": 120.0,+ "p50_sec": 180.0,+ "p75_sec": 900.0},"ltx|a2v|standard|105.0|any": {"n": 6,@@ -16835,28 +17273,28 @@"p75_sec": 600.0},"ltx|a2v|standard|121.0|any": {- "n": 6,- "p25_sec": 135.0,- "p50_sec": 180.0,- "p75_sec": 495.0+ "n": 9,+ "p25_sec": 180.0,+ "p50_sec": 300.0,+ "p75_sec": 300.0},"ltx|a2v|standard|129.0|any": {- "n": 4,+ "n": 5,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0},"ltx|a2v|standard|137.0|any": {- "n": 3,- "p25_sec": 600.0,- "p50_sec": 600.0,- "p75_sec": 1200.0+ "n": 6,+ "p25_sec": 300.0,+ "p50_sec": 450.0,+ "p75_sec": 600.0},"ltx|a2v|standard|145.0|any": {- "n": 16,+ "n": 18,"p25_sec": 600.0,"p50_sec": 600.0,- "p75_sec": 1800.0+ "p75_sec": 1575.0},"ltx|a2v|standard|153.0|any": {"n": 5,@@ -16871,10 +17309,10 @@"p75_sec": 900.0},"ltx|a2v|standard|169.0|any": {- "n": 8,- "p25_sec": 900.0,- "p50_sec": 1050.0,- "p75_sec": 1800.0+ "n": 12,+ "p25_sec": 420.0,+ "p50_sec": 900.0,+ "p75_sec": 1350.0},"ltx|a2v|standard|177.0|any": {"n": 6,@@ -16889,8 +17327,8 @@"p75_sec": 2400.0},"ltx|a2v|standard|241.0|any": {- "n": 55,- "p25_sec": 1200.0,+ "n": 76,+ "p25_sec": 825.0,"p50_sec": 1200.0,"p75_sec": 1200.0},@@ -16901,14 +17339,14 @@"p75_sec": 195.0},"ltx|a2v|standard|97.0|any": {- "n": 28,- "p25_sec": 555.0,+ "n": 32,+ "p25_sec": 390.0,"p50_sec": 600.0,"p75_sec": 600.0},"ltx|extend|balanced|121.0|any": {- "n": 42,- "p25_sec": 675.0,+ "n": 43,+ "p25_sec": 750.0,"p50_sec": 1200.0,"p75_sec": 1800.0},@@ -16955,49 +17393,55 @@"p75_sec": 60.0},"ltx|i2v|balanced|121.0|any": {- "n": 3269,+ "n": 3338,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 300.0},"ltx|i2v|balanced|137.0|any": {- "n": 5,+ "n": 6,"p25_sec": 120.0,"p50_sec": 120.0,- "p75_sec": 180.0+ "p75_sec": 150.0},"ltx|i2v|balanced|145.0|any": {- "n": 338,+ "n": 346,"p25_sec": 180.0,- "p50_sec": 300.0,+ "p50_sec": 240.0,"p75_sec": 300.0},+ "ltx|i2v|balanced|153.0|any": {+ "n": 3,+ "p25_sec": 105.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0+ },"ltx|i2v|balanced|161.0|any": {- "n": 5,+ "n": 6,"p25_sec": 120.0,- "p50_sec": 120.0,+ "p50_sec": 270.0,"p75_sec": 420.0},"ltx|i2v|balanced|169.0|any": {- "n": 682,+ "n": 721,"p25_sec": 120.0,"p50_sec": 300.0,"p75_sec": 420.0},"ltx|i2v|balanced|177.0|any": {- "n": 3,- "p25_sec": 300.0,+ "n": 5,+ "p25_sec": 180.0,"p50_sec": 300.0,"p75_sec": 300.0},"ltx|i2v|balanced|185.0|any": {- "n": 7,+ "n": 9,"p25_sec": 300.0,- "p50_sec": 420.0,+ "p50_sec": 300.0,"p75_sec": 600.0},"ltx|i2v|balanced|193.0|any": {- "n": 268,+ "n": 270,"p25_sec": 300.0,"p50_sec": 420.0,"p75_sec": 420.0@@ -17015,10 +17459,10 @@"p75_sec": 420.0},"ltx|i2v|balanced|241.0|any": {- "n": 2924,+ "n": 2987,"p25_sec": 240.0,"p50_sec": 300.0,- "p75_sec": 420.0+ "p75_sec": 555.0},"ltx|i2v|balanced|25.0|any": {"n": 6,@@ -17027,7 +17471,7 @@"p75_sec": 56.2},"ltx|i2v|balanced|289.0|any": {- "n": 44,+ "n": 45,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 420.0@@ -17057,20 +17501,26 @@"p75_sec": 600.0},"ltx|i2v|balanced|481.0|any": {- "n": 180,+ "n": 181,"p25_sec": 300.0,"p50_sec": 300.0,"p75_sec": 300.0},"ltx|i2v|balanced|49.0|any": {- "n": 77,+ "n": 78,"p25_sec": 90.0,"p50_sec": 90.0,"p75_sec": 120.0},+ "ltx|i2v|balanced|57.0|any": {+ "n": 3,+ "p25_sec": 75.0,+ "p50_sec": 90.0,+ "p75_sec": 135.0+ },"ltx|i2v|balanced|65.0|any": {- "n": 9,- "p25_sec": 180.0,+ "n": 11,+ "p25_sec": 90.0,"p50_sec": 180.0,"p75_sec": 180.0},@@ -17081,19 +17531,19 @@"p75_sec": 1800.0},"ltx|i2v|balanced|73.0|any": {- "n": 430,+ "n": 461,"p25_sec": 90.0,"p50_sec": 90.0,"p75_sec": 120.0},"ltx|i2v|balanced|81.0|any": {- "n": 25,+ "n": 26,"p25_sec": 60.0,- "p50_sec": 60.0,- "p75_sec": 180.0+ "p50_sec": 75.0,+ "p75_sec": 165.0},"ltx|i2v|balanced|97.0|any": {- "n": 93,+ "n": 96,"p25_sec": 90.0,"p50_sec": 120.0,"p75_sec": 240.0@@ -17110,11 +17560,17 @@"p50_sec": 420.0,"p75_sec": 600.0},+ "ltx|i2v|high_720p|193.0|any": {+ "n": 3,+ "p25_sec": 1800.0,+ "p50_sec": 1800.0,+ "p75_sec": 1800.0+ },"ltx|i2v|high_720p|241.0|any": {- "n": 25,+ "n": 33,"p25_sec": 1200.0,"p50_sec": 1200.0,- "p75_sec": 1200.0+ "p75_sec": 2400.0},"ltx|i2v|high|113.0|any": {"n": 35,@@ -17123,7 +17579,7 @@"p75_sec": 180.0},"ltx|i2v|high|121.0|any": {- "n": 451,+ "n": 452,"p25_sec": 180.0,"p50_sec": 240.0,"p75_sec": 420.0@@ -17147,7 +17603,7 @@"p75_sec": 600.0},"ltx|i2v|high|241.0|any": {- "n": 325,+ "n": 341,"p25_sec": 420.0,"p50_sec": 600.0,"p75_sec": 900.0@@ -17213,37 +17669,43 @@"p75_sec": 420.0},"ltx|i2v|quick|113.0|any": {- "n": 7,- "p25_sec": 150.0,- "p50_sec": 180.0,- "p75_sec": 270.0+ "n": 11,+ "p25_sec": 60.0,+ "p50_sec": 120.0,+ "p75_sec": 210.0},"ltx|i2v|quick|121.0|any": {- "n": 503,+ "n": 514,"p25_sec": 90.0,"p50_sec": 120.0,"p75_sec": 240.0},"ltx|i2v|quick|129.0|any": {- "n": 6,+ "n": 9,"p25_sec": 60.0,"p50_sec": 60.0,- "p75_sec": 195.0+ "p75_sec": 60.0},"ltx|i2v|quick|145.0|any": {- "n": 4,- "p25_sec": 180.0,- "p50_sec": 180.0,+ "n": 8,+ "p25_sec": 60.0,+ "p50_sec": 90.0,"p75_sec": 180.0},+ "ltx|i2v|quick|153.0|any": {+ "n": 3,+ "p25_sec": 195.0,+ "p50_sec": 300.0,+ "p75_sec": 360.0+ },"ltx|i2v|quick|169.0|any": {- "n": 79,+ "n": 84,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 240.0},"ltx|i2v|quick|241.0|any": {- "n": 298,+ "n": 326,"p25_sec": 180.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -17279,7 +17741,7 @@"p75_sec": 60.0},"ltx|i2v|quick|481.0|any": {- "n": 225,+ "n": 241,"p25_sec": 180.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -17291,37 +17753,67 @@"p75_sec": 180.0},"ltx|i2v|quick|73.0|any": {- "n": 282,+ "n": 284,"p25_sec": 60.0,"p50_sec": 120.0,"p75_sec": 300.0},+ "ltx|i2v|quick|81.0|any": {+ "n": 7,+ "p25_sec": 45.0,+ "p50_sec": 45.0,+ "p75_sec": 90.0+ },+ "ltx|i2v|quick|89.0|any": {+ "n": 4,+ "p25_sec": 45.0,+ "p50_sec": 52.5,+ "p75_sec": 90.0+ },"ltx|i2v|quick|97.0|any": {- "n": 41,+ "n": 45,"p25_sec": 15.0,- "p50_sec": 15.0,+ "p50_sec": 60.0,"p75_sec": 300.0},"ltx|i2v|standard|121.0|any": {- "n": 1409,+ "n": 1457,"p25_sec": 180.0,"p50_sec": 240.0,"p75_sec": 300.0},+ "ltx|i2v|standard|129.0|any": {+ "n": 3,+ "p25_sec": 60.0,+ "p50_sec": 60.0,+ "p75_sec": 90.0+ },"ltx|i2v|standard|137.0|any": {- "n": 4,- "p25_sec": 120.0,- "p50_sec": 120.0,+ "n": 9,+ "p25_sec": 60.0,+ "p50_sec": 60.0,"p75_sec": 120.0},"ltx|i2v|standard|145.0|any": {- "n": 97,+ "n": 99,"p25_sec": 120.0,"p50_sec": 300.0,"p75_sec": 300.0},+ "ltx|i2v|standard|153.0|any": {+ "n": 8,+ "p25_sec": 90.0,+ "p50_sec": 90.0,+ "p75_sec": 97.5+ },+ "ltx|i2v|standard|161.0|any": {+ "n": 4,+ "p25_sec": 90.0,+ "p50_sec": 90.0,+ "p75_sec": 292.5+ },"ltx|i2v|standard|169.0|any": {- "n": 846,+ "n": 855,"p25_sec": 180.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -17351,7 +17843,7 @@"p75_sec": 690.0},"ltx|i2v|standard|241.0|any": {- "n": 1733,+ "n": 1750,"p25_sec": 420.0,"p50_sec": 420.0,"p75_sec": 600.0@@ -17369,7 +17861,7 @@"p75_sec": 172.5},"ltx|i2v|standard|289.0|any": {- "n": 75,+ "n": 78,"p25_sec": 600.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -17429,25 +17921,25 @@"p75_sec": 90.0},"ltx|i2v|standard|73.0|any": {- "n": 343,+ "n": 352,"p25_sec": 60.0,"p50_sec": 120.0,"p75_sec": 180.0},"ltx|i2v|standard|81.0|any": {- "n": 25,+ "n": 33,"p25_sec": 45.0,"p50_sec": 45.0,"p75_sec": 45.0},"ltx|i2v|standard|89.0|any": {- "n": 5,- "p25_sec": 60.0,+ "n": 9,+ "p25_sec": 45.0,"p50_sec": 60.0,"p75_sec": 60.0},"ltx|i2v|standard|97.0|any": {- "n": 119,+ "n": 122,"p25_sec": 90.0,"p50_sec": 120.0,"p75_sec": 120.0@@ -17477,7 +17969,7 @@"p75_sec": 180.0},"ltx|keyframe|balanced|73.0|any": {- "n": 36,+ "n": 37,"p25_sec": 120.0,"p50_sec": 300.0,"p75_sec": 420.0@@ -17591,16 +18083,16 @@"p75_sec": 900.0},"ltx|keyframe|standard|121.0|any": {- "n": 20,+ "n": 24,"p25_sec": 180.0,"p50_sec": 300.0,- "p75_sec": 420.0+ "p75_sec": 600.0},"ltx|keyframe|standard|169.0|any": {- "n": 11,- "p25_sec": 675.0,- "p50_sec": 1050.0,- "p75_sec": 1650.0+ "n": 15,+ "p25_sec": 900.0,+ "p50_sec": 900.0,+ "p75_sec": 1200.0},"ltx|keyframe|standard|193.0|any": {"n": 9,@@ -17633,7 +18125,7 @@"p75_sec": 180.0},"ltx|keyframe|standard|73.0|any": {- "n": 46,+ "n": 51,"p25_sec": 180.0,"p50_sec": 180.0,"p75_sec": 240.0@@ -17645,13 +18137,13 @@"p75_sec": 300.0},"ltx|t2v|balanced|113.0|any": {- "n": 7,- "p25_sec": 75.0,- "p50_sec": 90.0,- "p75_sec": 90.0+ "n": 17,+ "p25_sec": 90.0,+ "p50_sec": 120.0,+ "p75_sec": 120.0},"ltx|t2v|balanced|121.0|any": {- "n": 2675,+ "n": 2701,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 240.0@@ -17669,7 +18161,7 @@"p75_sec": 90.0},"ltx|t2v|balanced|169.0|any": {- "n": 214,+ "n": 217,"p25_sec": 120.0,"p50_sec": 240.0,"p75_sec": 300.0@@ -17687,7 +18179,7 @@"p75_sec": 420.0},"ltx|t2v|balanced|241.0|any": {- "n": 1018,+ "n": 1025,"p25_sec": 180.0,"p50_sec": 300.0,"p75_sec": 600.0@@ -17729,7 +18221,7 @@"p75_sec": 900.0},"ltx|t2v|balanced|49.0|any": {- "n": 45,+ "n": 46,"p25_sec": 45.0,"p50_sec": 60.0,"p75_sec": 90.0@@ -17764,6 +18256,12 @@"p50_sec": 120.0,"p75_sec": 120.0},+ "ltx|t2v|draft|49.0|any": {+ "n": 3,+ "p25_sec": 15.0,+ "p50_sec": 15.0,+ "p75_sec": 67.5+ },"ltx|t2v|high_720p|121.0|any": {"n": 14,"p25_sec": 510.0,@@ -17819,7 +18317,7 @@"p75_sec": 600.0},"ltx|t2v|high|241.0|any": {- "n": 206,+ "n": 207,"p25_sec": 600.0,"p50_sec": 900.0,"p75_sec": 1200.0@@ -17878,8 +18376,14 @@"p50_sec": 180.0,"p75_sec": 180.0},+ "ltx|t2v|quick|113.0|any": {+ "n": 3,+ "p25_sec": 120.0,+ "p50_sec": 120.0,+ "p75_sec": 150.0+ },"ltx|t2v|quick|121.0|any": {- "n": 934,+ "n": 968,"p25_sec": 60.0,"p50_sec": 120.0,"p75_sec": 180.0@@ -17945,10 +18449,10 @@"p75_sec": 210.0},"ltx|t2v|quick|41.0|any": {- "n": 3,- "p25_sec": 7.5,+ "n": 4,+ "p25_sec": 11.2,"p50_sec": 15.0,- "p75_sec": 22.5+ "p75_sec": 18.8},"ltx|t2v|quick|481.0|any": {"n": 133,@@ -17963,7 +18467,7 @@"p75_sec": 82.5},"ltx|t2v|quick|73.0|any": {- "n": 379,+ "n": 384,"p25_sec": 60.0,"p50_sec": 90.0,"p75_sec": 120.0@@ -17975,7 +18479,7 @@"p75_sec": 120.0},"ltx|t2v|standard|121.0|any": {- "n": 727,+ "n": 731,"p25_sec": 120.0,"p50_sec": 240.0,"p75_sec": 420.0@@ -17987,10 +18491,10 @@"p75_sec": 240.0},"ltx|t2v|standard|169.0|any": {- "n": 163,+ "n": 174,"p25_sec": 180.0,"p50_sec": 180.0,- "p75_sec": 300.0+ "p75_sec": 270.0},"ltx|t2v|standard|217.0|any": {"n": 31,@@ -17999,7 +18503,7 @@"p75_sec": 600.0},"ltx|t2v|standard|241.0|any": {- "n": 767,+ "n": 781,"p25_sec": 300.0,"p50_sec": 600.0,"p75_sec": 600.0@@ -18023,7 +18527,7 @@"p75_sec": 600.0},"ltx|t2v|standard|361.0|any": {- "n": 297,+ "n": 298,"p25_sec": 240.0,"p50_sec": 240.0,"p75_sec": 240.0@@ -18047,7 +18551,7 @@"p75_sec": 300.0},"ltx|t2v|standard|73.0|any": {- "n": 83,+ "n": 88,"p25_sec": 120.0,"p50_sec": 180.0,"p75_sec": 180.0@@ -18078,7 +18582,7 @@"keyframe"],"schema": "fleet_timings/1",- "total_events_counted": 103692,+ "total_events_counted": 106665,"wall_sec": "bucket_lower_edge","window_days": 75}diff --git a/docs/ANALYTICS.md b/docs/ANALYTICS.mdindex 383b8f0..c8387b1 100644--- a/docs/ANALYTICS.md+++ b/docs/ANALYTICS.md@@ -224,6 +224,9 @@ including image and training jobs.| `character_used` | bool | `true` | A cast character drove this render || `audio_mode` | string | `"joint"` | `joint` / `none` (external audio replaces the generated track) / `a2v_dub` / `h3_native` || `first_render` | bool | `true` | Present once per install, on its first successful render ever — the activation funnel without a join |+| `gpu_steps` | string | `"short"` | 4.17.5 — present only when the render ran in **short GPU steps** (one Metal op per command buffer), the path a macOS GPU-watchdog kill switches a setting to. Closed vocabulary: `short`. Absent = default steps. Answers "does the short path stop the watchdog loop" |+| `watchdog_retry` | bool | `true` | 4.17.5 — present only when a GPU-watchdog kill was re-run inside the same job (once, on short steps). On `render_completed` it means the retry saved the render |+| `watchdog_phase` | string | `"load"` | 4.17.5 — present only when macOS's GPU watchdog stopped this job (on `render_completed`, the run that was then re-run): which phase the GPU was in, from the helper's own step lines. **Closed vocabulary**: `encode` (Gemma prompt encoding), `load` (the transformer loading), `denoise`, `decode` || `source` | string | `"storyboard"` | v4.9.7 — which surface queued the job. **Closed vocabulary**: `form`, `batch`, `storyboard`, `characters`, `image_studio`, `retry`, `api`, `chain` (an Upscale ×2 queued automatically behind an H3 draft), `unknown`. Makes "how much of the rendering is Storyboard" a one-click breakdown |### `render_failed`@@ -314,15 +317,16 @@ said nothing, so *"they tried and it was broken"* and *"they looked and left"*were the same shape in the data. These events tell those apart.**At most one event per step per install, ever** — with one deliberate-exception: `engine_env` reports again when its answer *changes*, because a-broken environment that gets repaired is the most useful transition on this-event. This is not a heartbeat and the panel still has none.+exception: `engine_env` reports again when its answer *changes* (outcome, or+from 4.17.5 the `cause` of a failure), because a broken environment that gets+repaired is the most useful transition on this event. This is not a heartbeat and the panel still has none.| prop | type | example | why ||---|---|---|---|| `step` | string | `"engine_env"` | **Closed vocabulary**: `first_boot` (the panel came up), `engine_env` (its Python environment can run a render), `weights_check` (the base model is on disk), `first_queue` (a job reached the worker — someone pressed Render) || `outcome` | string | `"failed"` | **Closed vocabulary**: `started`, `ok`, `failed`, `skipped` || `error_class` | string | `"venv_broken"` | Only on `failed`, and only from the same closed taxonomy `render_failed` uses |+| `cause` | string | `"network"` | 4.17.5 — only on a failed `engine_env`: WHY, one word. **Closed vocabulary**: `network` (a package server could not be reached), `timeout` (downloads timed out), `disk` (disk full), `uv_error` (the package tool could not resolve or build), `python_missing` (the venv's Python does not run), `installing` (Pinokio's Install was still writing the venv when the panel looked - reported again when it finishes), `other`, `unknown` (no installer record: an install that stopped before the engine step, or one older than 4.17.5). Read from the installer's own record (`ltx-2-mlx/env/.phosphene_engine_result.json`, written by `scripts/pinokio/ltx_engine_env.sh` in these words via `install_cause.sh`) - never from its output text || `version` | string | `"4.16.0"` | The build that reported it || `ram_gb` | int | `16` | SYS-16: lets `first_queue` (this event) be sliced the same way `render_completed`'s `first_render` already is — the reviewer's finding was that activation is LOWEST on the machines that struggle most (36 GB 53%, 8 GB 57%, 16 GB 63%), and answering "first_queue vs first_render, per tier" needed this on both events, not a join against `app_boot` by install_id |@@ -344,6 +348,11 @@ emits nothing at all.The panel records the version you pressed Update *on* (one string, in localsettings) and reads it on the next boot: a different version means it landed,the same version means it didn't. The marker is cleared when it is read.+4.17.5: the marker also carries the build's SHA (`4.17.4@<sha>`), so a new+build under the same VERSION counts as landed; and an in-panel Update whose+pull moved nothing ("Already up to date") clears the marker instead of asking+for a restart - the two false `restart_pending` failures on 4.17.4 were people+pressing Update on the build they already ran.| prop | type | example | why ||---|---|---|---|@@ -368,6 +377,7 @@ for a waiting job, or from the form's Install button) when they finish.| `outcome` | string | `"failed"` | **Closed vocabulary**: `ok`, `failed` || `via` | string | `"update"` | **Closed vocabulary**: `install` (install.js), `update` (the Pinokio Update), `panel_boot` (the panel found it missing at start-up), `panel_job` (a voice-only job needed it), `panel_form` (the Lip-sync form's Install / Try again) || `error_class` | string | `"pip_failed"` | Only on `failed`. **Closed vocabulary**: `no_venv`, `pip_failed`, `import_failed`, `weights_failed` (the package works, the 80 MB model did not download - it downloads on first use), `timeout`, `spawn_failed`, `other` |+| `cause` | string | `"network"` | 4.17.5 — only on `failed`, when the installer recorded why: the same closed words as `install_step.cause` (`network`, `timeout`, `disk`, `uv_error`, `python_missing`, `other`). `a2v_stems_deps.sh` now retries a network/timeout package failure 3 times and the model download 4 times (resuming) before it reports one || `ready` | bool | `true` | Whether a voice-only render can run now || `weights` | bool | `false` | Whether the separator's model is on disk || `version` | string | `"4.17.4"` | The build that reported it |diff --git a/mlx_ltx_panel.py b/mlx_ltx_panel.pyindex 42b5ae6..40d5266 100644--- a/mlx_ltx_panel.py+++ b/mlx_ltx_panel.py@@ -284,6 +284,52 @@ def _engine_install_running() -> bool:return True+#: 4.17.5 - why the engine environment is not usable, in one closed word.+#: The installer's own words (scripts/pinokio/install_cause.sh) plus the two+#: the panel can see for itself. docs/ANALYTICS.md, install_step.cause.+ENGINE_ENV_CAUSES = ("network", "disk", "uv_error", "python_missing", "timeout",+ "installing", "other", "unknown")+ENGINE_ENV_RESULT_NAME = ".phosphene_engine_result.json"+++def engine_env_record() -> dict | None:+ """What ltx_engine_env.sh wrote on its last finished run, or None."""+ try:+ rec = json.loads((HELPER_PYTHON.parent.parent / ENGINE_ENV_RESULT_NAME)+ .read_text(encoding="utf-8"))+ return rec if isinstance(rec, dict) else None+ except (OSError, ValueError):+ return None+++def engine_env_cause() -> str:+ """Why the engine venv cannot render, in ENGINE_ENV_CAUSES. Only meaningful+ while engine_env_fault() is non-empty.++ An installer still running wins (a first boot during Install is the usual+ way a fresh install reports a broken venv - two of the four 4.17.4 cases);+ then a missing interpreter, which the panel sees directly; then the+ installer's record of its own last failure; else "unknown" (an install+ that stopped before the engine step, or one older than 4.17.5)."""+ try:+ if _engine_install_running():+ return "installing"+ if not HELPER_PYTHON.is_file():+ return "python_missing"+ rec = engine_env_record() or {}+ cause = str(rec.get("cause") or "")+ if rec.get("outcome") == "failed" and cause in ENGINE_ENV_CAUSES:+ return cause+ except Exception: # noqa: BLE001+ pass+ return "unknown"+++#: Whether the last engine_env_status() saw an installer running - so the panel+#: reports engine_env again when an Install that was mid-way at boot finishes.+_ENGINE_ENV_WATCH = {"installing": None}++def engine_env_status() -> dict:"""/status.engine_env: can a render start, and if not, what is happening."""fault = engine_env_fault()@@ -293,9 +339,24 @@ def engine_env_status() -> dict:# NOT ready while an installer is still writing the venv, even once the# package directory has appeared (Codex 4.17.4 #1): the --reinstall pass# and the codec patch come after it.- installing = bool(repair.get("active")) or _engine_install_running()- return {"ok": not fault and not installing, "fault": fault,- "installing": installing, "repair": repair}+ external = _engine_install_running()+ installing = bool(repair.get("active")) or external+ # An Install that was running when the panel booted reported engine_env+ # "failed" (cause installing). When it finishes, say how it ended - the+ # funnel otherwise keeps that install as broken until its next boot. Only+ # Pinokio's Install (its lock file): the panel's own Repair reports itself.+ was = _ENGINE_ENV_WATCH.get("installing")+ _ENGINE_ENV_WATCH["installing"] = external+ if was and not external and not repair.get("active"):+ _analytics_install_step(+ "engine_env", "failed" if fault else "ok",+ _analytics_error_class(fault) if fault else "",+ cause=engine_env_cause() if fault else "")+ out = {"ok": not fault and not installing, "fault": fault,+ "installing": installing, "repair": repair}+ if fault and not installing:+ out["cause"] = engine_env_cause()+ return outdef engine_env_busy() -> str:@@ -379,7 +440,8 @@ def _engine_env_repair_thread() -> None:push("[engine] " + (f"repair failed: {error}" if errorelse "engine environment repaired - renders can run"))_analytics_install_step("engine_env", "failed" if fault else "ok",- "venv_broken" if fault else "")+ "venv_broken" if fault else "",+ cause=engine_env_cause() if fault else "")if not HELPER_PYTHON.is_file():sys.stderr.write(@@ -521,6 +583,20 @@ def _resolve_ffprobe(ffmpeg: Path) -> Path:FFMPEG = _resolve_ffmpeg()FFMPEG_BIN = FFMPEG.parentFFPROBE = _resolve_ffprobe(FFMPEG)+++def media_tool_path(path: str = "") -> str:+ """PATH for a child process that shells out to ffmpeg AND ffprobe.++ 4.17.5 (fleet): a Control export died with "ffprobe not found on PATH" -+ the engine library looks both tools up on PATH, and every child spawn+ prepended only FFMPEG's folder. When ffprobe was resolved from another+ folder (above) the child could not see it, though the panel had found it."""+ dirs = [str(FFMPEG_BIN)]+ if FFPROBE.exists() and str(FFPROBE.parent) not in dirs:+ dirs.append(str(FFPROBE.parent))+ rest = [d for d in (path or "").split(":") if d and d not in dirs]+ return ":".join(dirs + rest)# Say it at boot, the way a missing helper venv is said above: an export that# dies 20 minutes into a render is a terrible place to learn this.if FFMPEG_NOTE:@@ -5255,6 +5331,18 @@ def _check_remote_once() -> None:f"https://raw.githubusercontent.com/{_VERSION_REPO_OWNER}/"f"{_VERSION_REPO_NAME}/main/VERSION")+ # 4.17.5 (fleet): "Phosphene 4.17.4 is out - you're on 4.17.4". A local+ # HEAD that is not among public main's commits (a local merge or commit+ # on main, a re-made history) read as "30+ behind" even when the tree+ # already IS the latest release - and the pop-up asked people to update+ # to the build they run. Public main bumps VERSION on every release, so+ # an unknown SHA carrying the remote's own VERSION is not behind.+ with _VERSION_LOCK:+ _local_v = (_VERSION_STATE.get("local_version") or "").strip()+ same_release = bool(more and remote_version and _local_v+ and remote_version.strip() == _local_v)+ if same_release:+ behind_by, more, ahead = 0, False, []# The maintainer broadcast rides the same 30-min cadence. Failures and# absence read as "no message" — _fetch_broadcast never raises.broadcast = _fetch_broadcast()@@ -5264,6 +5352,7 @@ def _check_remote_once() -> None:_VERSION_STATE["remote_version"] = remote_version_VERSION_STATE["behind_by"] = behind_by_VERSION_STATE["behind_more_than"] = more+ _VERSION_STATE["local_unlisted_same_release"] = same_release_VERSION_STATE["commits_ahead"] = ahead_VERSION_STATE["checked_ts"] = time.time()_VERSION_STATE["error"] = None@@ -5325,6 +5414,7 @@ def get_version_state() -> dict:snap["disk_version"] = _read_local_version()snap["stale_process"] = bool(disk_sha and boot["sha"] and disk_sha != boot["sha"])+ snap["post_update"] = post_update_status()return snap@@ -10063,6 +10153,173 @@ def m1_m2_long_clip_watchdog_refusal(mode: str, quality: str, model_frames: int))+# ---- THE METAL WATCHDOG LOOP (4.17.5) ---------------------------------------+# Fleet 4.17.4: one M1 Max 32 GB install rendered LTX Standard 768x448 121f+# i2v (Sharp x2) from the form 50 times in 15 h and macOS's GPU watchdog+# killed 48 of them ~30 s in (SIGABRT, kIOGPUCommandBufferCallbackErrorTimeout),+# while every Retry of the same job succeeded (33 of 33). An M2 Max 96 GB+# (keyframe) and an M2 Pro 32 GB (Balanced t2v) hit it too. Nothing made the+# next attempt different, and nothing stopped the loop.+#+# What the watchdog times is ONE Metal command buffer. MLX packs ops into a+# buffer until it holds max_ops_per_buffer ops or max_mb_per_buffer MB of+# inputs (mlx/backend/metal/device.cpp: 50 ops / 50 MB on Max-class GPUs,+# 40/40 on base/Pro), and exposes both as env vars, MLX_MAX_OPS_PER_BUFFER /+# MLX_MAX_MB_PER_BUFFER. The same buffer that an M4 finishes in time runs+# 2-4x longer on an M1/M2 (and longer still when the Mac pages under memory+# pressure, which scales with the bytes the buffer touches). The VAE decode of+# a clip at or under 121 frames is ONE graph with no stage barriers at all+# (upstream tiles only past an 8 GB budget). So:+#+# 1. M1/M2-class GPUs always spawn the helper with smaller buffers+# (GPU_STEPS_M1M2) - command-buffer boundaries do not change any kernel,+# so the output is bit-identical; the cost was measured on this Mac+# (fleet_4175.txt).+# 2. A watchdog kill re-runs THAT job once, at once, on SHORT steps+# (GPU_STEPS_SHORT: one op per command buffer, the decode's one big graph+# included, and - when it died in prompt encoding - the shorter Gemma+# encode #44 already had), with one line in the log saying why. Nothing+# was delivered yet, so nothing is lost but the time to the kill.+# 3. The setting (engine, mode, quality, canvas, length) is remembered in+# state/metal_watchdog.json: its next run STARTS on short steps.+# 4. If short steps are killed too, that setting is refused up front on+# this Mac (render_refused hardware_tier, the way out in the sentence)+# for 24 hours or until the next update. Two failures, never fifty.+METAL_WATCHDOG_FILE = STATE_DIR / "metal_watchdog.json"+METAL_WATCHDOG_REFUSE_SEC = 24 * 3600+_METAL_WATCHDOG_LOCK = threading.Lock()+#: M1/M2: buffers a fifth of MLX's Max-class default (bit-identical output).+GPU_STEPS_M1M2 = {"MLX_MAX_OPS_PER_BUFFER": "10", "MLX_MAX_MB_PER_BUFFER": "10"}+#: The short path after a kill: every Metal op in a command buffer of its own+#: (the VAE decode's single graph included), still bit-identical output.+GPU_STEPS_SHORT = {"MLX_MAX_OPS_PER_BUFFER": "1", "MLX_MAX_MB_PER_BUFFER": "1"}+#: Closed vocabulary for render_*.watchdog_phase (docs/ANALYTICS.md).+WATCHDOG_PHASES = ("encode", "load", "denoise", "decode")+GPU_STEPS_NOTE = ("short GPU steps: macOS's GPU watchdog stopped this setting "+ "before on this Mac, so it renders in smaller pieces (a "+ "little slower)")+++def gpu_steps_m1m2() -> bool:+ """Is this an M1/M2-class GPU (the watchdog generation)?"""+ return _hw_chip_family() in _M1_M2_WATCHDOG_RISK_FAMILIES+++def metal_watchdog_key(params: dict | None) -> str:+ """The setting a watchdog kill is remembered against. Closed fields only:+ engine, mode, quality, canvas, frames - never a prompt or a path."""+ p = params or {}+ try:+ w, h = int(p.get("width") or 0), int(p.get("height") or 0)+ frames = int(p.get("frames") or 0)+ except (TypeError, ValueError):+ w = h = frames = 0+ mode = str(p.get("mode") or "").strip().lower()+ if not mode:+ return ""+ parts = [str(p.get("engine") or "ltx").strip().lower(), mode,+ str(p.get("quality") or "").strip().lower(), f"{w}x{h}", str(frames)]+ # Codex 4.17.5: Extend / Retake / Colorize / Control / Upscale take their+ # geometry and length from a SOURCE CLIP and their own fields, not the+ # form's width/height/frames - so the source (hashed: this file stays+ # local, but it never needs the path) and the fields they consume are+ # part of the setting, or one big Retake would pause every small one.+ if mode in ("extend", "retake", "restore", "control", "upscale"):+ src = str(p.get("video_path") or p.get("upscale_source_path")+ or p.get("restore_video_path") or p.get("control_video_path")+ or "")+ parts.append(hashlib.sha1(src.encode("utf-8", "replace")).hexdigest()[:10])+ for k in ("extend_frames", "extend_direction", "retake_start_sec",+ "retake_end_sec", "upscale"):+ if p.get(k) not in (None, ""):+ parts.append(f"{k}={p.get(k)}")+ return "|".join(parts)+++def _metal_watchdog_load() -> dict:+ """The store, reset when the running build differs from the one that+ wrote it - an update is exactly when a refused setting deserves a try."""+ try:+ data = json.loads(METAL_WATCHDOG_FILE.read_text(encoding="utf-8"))+ except (OSError, ValueError):+ data = {}+ if not isinstance(data, dict) or data.get("version") != running_version():+ data = {"version": running_version(), "settings": {}}+ if not isinstance(data.get("settings"), dict):+ data["settings"] = {}+ return data+++def _metal_watchdog_save(data: dict) -> None:+ try:+ atomic_write_text(METAL_WATCHDOG_FILE, json.dumps(data, indent=1))+ except OSError:+ pass+++def metal_watchdog_record_kill(key: str, *, short: bool, phase: str = "") -> dict:+ """Count one watchdog kill of `key` (on short steps or not); the entry."""+ if not key:+ return {}+ with _METAL_WATCHDOG_LOCK:+ data = _metal_watchdog_load()+ ent = dict(data["settings"].get(key) or {})+ field = "short_kills" if short else "kills"+ ent[field] = int(ent.get(field) or 0) + 1+ ent["last_ts"] = int(time.time())+ if short:+ ent["short_last_ts"] = ent["last_ts"]+ if phase:+ ent["phase"] = phase+ if phase == "encode":+ ent["short_encode"] = True+ data["settings"][key] = ent+ _metal_watchdog_save(data)+ return ent+++def metal_watchdog_wants_short(key: str) -> bool:+ """Has macOS's watchdog killed this setting on this Mac (this build)?"""+ if not key:+ return False+ with _METAL_WATCHDOG_LOCK:+ ent = _metal_watchdog_load()["settings"].get(key) or {}+ return int(ent.get("kills") or 0) + int(ent.get("short_kills") or 0) > 0+++def metal_watchdog_needs_short_encode(key: str) -> bool:+ """Was this setting killed in prompt encoding (it re-runs with the shorter+ Gemma encode as well as short steps)?"""+ if not key:+ return False+ with _METAL_WATCHDOG_LOCK:+ ent = _metal_watchdog_load()["settings"].get(key) or {}+ return bool(ent.get("short_encode"))+++def metal_watchdog_refusal(key: str, now: float | None = None,+ mode: str | None = None) -> str | None:+ """The refusal for a setting the watchdog killed even on short steps, for+ METAL_WATCHDOG_REFUSE_SEC after that kill; else None."""+ if not key:+ return None+ with _METAL_WATCHDOG_LOCK:+ ent = _metal_watchdog_load()["settings"].get(key) or {}+ if int(ent.get("short_kills") or 0) <= 0:+ return None+ last = int(ent.get("short_last_ts") or ent.get("last_ts") or 0)+ if (now if now is not None else time.time()) - last > METAL_WATCHDOG_REFUSE_SEC:+ return None+ way = ("Press Retry smaller, or pick a lower quality or a shorter clip"+ if str(mode or "t2v") in ("t2v", "i2v", "i2v_clean_audio", "a2v",+ "keyframe", "upscale")+ else "Try a shorter extension or section, or a shorter source clip")+ return ("macOS's GPU watchdog stopped this exact render twice on this Mac - "+ "the second time in short GPU steps - so it is not started again "+ f"(it would stop the same way). {way}. This size is tried again "+ "after the next update, or in 24 hours.")++# THE REDUCED-RAM LANE IS SLOWER, AND MOST SLOWER ON CHAINED LENGTHS. Every@@ -16150,7 +16407,7 @@ def music_child_env(base: dict | None = None) -> dict:# its stdout). Pinokio's bundled binary is not on the default PATH, which# is the same trap that cost five installs their exports in 4.15.1 — so the# music child gets the resolved one prepended, exactly like the H3 spawn.- env["PATH"] = f"{FFMPEG_BIN}:{env.get('PATH', '')}"+ env["PATH"] = media_tool_path(env.get("PATH", ""))return env@@ -17323,24 +17580,47 @@ def _analytics_boot() -> None:_env_fault = engine_env_fault()_analytics_install_step("engine_env", "failed" if _env_fault else "ok",- _analytics_error_class(_env_fault) if _env_fault else "")+ _analytics_error_class(_env_fault) if _env_fault else "",+ cause=engine_env_cause() if _env_fault else "")_analytics_install_step("weights_check", "ok" if _analytics_weights_ready() else "failed")# ---- did the last Update actually land ---------------------------_pressed = str(get_settings().get("analytics_update_pressed") or "")if _pressed:_settings_set_internal(analytics_update_pressed="")- if _pressed != running_version():- _analytics_update_outcome("running_new", "ok", _pressed)+ _landed, _from = update_pressed_landed(_pressed)+ if _landed:+ _analytics_update_outcome("running_new", "ok", _from)else:# Pressed Update, came back on the same build. Either the pull# failed or the app never actually restarted into a new one —# both are the hole this event exists to measure.- _analytics_update_outcome("restart_pending", "failed", _pressed)+ _analytics_update_outcome("restart_pending", "failed", _from)except Exception:pass+def update_pressed_marker() -> str:+ """What "Update was pressed" records: the running VERSION and, when known,+ the build's SHA ("4.17.4@a69d7ed..."). Read back at the next boot by+ update_pressed_landed()."""+ sha = boot_build_stamp().get("sha") or ""+ return f"{running_version()}@{sha}" if sha else running_version()+++def update_pressed_landed(marker: str) -> tuple[bool, str]:+ """(did an update land since the marker was written, the from-version).++ 4.17.5: a different VERSION landed; so did a different build under the SAME+ VERSION (a SHA change). The same VERSION and the same SHA did not. A marker+ from 4.17.4 or earlier has no SHA and compares by VERSION alone."""+ ver, _, sha = str(marker or "").partition("@")+ if ver != running_version():+ return True, ver+ boot_sha = boot_build_stamp().get("sha") or ""+ return bool(sha and boot_sha and sha != boot_sha), ver++# Closed vocabularies. A value outside these never reaches the network: the# emitter drops it, and the dry-run suite fails the build if a call site# invents one. This is the same discipline as the error taxonomy, for the same@@ -17352,7 +17632,8 @@ _UPDATE_STAGES = ("running_new", "restart_pending")_UPDATE_OUTCOMES = ("ok", "failed")-def _analytics_install_step(step: str, outcome: str, error_class: str = "") -> None:+def _analytics_install_step(step: str, outcome: str, error_class: str = "",+ *, cause: str = "") -> None:"""One step of getting from "installed" to "rendered".AT MOST ONCE PER STEP PER INSTALL, and for `engine_env` once more each@@ -17372,13 +17653,20 @@ def _analytics_install_step(step: str, outcome: str, error_class: str = "") -> Nreturnseen = get_settings().get("analytics_install_steps")seen = dict(seen) if isinstance(seen, dict) else {}- if seen.get(step) == outcome:+ # The answer is outcome AND cause: "failed (still installing)" turning+ # into "failed (network)" is a change worth one more event.+ answer = f"{outcome}:{cause}" if (outcome == "failed" and cause) else outcome+ if seen.get(step) == answer:return- seen[step] = outcome+ seen[step] = answer_settings_set_internal(analytics_install_steps=seen)props = {"step": step, "outcome": outcome, "version": running_version()}if error_class:props["error_class"] = error_class+ # 4.17.5: WHY a failed step failed, one closed word (ENGINE_ENV_CAUSES)+ # read from the installer's own record - never its output, no paths.+ if outcome == "failed" and cause:+ props["cause"] = cause if cause in ENGINE_ENV_CAUSES else "other"# SYS-16: "first_queue" vs "first_render" (render_completed's own# first_render prop) is the funnel this event exists to answer, and# the reviewer's own finding is that activation is LOWEST on the@@ -17676,8 +17964,14 @@ _ANALYTICS_ERROR_CLASSES = (# `render_failed` event — it is the routing decision that sends the# event to `render_refused` instead. See _analytics_render_event.("refused", tuple(n for _, ns in _ANALYTICS_REFUSAL_REASONS for n in ns)),+ # 4.17.5: the SAME kill under its other name. macOS reports the watchdog+ # as ImpactingInteractivity when the stalled buffer froze the display+ # (#59; the WarmHelper regex already knew it) - fleet 4.17.2: 4 renders+ # filed under `other` with exactly that line.("metal_watchdog", ("kiogpucommandbuffercallbackerrortimeout",- "caused gpu timeout error")),+ "caused gpu timeout error",+ "kiogpucommandbuffercallbackerrorimpactinginteractivity",+ "impacting interactivity")),# THE OTHER Metal command-buffer failure, and it is not the watchdog.# `kIOGPUCommandBufferCallbackErrorOutOfMemory` means the GPU ran out of# memory; the timeout above means one buffer took too long. Both print@@ -17934,6 +18228,14 @@ def _analytics_render_event(job: dict) -> None:"source": _analytics_source(p, job),"audio_mode": _analytics_audio_mode(p, engine, mode),}+ # 4.17.5: did this render run in short GPU steps (the Metal watchdog+ # path), and did a watchdog kill get re-run inside the same job?+ if job.get("gpu_steps") == "short":+ props["gpu_steps"] = "short"+ if job.get("watchdog_retry"):+ props["watchdog_retry"] = True+ if job.get("watchdog_phase") in WATCHDOG_PHASES:+ props["watchdog_phase"] = job["watchdog_phase"]# wall_sec_bucket only when the wall clock is known — a None would# just pollute the percentile aggregation it exists to feed.wall = _analytics_wall_sec_bucket(job.get("elapsed_sec"))@@ -20414,6 +20716,15 @@ class WarmHelper:self.gemma_max_length: int | None = Noneself._metal_timeout_seen = Falseself._past_prompt_encode = False+ # 4.17.5 (the watchdog loop): short GPU steps for the rest of this boot+ # once a run needed them, and which step size the live helper was+ # spawned with (MLX reads the buffer caps once, at device creation).+ self.gpu_short_session = False+ self._gpu_short_wanted = False+ self._spawned_gpu_short: bool | None = None+ # The phase the helper was in at its last line - a watchdog kill is+ # remembered with it ("encode" / "load" / "denoise" / "decode").+ self._last_phase = ""# What the helper said on its way out. A helper that dies during# startup prints its traceback and exits, and the panel used to# report only the bookkeeping event — `helper failed to start:@@ -20442,7 +20753,7 @@ class WarmHelper:if busy:raise RuntimeError(f"Not started: {busy}. Press Retry then.")env = os.environ.copy()- env["PATH"] = f"{FFMPEG_BIN}:{env.get('PATH', '')}"+ env["PATH"] = media_tool_path(env.get("PATH", ""))env["LTX_MODEL"] = base_model_dir()# The Q8 pack directory, stated rather than string-derived. The# helper's _upscaler_dir() otherwise guesses it by swapping the@@ -20511,6 +20822,18 @@ class WarmHelper:push(f"[gemma-fallback] encoding prompts at "f"{self.gemma_max_length} tokens for the rest of this "f"session (Metal GPU watchdog seen on this machine)")+ # 4.17.5: Metal command-buffer size (see GPU_STEPS_M1M2). A value+ # the user set in the environment is never overridden.+ _short = bool(self._gpu_short_wanted)+ _steps = (GPU_STEPS_SHORT if _short+ else GPU_STEPS_M1M2 if gpu_steps_m1m2() else {})+ for _k, _v in _steps.items():+ if not os.environ.get(_k):+ env[_k] = _v+ self._spawned_gpu_short = _short+ if _steps:+ push(f"[gpu] {'short' if _short else 'M1/M2'} GPU steps: "+ + ", ".join(f"{k}={env[k]}" for k in _steps))push(f"Spawning warm helper (low_memory={HELPER_LOW_MEMORY}, idle_timeout={HELPER_IDLE_TIMEOUT}s)")self.proc = subprocess.Popen([str(HELPER_PYTHON), str(HELPER_SCRIPT)],@@ -20833,6 +21156,17 @@ class WarmHelper:self._metal_timeout_seen = Trueif not self._past_prompt_encode and self._PAST_PROMPT_ENCODE_RX.search(line):self._past_prompt_encode = True+ for _rx, _phase in self._PHASE_RX:+ if _rx.search(line):+ self._last_phase = _phase+ break++ _PHASE_RX = (+ (re.compile(r"\[Decoding|step:decode|vae-decode", re.I), "decode"),+ (re.compile(r"Denoising|step:denoise", re.I), "denoise"),+ (re.compile(r"Loading transformer|step:get_pipe", re.I), "load"),+ (re.compile(r"Encoding prompt|Loading text encoder", re.I), "encode"),+ )def _gemma_fallback_applies(self) -> bool:"""True when the run that just died is a retryable Gemma-encode@@ -20850,33 +21184,105 @@ class WarmHelper:and self.gemma_max_length is Noneand not self.is_alive())+ def _set_gpu_steps(self, short: bool) -> None:+ """Ask for short (or default) GPU steps for the next run. The caps are+ read by MLX once per process, so a live helper spawned with the other+ size is retired between jobs; _ensure spawns the right one."""+ self._gpu_short_wanted = bool(short)+ if (self._spawned_gpu_short is not None+ and self._spawned_gpu_short != bool(short) and self.is_alive()):+ with self.run_lock:+ self.kill()+def run(self, job_spec: dict, timeout: float | None = None) -> dict:- """Run a job, with one automatic retry at a shorter Gemma prompt- encode if the macOS GPU watchdog killed this machine's encode.-- The retry is deliberately cheap and bounded: the timeout happens- before ANY sampling or output is written, the helper is already- dead (so _ensure respawns it with the shorter length), and the- fallback arms at most once per panel boot — every later job in the- session spawns pre-mitigated instead of crashing again.+ """Run a job; when macOS's GPU watchdog kills it, run it again once.++ #44 (2026-08): a kill during Gemma prompt encoding re-runs at a shorter+ padded length, armed once per boot. 4.17.5 generalises the retry to a+ kill in ANY phase: the second run uses short GPU steps (GPU_STEPS_SHORT)+ and the setting is remembered (metal_watchdog_*), so its next run+ starts short and a kill on short steps refuses it for a day. The+ helper is dead after a kill (SIGABRT), so nothing half-done collides."""- try:- return self._run_once(job_spec, timeout=timeout)- except RuntimeError:- if not self._gemma_fallback_applies():- raise+ job = _thread_job()+ params = (job or {}).get("params")+ key = metal_watchdog_key(params) if job else ""+ refusal = metal_watchdog_refusal(key, mode=(params or {}).get("mode"))+ if refusal:+ raise RenderRefused("hardware_tier", refusal)+ if key and metal_watchdog_wants_short(key) and not self.gpu_short_session:+ self.gpu_short_session = True+ push(f"[gpu] {GPU_STEPS_NOTE[0].upper()}{GPU_STEPS_NOTE[1:]}.")+ # A setting that was killed in prompt encoding also gets back the+ # shorter Gemma encode it was saved with (Codex 4.17.5: a restart kept+ # the short steps but lost the encode mitigation).+ if (key and self.gemma_max_length is None+ and metal_watchdog_needs_short_encode(key)):self.gemma_max_length = self.GEMMA_FALLBACK_MAX_LENGTH- push(f"[gemma-fallback] the macOS GPU watchdog killed prompt "- f"encoding on this chip. Retrying this job once with Gemma "- f"encoding at {self.gemma_max_length} tokens instead of 1024 "- f"— nothing was rendered yet, so no work is lost.")- return self._run_once(job_spec, timeout=timeout)+ short = bool(self.gpu_short_session)+ if short and job is not None:+ _gpu_steps_note(job)+ # Each re-run must bring a mitigation the last run did not have: short+ # steps, or (killed in prompt encoding) the shorter Gemma encode. So at+ # most three runs, and only while something is left to try.+ for _attempt in range(3):+ self._set_gpu_steps(short)+ try:+ return self._run_once(job_spec, timeout=timeout)+ except RuntimeError as exc:+ watchdog = self._metal_timeout_seen and not self.is_alive()+ if not watchdog:+ raise+ gemma = self._gemma_fallback_applies()+ can_retry = gemma or (bool(key) and not short)+ if key:+ # Terminal (refuses the setting) only when nothing is left.+ metal_watchdog_record_kill(key, short=short and not gemma,+ phase=self._last_phase)+ # Which phase the GPU was in when macOS stopped it - the one+ # fact the fleet has never had about this failure.+ if job is not None and self._last_phase in WATCHDOG_PHASES:+ job["watchdog_phase"] = self._last_phase+ with LOCK:+ cancelled = bool(job is not None+ and job.get("cancel_requested"))+ if cancelled or not can_retry:+ if short and key and not cancelled:+ # The store now refuses this setting for a day; say+ # so, with the way out.+ raise RuntimeError(+ f"{exc} This render already ran in short GPU steps, "+ f"so this size is not started again on this Mac for "+ f"24 hours - press Retry smaller, or pick a lower "+ f"quality or a shorter clip.") from exc+ raise+ if gemma:+ self.gemma_max_length = self.GEMMA_FALLBACK_MAX_LENGTH+ was_short = short+ if key:+ self.gpu_short_session = True+ short = True+ if job is not None:+ job["watchdog_retry"] = True+ if short:+ _gpu_steps_note(job)+ push("[gpu] macOS's GPU watchdog stopped this render (one Metal "+ "step ran too long on this Mac"+ + (", during prompt encoding" if gemma else "")+ + "). Rendering it again"+ + (" in short GPU steps" if short and not was_short else "")+ + (f" with prompts encoded at {self.gemma_max_length} tokens"+ if gemma else "")+ + " - a little slower; this Mac keeps it for this size "+ "from now on.")+ raise RuntimeError("unreachable: the watchdog retry loop ended")def _run_once(self, job_spec: dict, timeout: float | None = None) -> dict:# Per-run detector state — reset here so a watchdog kill seen on an# earlier job can't arm the fallback for an unrelated failure.self._metal_timeout_seen = Falseself._past_prompt_encode = False+ self._last_phase = ""# Whole-run serialization so concurrent callers don't both park in# _read_until and grab each other's done/error events. See __init__# for why this is distinct from self.lock.@@ -21076,6 +21482,18 @@ class WarmHelper:return proc.pid+def _gpu_steps_note(job: dict) -> None:+ """Mark a job that rendered on short GPU steps: the analytics prop and the+ note the Queue row and Now card show (generation_clamp_notes)."""+ job["gpu_steps"] = "short"+ p = job.get("params")+ if isinstance(p, dict):+ notes = list(p.get("generation_clamp_notes") or [])+ if GPU_STEPS_NOTE not in notes:+ notes.append(GPU_STEPS_NOTE)+ p["generation_clamp_notes"] = notes++HELPER = WarmHelper()atexit.register(HELPER.kill)atexit.register(caffeinate_off)@@ -21642,7 +22060,7 @@ def run_postprocess_tracked(cmd: list[str], label: str) -> tuple[str, str]:return _sb_film_job_ffmpeg(cmd, label, film_job)push(f"{label}: " + " ".join(shlex.quote(c) for c in cmd))env = os.environ.copy()- env["PATH"] = f"{FFMPEG_BIN}:{env.get('PATH', '')}"+ env["PATH"] = media_tool_path(env.get("PATH", ""))proc = run_tracked_subprocess(cmd, pgid_key="mux_pgid", label=label,job=_thread_job(), env=env)stdout, stderr = proc.stdout, proc.stderr@@ -21962,7 +22380,7 @@ def _sb_film_job_ffmpeg(cmd: list, label: str, job: dict,kill it mid-encode. Same return/raise shape as run_postprocess_tracked."""push(f"{label}: " + " ".join(shlex.quote(str(c)) for c in cmd))env = os.environ.copy()- env["PATH"] = f"{FFMPEG_BIN}:{env.get('PATH', '')}"+ env["PATH"] = media_tool_path(env.get("PATH", ""))with _SB_FILM_JOB_LOCK:if job.get("cancel"):raise FilmRenderCanceled(f"{label}: canceled before it started")@@ -29112,6 +29530,31 @@ def music_lora_unresolved(raw) -> list[str]:return bad+def music_lora_foreign(raw) -> list[str]:+ """One sentence per picked adapter that is not a YuE2 music LoRA.++ 4.17.5 (fleet): a video (LTX) LoRA copied into the music LoRA folder was+ picked for a song, which then failed after the whole model load with+ "unsupported tensor targets: diffusion_model...". Read from each file's+ safetensors header (names only), so the pick is refused by name at the+ queue - before any engine starts."""+ try:+ from scripts.pinokio.music_lora_fetch import (+ music_adapter_problem, parse_field, resolve_in_pack)+ except Exception: # noqa: BLE001+ return []+ out = []+ for identifier, _strength in parse_field(raw):+ try:+ path = resolve_in_pack(MUSIC_LORAS, identifier)+ except (OSError, ValueError):+ continue # music_lora_unresolved names these+ problem = music_adapter_problem(path)+ if problem:+ out.append(problem)+ return out++def _engine_would_be_h3(requested: str, mode: str) -> bool:"""Would a job asking for this engine ACTUALLY render on H3?@@ -29931,7 +30374,10 @@ def _a2v_separator_install_thread(trigger: str = "form") -> None:else "installed - Listen to the voice only is ready"))_analytics_separator_install("failed" if error else "ok", f"panel_{trigger}", error_class,- ready=st["ready"], weights=st["weights"])+ ready=st["ready"], weights=st["weights"],+ cause=("timeout" if error_class == "timeout" else+ str((_a2v_separator_record() or {}).get("cause") or ""))+ if error else "")# This run wrote the outcome record itself; mark it reported so the next# boot does not count it twice._rec = _a2v_separator_record()@@ -29957,7 +30403,8 @@ def _a2v_separator_record() -> dict | None:def _analytics_separator_install(outcome: str, via: str, error_class: str = "",- *, ready: bool, weights: bool) -> None:+ *, ready: bool, weights: bool,+ cause: str = "") -> None:"""One separator install, however it ran. Closed words only - never theinstaller's own output (paths), never a host or a byte count."""try:@@ -29969,6 +30416,9 @@ def _analytics_separator_install(outcome: str, via: str, error_class: str = "",if outcome == "failed":props["error_class"] = (error_class if error_class in_SEPARATOR_INSTALL_ERRORS else "other")+ # 4.17.5: why, in install_cause.sh's closed words (the record's).+ if cause:+ props["cause"] = cause if cause in ENGINE_ENV_CAUSES else "other"_analytics_capture("separator_install", props)except Exception: # noqa: BLE001pass@@ -29990,7 +30440,8 @@ def a2v_separator_boot() -> None:_analytics_separator_install(str(rec.get("outcome") or ""), str(rec.get("via") or ""),str(rec.get("error_class") or ""),- ready=st["ready"], weights=st["weights"])+ ready=st["ready"], weights=st["weights"],+ cause=str(rec.get("cause") or ""))except Exception: # noqa: BLE001passif (os.environ.get("PHOSPHENE_SEPARATOR_AUTOINSTALL") or "1").strip() == "0":@@ -30105,6 +30556,117 @@ def a2v_requested_scale(params: dict):return raw+# 4.17.5 (fleet): EMPTY INPUTS REACHED THE QUEUE. On 4.17.4 one install queued+# Upscale and Control with source '' and Image mode with no picture (and once+# mode "retain", which no surface offers) - each waited its turn and failed as a+# red card. The form already refuses most of these, but /queue/add is also the+# API, and a stale page or a script never runs the form's guards. So the queue+# refuses them itself, before anything is queued, in the form's own words.+#+# Every mode make_job's video branch can produce. Music, image and train return+# from make_job before this matters (their own branches validate them).+QUEUEABLE_VIDEO_MODES = frozenset((+ "t2v", "i2v", "i2v_clean_audio", "extend", "keyframe", "a2v", "retake",+ "restore", "ingredients", "control", "upscale", "sharp_export",+))+_IMAGE_CONDITIONED_MODES = ("i2v", "i2v_clean_audio")+INPUT_MISSING_IMAGE = ("Image mode needs a reference image — drop one into the "+ "Image slot, or switch to Text mode and render from the "+ "prompt alone.")+INPUT_MISSING_UPSCALE = ("Pick the clip to fix first — choose it in the list, or "+ "press Upscale & Face Fix on a clip in Outputs.")+INPUT_MISSING_CONTROL = ("Control needs a clip to follow — pick one in the Control "+ "video picker, or switch to Text mode.")+INPUT_MISSING_AUDIO = ("Lip-sync needs a song or a voice recording — pick one in "+ "the Audio slot first.")+++def job_input_refusal(params: dict) -> str | None:+ """Why this job can only fail for want of an input, or None.++ For /queue/add and /queue/retry - NOT make_job, which internal chains also+ call with a source the previous job is still writing. Same checks, same+ words as run_job_inner's own (which stay as the backstop for queued jobs+ whose file goes away while they wait)."""+ p = params or {}+ m = str(p.get("mode") or "t2v").strip().lower()+ if m in ("music", "image", "train"):+ return None+ if m not in QUEUEABLE_VIDEO_MODES:+ return (f"Unknown render mode {m!r} - nothing was queued. Pick a mode "+ f"in the form (Text, Image, Lip-sync, Keyframes, Extend, "+ f"Control, Upscale & Face Fix).")++ def _path(*keys) -> str:+ for k in keys:+ v = str(p.get(k) or "").strip()+ if v:+ return v+ return ""++ def _exists(v: str) -> bool:+ try:+ return Path(v).exists()+ except (OSError, ValueError):+ return False++ def _audio() -> str:+ # make_job fills an unpicked Audio slot with AUDIO_DEFAULT, a demo+ # file no installer ships: that is "nothing picked", not a lost file.+ a = _path("audio")+ return "" if (a == str(AUDIO_DEFAULT) and not _exists(a)) else a++ if m in _IMAGE_CONDITIONED_MODES:+ img = _path("image")+ if not img:+ return INPUT_MISSING_IMAGE+ if not _exists(img):+ return (f"The reference image is no longer on disk: {img}. It was "+ "moved, renamed or deleted after it was picked. Pick it "+ "again, or choose another image.")+ if m == "i2v_clean_audio":+ audio = _audio()+ if not audio:+ return INPUT_MISSING_AUDIO+ if not _exists(audio):+ return (f"audio file not found: {audio}. It was moved or deleted "+ "after it was picked - pick it again in the Audio slot.")+ elif m == "upscale":+ src = _path("upscale_source_path", "restore_video_path")+ if not src:+ return INPUT_MISSING_UPSCALE+ if not _exists(src):+ return (f"source clip for {FACE_FIX_NAME} not found: {src!r}. Pick "+ "a finished clip in the Outputs gallery (or paste a path).")+ elif m == "control":+ src = _path("control_video_path")+ if not src:+ return INPUT_MISSING_CONTROL+ if not _exists(src):+ return (f"control video not found: {src!r}. Pick a clip in the "+ "Control video picker (or paste a path) whose "+ "motion/structure should drive the render.")+ elif m == "restore":+ src = _path("restore_video_path")+ if not src or not _exists(src):+ return (f"source video for Colorize not found: {src!r}. Pick a B&W "+ "clip in the Colorize source picker (or paste a path).")+ elif m in ("extend", "retake"):+ src = _path("video_path")+ if not src or not _exists(src):+ what = "Extend" if m == "extend" else "Retake"+ return (f"{what} needs the clip it continues - pick a finished clip "+ f"(source {src!r} is not on disk).")+ elif m == "a2v":+ audio = _audio()+ if not audio:+ return INPUT_MISSING_AUDIO+ if not _exists(audio):+ return (f"audio file not found: {audio}. It was moved or deleted "+ "after it was picked - pick it again in the Audio slot.")+ return None++def make_job(form: dict[str, list[str]] | dict[str, str], *,override_prompt: str | None = None) -> dict:def f(name: str, default: str = "") -> str:@@ -30141,6 +30703,11 @@ def make_job(form: dict[str, list[str]] | dict[str, str], *,raise MusicRequestError("These picked LoRAs are not in the music LoRA folder, so the ""song would be made without them: " + ", ".join(missing))+ foreign = music_lora_foreign(form.get("music_loras"))+ if foreign:+ raise MusicRequestError(+ "; ".join(foreign) + ". Untick it in the LoRA list, then "+ "make the song again.")# A TRAINED VOICE IS TRAINED IN ONE DIALECT (M6-04). A `direct`# voice never saw a score in its prefix and the engine refuses a# score with `--mode off`; a `score` voice was trained with one.@@ -33996,7 +34563,7 @@ def run_h3_job_inner(job: dict) -> None:env = os.environ.copy()# The runner pipes raw RGB into `ffmpeg` from PATH (minimax_h3_mlx.media);# Pinokio's bundled binary is not on the default PATH.- env["PATH"] = f"{FFMPEG_BIN}:{env.get('PATH', '')}"+ env["PATH"] = media_tool_path(env.get("PATH", ""))env["PYTHONUNBUFFERED"] = "1"# FP16 VAE decode — the default (h3_vae_fp16_decode()). Passed as the runner's# own flag so the argv says what ran; a runner that predates the flag@@ -38114,6 +38681,148 @@ def _push_job_done(job: dict) -> None:push(f"[push] skipped: {exc}")+# --- "Update now" finishes like Pinokio's Update (beta, after 4.17.4) --------+# THE HOLE. The panel's own "Update now" (/version/pull) was a git pull and a+# restart. It never ran scripts/post_update.sh - the step Pinokio's Update runs+# after its pull - so anything a release ADDS there (a package, a pin, a+# weight) silently did not happen. 4.17.3 shipped the Lip-sync voice separator+# that way, and a 16 GB Mac that pressed Update now got 3 refused Lip-sync jobs+# a second after the new build came up (fleet, 2026-10-01). 4.17.4 heals that+# one package at boot; this closes the class.+#+# After a pull that moved HEAD, the panel now runs post_update.sh itself, in+# the background, with the environment Pinokio gives that script (release+# skill section 1): Pinokio's own uv/conda on PATH (_music_install_env), the+# kernel's hardcoded vars, and the keys Pinokio deletes deleted. The queue+# holds while it runs (and the helper is stopped - the script reinstalls the+# packages it has open); a pull during a render waits for that render. Restart+# stays refused until it has finished, and a failure says why and points at+# Pinokio's Update. post_update.sh is idempotent: on a warm install it is a+# verify pass of a minute or two.+POST_UPDATE_LOCK = threading.Lock()+POST_UPDATE: dict = {"state": "idle", "active": False, "pending": False}+POST_UPDATE_SCRIPT = "scripts/post_update.sh"+POST_UPDATE_TIMEOUT_S = 3 * 3600+#: What Pinokio 8.2.0's kernel exports into every shell it runs (release+#: skill section 1). post_update.sh has only ever run under these.+_PINOKIO_KERNEL_ENV = {"PYTORCH_ENABLE_MPS_FALLBACK": "1",+ "TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD": "1",+ "CONDA_SHORTCUTS": "0", "CMAKE_OBJECT_PATH_MAX": "1024"}+++def _post_update_env() -> dict:+ """Pinokio's environment for post_update.sh, rebuilt from this process."""+ env = _music_install_env() # Pinokio's uv/conda on PATH, no venv+ for k in list(env):+ if (re.search(r"SSH|SSL", k) or k.startswith(("CUDA", "BLUEFAIRY_"))+ or k in ("PYTHONPATH", "CMAKE_MAKE_PROGRAM", "CMAKE_GENERATOR")):+ del env[k]+ env.update(_PINOKIO_KERNEL_ENV)+ return env+++def post_update_status() -> dict:+ with POST_UPDATE_LOCK:+ out = {k: v for k, v in POST_UPDATE.items() if k != "log"}+ out["log"] = [l.replace(str(Path.home()), "~")+ for l in list(POST_UPDATE.get("log") or [])[-6:]]+ return out+++def post_update_start(trigger: str = "update_now") -> tuple[int, dict]:+ """Run post_update.sh in the background once the GPU is free."""+ if not (ROOT / POST_UPDATE_SCRIPT).is_file():+ return 200, {"ok": True, "nothing_to_do": True}+ with POST_UPDATE_LOCK:+ if POST_UPDATE.get("active") or POST_UPDATE.get("pending"):+ return 409, {"error": "The update is already being finished.",+ "post_update": True}+ POST_UPDATE.clear()+ POST_UPDATE.update({"state": "waiting", "active": False, "pending": True,+ "trigger": trigger, "error": None,+ "started_ts": None, "finished_ts": None,+ "log": collections.deque(maxlen=80)})+ threading.Thread(target=_post_update_thread, daemon=True,+ name="post-update").start()+ return 202, {"ok": True, "started": True}+++def _post_update_thread() -> None:+ # A render that is running keeps its GPU and its venv: wait it out. The+ # queue already holds (_external_build_hold reads `pending`).+ while True:+ with LOCK:+ busy = STATE.get("current") is not None+ if not busy:+ break+ time.sleep(1.0)+ # 4.17.5 (Codex): and hold the process-wide GPU gate for the whole run.+ # Prompt Enhance and an inline image render take _GPU_LOCK without being+ # the queue's current job: Enhance would have its helper killed under it+ # (or respawn one mid-reinstall), and an image render would run against+ # packages being replaced. Waiting for the gate waits them out; holding+ # it refuses new ones ("busy") until the script is done.+ _GPU_LOCK.acquire()+ try:+ _post_update_run()+ finally:+ _GPU_LOCK.release()+++def _post_update_run() -> None:+ with POST_UPDATE_LOCK:+ POST_UPDATE.update(state="running", active=True, pending=False,+ started_ts=time.time())+ push("[update] finishing the update: running scripts/post_update.sh "+ "(the step Pinokio's Update runs after its pull)")+ try:+ HELPER.kill() # it has the packages open+ except Exception: # noqa: BLE001+ pass+ head = _git_capture(["rev-parse", "HEAD"]) or ""+ tail: list[str] = []+ error = None+ timer = None+ try:+ proc = subprocess.Popen(["bash", str(ROOT / POST_UPDATE_SCRIPT), str(ROOT)],+ cwd=str(ROOT), env=_post_update_env(),+ stdin=subprocess.DEVNULL, stdout=subprocess.PIPE,+ stderr=subprocess.STDOUT, text=True, bufsize=1,+ errors="replace", start_new_session=True)+ timer = _kill_group_after(proc, POST_UPDATE_TIMEOUT_S)+ for raw in proc.stdout:+ for line in raw.replace("\r", "\n").splitlines():+ line = line.rstrip()+ if not line:+ continue+ tail = (tail + [line])[-12:]+ with POST_UPDATE_LOCK:+ POST_UPDATE["log"].append(line[:300])+ rc = proc.wait(timeout=60)+ if getattr(timer, "fired", False):+ raise subprocess.TimeoutExpired("post_update.sh", POST_UPDATE_TIMEOUT_S)+ if rc != 0:+ what = next((l for l in tail if "PHOSPHENE UPDATE FAILED:" in l), "")+ error = (what.split("PHOSPHENE UPDATE FAILED:", 1)[1].strip()+ if what else f"post_update.sh stopped (exit {rc})")+ except subprocess.TimeoutExpired:+ error = "the update step took longer than 3 hours"+ except Exception as exc: # noqa: BLE001+ error = f"the update step could not run: {exc}"+ finally:+ if timer is not None:+ timer.cancel()+ with POST_UPDATE_LOCK:+ POST_UPDATE.update(active=False, pending=False, finished_ts=time.time(),+ state="failed" if error else "done", error=error,+ head=head)+ push("[update] " + (f"finishing the update FAILED: {error}. Use Pinokio's "+ f"Update (Stop, then Update) to finish it." if error else+ "update finished - restart to load the new version"))+ with QUEUE_COND:+ QUEUE_COND.notify_all()++def _external_build_hold() -> str:"""Why the worker must not start a job right now, or "".@@ -38125,6 +38834,9 @@ def _external_build_hold() -> str:lock whose pid is gone (the build was killed past its trap) or that isolder than four hours holds nothing: a stale file must never wedge thequeue."""+ with POST_UPDATE_LOCK:+ if POST_UPDATE.get("pending") or POST_UPDATE.get("active"):+ return "the update (installing what the new version needs)"lock = STATE_DIR / "h3_build.lock"try:raw = lock.read_text(encoding="utf-8")diff --git a/panel/routes_meta.py b/panel/routes_meta.pyindex 11aac25..6483aab 100644--- a/panel/routes_meta.py+++ b/panel/routes_meta.py@@ -338,6 +338,14 @@ def post_star_click(h, path, qs, ctype) -> None:h._json({"ok": True}); return+@post("/version/finish")+def post_version_finish(h, path, qs, ctype) -> None:+ # Re-run post_update.sh after a failed in-panel finish (the banner's+ # "Try again"). Same background run, same refusals.+ code, payload = P.post_update_start("retry")+ h._json(payload, code); return++@post("/restart")def post_restart(h, path, qs, ctype) -> None:# The "Restart to finish update" pill used to open an alert() that@@ -352,6 +360,19 @@ def post_restart(h, path, qs, ctype) -> None:# That is exactly what a stale process needs. The queue and# settings live on disk, so nothing in flight is lost EXCEPT a# running render — which is why a busy panel refuses instead.+ # The update is not finished until post_update.sh has run: restarting+ # into new code before that is how a release's new package was skipped.+ _pu = P.post_update_status()+ if _pu.get("pending") or _pu.get("active"):+ h._json({"ok": False, "post_update": True,+ "error": "Finishing the update first (installing what the "+ "new version needs) - restart becomes available "+ "when it is done."}, 409); return+ if _pu.get("state") == "failed":+ h._json({"ok": False, "post_update": True,+ "error": "The update did not finish: " + str(_pu.get("error"))+ + ". Use Pinokio's Update (Stop, then Update), "+ "or try again from the update banner."}, 409); returnwith P.LOCK:_busy = P.STATE.get("current") is not Noneif _busy:@@ -420,8 +441,10 @@ def post_analytics_ui(h, path, qs, ctype) -> None:# means it didn't — which is the 23-of-139 hole that `app_updated`# alone can never show, because a failed update emits nothing.# One local string, overwritten each press, cleared on read.+ # 4.17.5: "version@sha" - a build that moved without a VERSION+ # bump is still an update that landed (read in the boot report).P._settings_set_internal(- analytics_update_pressed=P.running_version())+ analytics_update_pressed=P.update_pressed_marker())elif event == "broadcast_seen":P._analytics_capture("broadcast_seen", {"version": P.running_version()})elif event == "feature_used":@@ -597,6 +620,28 @@ def post_version_pull(h, path, qs, ctype) -> None:P._detect_local_install_state()post_sha = P._git_capture(["rev-parse", "HEAD"]) or ""+ # 4.17.5 (fleet): NOTHING NEW IS NOT AN UPDATE. Two installs pressed+ # "Update now" on 4.17.4 itself; the pull moved nothing, the panel+ # still said "restart to finish", and the restart came back on the+ # same build - reported as a failed update (update_outcome+ # restart_pending 4.17.4 -> 4.17.4). When HEAD did not move and this+ # process already runs what is on disk, there is nothing to restart:+ # say so, and drop the "pressed Update" marker so the next boot does+ # not count a no-op as a failure.+ moved = bool(pre_sha and post_sha and pre_sha != post_sha)+ if not moved and not P.get_version_state().get("stale_process"):+ P._settings_set_internal(analytics_update_pressed="")+ with P._VERSION_LOCK:+ P._VERSION_STATE["pull_state"] = "current"+ P._VERSION_STATE["pull_message"] = (+ "Already up to date - nothing to restart.")+ try:+ P._check_remote_once()+ except Exception:+ pass+ h._json({"ok": True, "moved": False, "state": P.get_version_state()})+ return+# Did the pull touch anything that needs the heavier Pinokio# Update.js (pip reinstalls + patch reapply)? If so, flag it.deps_touched = False@@ -639,6 +684,12 @@ def post_version_pull(h, path, qs, ctype) -> None:P._VERSION_STATE["pull_pulled_to_version"] = P._VERSION_STATE["local_version"]P._VERSION_STATE["pull_requires_full_update"] = deps_touched+ # Finish the update the way Pinokio's Update does: post_update.sh,+ # after every pull that moved HEAD (beta, after 4.17.4 - see+ # post_update_start). Restart stays refused until it is done.+ if pre_sha and post_sha and pre_sha != post_sha:+ P.post_update_start("update_now")+# Re-run the remote check so behind_by recalculates to 0# (normally) or to whatever new commits landed in the# window since we pulled.@@ -647,7 +698,7 @@ def post_version_pull(h, path, qs, ctype) -> None:except Exception:pass- h._json({"ok": True, "state": P.get_version_state()})+ h._json({"ok": True, "moved": moved, "state": P.get_version_state()})except P.subprocess.TimeoutExpired:with P._VERSION_LOCK:P._VERSION_STATE["pull_state"] = "error"diff --git a/panel/routes_queue.py b/panel/routes_queue.pyindex e24023a..f04d373 100644--- a/panel/routes_queue.py+++ b/panel/routes_queue.py@@ -455,6 +455,21 @@ def post_queue_retry(h, path, qs, ctype) -> None:p["frames"] = max(41, ((frames // 2) // 8) * 8 + 1)except (TypeError, ValueError):pass+ # 4.17.5 (Codex): Extend renders `extend_frames` latents, not+ # `frames` - halve what that pipeline actually consumes, or "smaller"+ # re-ran the same workload.+ if str(p.get("mode") or "") == "extend":+ try:+ ef = int(p.get("extend_frames") or 0)+ if ef > 1:+ p["extend_frames"] = max(1, ef // 2)+ except (TypeError, ValueError):+ pass+ # 4.17.5: a retry of a job whose input is gone (or was never there) can+ # only fail again - say so now instead of after its turn in the queue.+ refusal = P.job_input_refusal(new_job["params"])+ if refusal:+ h._json({"error": refusal, "code": "input_missing"}, 400); returnwith P.QUEUE_COND:P.STATE["queue"].append(new_job)P.QUEUE_COND.notify_all()@@ -749,6 +764,12 @@ def post_run(h, path, qs, ctype) -> None:job = P.make_job(form)except P.CharacterRequestError as exc:h._json({"error": str(exc)}, 400); return+ # 4.17.5: a job that can only fail for want of its input (Upscale or+ # Control with no clip, Image with no picture, an unknown mode) is refused+ # here, in the form's own words, instead of failing after its turn.+ refusal = P.job_input_refusal(job.get("params") or {})+ if refusal:+ h._json({"error": refusal, "code": "input_missing"}, 400); return# 4.17 Codex EST-10: a follow-up that can never queue is refused NOW,# not discovered in the log after a long Extend render.refusal = P.extend_face_fix_refusal(job["params"])diff --git a/scripts/a2v_separate.py b/scripts/a2v_separate.pyindex a1c7f00..6cb91bd 100755--- a/scripts/a2v_separate.py+++ b/scripts/a2v_separate.py@@ -48,6 +48,118 @@ def load_model(name: str):return model+# ---- the weights download, made to survive a bad connection (4.17.5) -------+# Fleet 4.17.4: two installs got the package but not the 80 MB model+# (weights_failed). demucs fetches it through torch.hub in ONE request with no+# timeout and no resume, from dl.fbaipublicfiles.com: a dropped connection+# loses the whole file and the next attempt starts from zero. This fetches the+# same file into the same place torch.hub looks (TORCH_HOME/hub/checkpoints),+# resuming a partial download, with a timeout and four attempts, and checks it+# the way torch.hub does (the sha256 prefix in its name). get_model then finds+# it on disk and downloads nothing. PHOSPHENE_DEMUCS_MIRROR (a base URL) is+# tried after the official host; the hash check applies to it the same.+DOWNLOAD_ATTEMPTS = 4+DOWNLOAD_TIMEOUT_S = 60+++class DownloadExhausted(RuntimeError):+ """Every attempt at the model download failed (not a table problem)."""+++def model_files(name: str) -> list[tuple[str, str]]:+ """[(file name, official URL)] for a pretrained bag, from demucs' own+ remote list - the same table get_model reads."""+ from demucs import pretrained # noqa: PLC0415+ import yaml # noqa: PLC0415+ files = pretrained._parse_remote_files(pretrained.REMOTE_ROOT / "files.txt")+ bag = pretrained.REMOTE_ROOT / f"{name}.yaml"+ sigs = yaml.safe_load(bag.read_text())["models"] if bag.is_file() else [name]+ return [(files[sig].rsplit("/", 1)[-1], files[sig]) for sig in sigs]+++def _hash_ok(path: str, file_name: str) -> bool:+ import hashlib # noqa: PLC0415+ import re # noqa: PLC0415+ m = re.search(r"-([a-f0-9]*)\.", file_name)+ if not m:+ return os.path.getsize(path) > 0+ h = hashlib.sha256()+ with open(path, "rb") as fh:+ for block in iter(lambda: fh.read(1 << 20), b""):+ h.update(block)+ return h.hexdigest().startswith(m.group(1))+++def _fetch_one(url: str, dest: str) -> None:+ """Download url -> dest, resuming dest + '.partial'. Raises on failure."""+ import urllib.request # noqa: PLC0415+ part = dest + ".partial"+ have = os.path.getsize(part) if os.path.isfile(part) else 0+ req = urllib.request.Request(url, headers={"User-Agent": "phosphene-separator"})+ if have:+ req.add_header("Range", f"bytes={have}-")+ import urllib.error # noqa: PLC0415+ try:+ resp_cm = urllib.request.urlopen(req, timeout=DOWNLOAD_TIMEOUT_S)+ except urllib.error.HTTPError as exc:+ if exc.code == 416 and have: # the partial file is already whole+ os.replace(part, dest)+ return+ raise+ with resp_cm as resp:+ resumed = bool(have and getattr(resp, "status", 200) == 206)+ try:+ expect = int(resp.headers.get("Content-Length") or -1)+ except ValueError:+ expect = -1+ expect = (have + expect) if (resumed and expect >= 0) else expect+ with open(part, "ab" if resumed else "wb") as out:+ while True:+ block = resp.read(1 << 20)+ if not block:+ break+ out.write(block)+ # A connection that drops can end the body without an exception; the+ # partial file is KEPT, so the next attempt resumes from where it stopped.+ got = os.path.getsize(part)+ if expect >= 0 and got < expect:+ raise ConnectionError(f"the connection dropped at {got} of {expect} bytes")+ os.replace(part, dest)+++def prefetch(name: str, *, sleep=None) -> None:+ """Every weight file the bag needs, on disk and hash-checked."""+ import time # noqa: PLC0415+ sleep = sleep or time.sleep+ home = os.environ.get("TORCH_HOME") or os.path.expanduser("~/.cache/torch")+ ckpt = os.path.join(home, "hub", "checkpoints")+ os.makedirs(ckpt, exist_ok=True)+ mirror = (os.environ.get("PHOSPHENE_DEMUCS_MIRROR") or "").rstrip("/")+ for file_name, url in model_files(name):+ dest = os.path.join(ckpt, file_name)+ if os.path.isfile(dest) and _hash_ok(dest, file_name):+ continue+ urls = [url] + ([f"{mirror}/{file_name}"] if mirror else [])+ last = None+ for attempt in range(1, DOWNLOAD_ATTEMPTS + 1):+ src = urls[-1] if attempt > 2 else urls[0] # mirror (if any) last+ try:+ _fetch_one(src, dest)+ if _hash_ok(dest, file_name):+ break+ # A corrupt file is not resumable: start that one over.+ os.replace(dest, dest + ".bad")+ last = RuntimeError("downloaded file failed its checksum")+ except Exception as exc: # noqa: BLE001+ last = exc+ print(f"separator weights: attempt {attempt} of {DOWNLOAD_ATTEMPTS} "+ f"did not finish ({type(last).__name__}: {last})", file=sys.stderr)+ if attempt < DOWNLOAD_ATTEMPTS:+ sleep(min(30, 5 * attempt))+ else:+ raise DownloadExhausted(f"the separator model did not download: {last}")++def read_audio(path: str, ffmpeg: str):import numpy as np # noqa: PLC0415import torch # noqa: PLC0415@@ -100,6 +212,20 @@ def main(argv: list[str] | None = None) -> int:a = ap.parse_args(argv)_scrub_env()if a.prefetch:+ try:+ prefetch(a.model)+ except DownloadExhausted as exc:+ # Four timed, resumed attempts failed: the host is not reachable+ # from here. Falling through to torch.hub's own download (one+ # request, no timeout) could hang an Install for good (Codex 4.17.5).+ print(f"separator weights: {exc}", file=sys.stderr)+ return 3+ except Exception as exc: # noqa: BLE001+ # demucs reorganised its model table: torch.hub's own download is+ # the fallback, with a socket timeout so a stalled host cannot hang.+ print(f"separator weights: {exc}", file=sys.stderr)+ import socket # noqa: PLC0415+ socket.setdefaulttimeout(DOWNLOAD_TIMEOUT_S)load_model(a.model)print(f"vocal separator ready ({a.model})")return 0diff --git a/scripts/pinokio/a2v_stems_deps.sh b/scripts/pinokio/a2v_stems_deps.shindex 2f68a29..b08956d 100755--- a/scripts/pinokio/a2v_stems_deps.sh+++ b/scripts/pinokio/a2v_stems_deps.sh@@ -38,12 +38,39 @@ set -uo pipefailAPP_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"SEP_HOME="${PHOSPHENE_SEPARATOR_HOME:-$APP_ROOT/mlx_models/demucs}"VIA="${PHOSPHENE_SEPARATOR_VIA:-install}"+# 4.17.5: the record also carries WHY (install_cause.sh: network, timeout,+# disk, uv_error, python_missing, other), read from this run's own output.+# shellcheck source=install_cause.sh+if [ -f "$APP_ROOT/scripts/pinokio/install_cause.sh" ]; then+ . "$APP_ROOT/scripts/pinokio/install_cause.sh"+else+ install_cause() { echo other; }+fi+LOG="$(mktemp -t phos_separator)" || LOG=/dev/null+trap '[ -f "$LOG" ] && rm -f "$LOG"' EXIT+# Raw output to $LOG (install_cause reads it); the screen gets it DEFUSED.+# Pinokio stops Install/Update on any /error:/i or /errno /i line, and an+# attempt that is about to be retried must not end the whole run (the same+# rule ltx_engine_env.sh follows).+defuse() { tee -a "$LOG" | sed -u -e 's/[Ee][Rr][Rr][Oo][Rr]:/problem -/g' -e 's/[Ee]rrno /errno-/g'; }record() {mkdir -p "$SEP_HOME" 2>/dev/null || return 0- printf '{"outcome":"%s","error_class":"%s","via":"%s","ts":%s}\n' \- "$1" "$2" "$VIA" "$(date +%s)" > "$SEP_HOME/last_install.json" 2>/dev/null+ local cause=""+ [ "$1" = failed ] && cause="${3:-$(install_cause "$LOG")}"+ printf '{"outcome":"%s","error_class":"%s","cause":"%s","via":"%s","ts":%s}\n' \+ "$1" "$2" "$cause" "$VIA" "$(date +%s)" > "$SEP_HOME/last_install.json" 2>/dev/nullreturn 0}+# The plain sentence the panel shows on its card (the LAST line printed).+say_why() {+ case "$(install_cause "$LOG")" in+ network) echo 'vocal separation: the download server could not be reached - check the connection, then Try again' >&2 ;;+ timeout) echo 'vocal separation: the download kept timing out - check the connection, then Try again' >&2 ;;+ disk) echo 'vocal separation: the disk is full - free some space, then Try again' >&2 ;;+ uv_error) echo 'vocal separation: the package installer could not resolve demucs with the torch on this Mac' >&2 ;;+ *) echo "vocal separation: $1" >&2 ;;+ esac+}MLX_CHECKOUT="$(cd "${1:?ltx-2-mlx checkout required}" && pwd)" \|| { record failed no_venv; exit 1; }@@ -57,7 +84,7 @@ for cand in "$MLX_CHECKOUT/env" "$MLX_CHECKOUT/.venv"; dodoneif [ -z "$VENV" ]; thenecho "no engine venv under $MLX_CHECKOUT - run the engine install first" >&2- record failed no_venv+ record failed no_venv python_missingexit 1fiPY="$VENV/bin/python3.11"@@ -85,19 +112,31 @@ for name in ("torch", "numpy"):passPYPINSecho "keeping: $(tr '\n' ' ' < "$PINS")"- if command -v uv >/dev/null 2>&1; then- uv pip install --python "$PY" -c "$PINS" 'demucs==4.0.1'- else- "$PY" -m pip install -c "$PINS" 'demucs==4.0.1'- fi- rc=$?+ # 4.17.5: up to 3 attempts - but only a network or timeout failure is worth+ # repeating; a resolver conflict or a full disk fails the same way again.+ n=1+ while :; do+ if command -v uv >/dev/null 2>&1; then+ uv pip install --python "$PY" -c "$PINS" 'demucs==4.0.1' 2>&1 | defuse+ rc=$?+ else+ "$PY" -m pip install -c "$PINS" 'demucs==4.0.1' 2>&1 | defuse+ rc=$?+ fi+ [ "$rc" -eq 0 ] && break+ case "$(install_cause "$LOG")" in network|timeout) ;; *) break ;; esac+ [ "$n" -ge 3 ] && break+ echo "vocal separation: attempt $n did not finish - retrying in $((n * ${PHOSPHENE_SEPARATOR_RETRY_WAIT:-10})) s"+ sleep $((n * ${PHOSPHENE_SEPARATOR_RETRY_WAIT:-10}))+ n=$((n + 1))+ donerm -f "$PINS"- if [ $rc -ne 0 ]; then- echo 'vocal separation: package install failed' >&2+ if [ "$rc" -ne 0 ]; thenrecord failed pip_failed+ say_why 'package install failed'exit 1fi- if ! "$PY" -c "$PROBE"; then+ if ! "$PY" -c "$PROBE" 2>&1 | defuse; thenecho 'vocal separation: installed but does not import' >&2record failed import_failedexit 1@@ -106,10 +145,12 @@ fi# Fetch the weights now, so the first lip-sync render does not stop to# download them. Prove the runner loads the model, not just that pip ran.-if ! "$PY" "$RUNNER" --prefetch; then- echo 'vocal separation: the model did not load (network?)' >&2- echo 'It will download on first use instead.' >&2+# The runner resumes a broken download and retries it (4.17.5); a failure+# here has already been tried four times.+if ! "$PY" "$RUNNER" --prefetch 2>&1 | defuse; thenrecord failed weights_failed+ echo 'It will download on first use instead.' >&2+ say_why 'the model did not load'exit 1firecord ok ""diff --git a/scripts/pinokio/install_cause.sh b/scripts/pinokio/install_cause.shnew file mode 100755index 0000000..ace2fec--- /dev/null+++ b/scripts/pinokio/install_cause.sh@@ -0,0 +1,47 @@+#!/usr/bin/env bash+# WHY AN INSTALL STEP FAILED, IN ONE CLOSED WORD (4.17.5).+#+# Sourced by ltx_engine_env.sh (the engine's Python packages) and+# a2v_stems_deps.sh (the voice separator). Both used to fail with a class and+# nothing else: on 4.17.4 four fresh installs failed at engine_env and two+# separator installs at weights_failed, and nothing said whether the network,+# the disk or a package resolver was to blame. This reads the step's own+# output and answers with one word from a closed list - the word, never the+# output, is what a record and an analytics event carry (no paths, no hosts).+#+# install_cause <log file> -> prints one of:+# disk the disk filled up+# timeout a download or request timed out+# network could not reach / talk to a server (DNS, TLS, reset)+# python_missing the venv's Python does not run+# uv_error the package tool itself failed (resolver, build, no uv)+# other none of the above+#+# Order matters: a uv timeout line also says "error sending request", and a+# full disk can surface as a failed build, so the specific causes are tested+# before the general ones. Matching is case-insensitive.+#+# docs/ANALYTICS.md (install_step.cause, separator_install.cause) lists the+# same words; test_install_cause.py runs this function on real failure lines.++install_cause() {+ local log="$1"+ [ -f "$log" ] || { echo other; return 0; }+ if grep -qiE 'no space left on device|os error 28|disk quota exceeded|ENOSPC|not enough (free )?(disk )?space' "$log"; then+ echo disk+ elif grep -qiE 'timed out|read timeout|connect timeout|timeout error|timeouterror|deadline exceeded|took longer than' "$log"; then+ echo timeout+ elif grep -qiE 'error sending request|dns error|failed to lookup address|could not resolve|nodename nor servname|name or service not known' "$log" \+ || grep -qiE 'connection (refused|reset|closed|aborted)|network is unreachable|no route to host|temporary failure in name resolution|remote ?disconnected' "$log" \+ || grep -qiE 'tls handshake|ssl error|sslerror|certificate verify failed|invalid peer certificate|proxy error|proxyerror|urlopen error' "$log" \+ || grep -qiE 'failed to fetch|failed to download|http status (5[0-9][0-9]|429)|status code: (5[0-9][0-9]|429)' "$log"; then+ echo network+ elif grep -qiE 'no working python|python[0-9.]* not executable|venv python not executable|interpreter .* does not exist|no interpreter found|no python at' "$log"; then+ echo python_missing+ elif grep -qiE 'no solution found|because .* depends on|failed to build|failed to prepare distributions|metadata-generation-failed' "$log" \+ || grep -qiE 'uv: command not found|command not found: uv|uv not found|resolution failed|could not find a version|requires-python|unsatisfiable' "$log"; then+ echo uv_error+ else+ echo other+ fi+}diff --git a/scripts/pinokio/ltx_engine_env.sh b/scripts/pinokio/ltx_engine_env.shindex f6bd086..080c30f 100755--- a/scripts/pinokio/ltx_engine_env.sh+++ b/scripts/pinokio/ltx_engine_env.sh@@ -41,7 +41,28 @@ APP_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"MLX="${1:-$APP_ROOT/ltx-2-mlx}"cd "$MLX" 2>/dev/null || { echo "FATAL error: no engine checkout at $MLX - run Install"; exit 1; }PY=env/bin/python++# OUTCOME RECORD (4.17.5). Every finished run writes env/.phosphene_engine_result+# .json: {"outcome","cause","ts"} - closed words only (install_cause.sh), no+# paths. The panel puts `cause` on the install_step engine_env event and in the+# Repair bar, so a failed fresh install says network / disk / uv / Python /+# timeout instead of only "venv_broken". Written only when env/ exists.+# shellcheck source=install_cause.sh+if [ -f "$APP_ROOT/scripts/pinokio/install_cause.sh" ]; then+ . "$APP_ROOT/scripts/pinokio/install_cause.sh"+else+ install_cause() { echo other; }+fi+RESULT=env/.phosphene_engine_result.json+record() {+ [ -d env ] || return 0+ printf '{"outcome":"%s","cause":"%s","ts":%s}\n' "$1" "$2" "$(date +%s)" \+ > "$RESULT" 2>/dev/null+ return 0+}+if ! "$PY" -c 'import sys' >/dev/null 2>&1; then+ record failed python_missingecho 'FATAL error: the engine venv has no working Python - run Install (it rebuilds the venv, models kept)'exit 1fi@@ -69,11 +90,15 @@ if ! take_lock; thenfirelease_lock() {[ "$(sed -n 1p "$LOCK/pid" 2>/dev/null)" = "$$" ] && rm -f "$LOCK/pid" && rmdir "$LOCK"+ [ -f "${LOG:-}" ] && rm -f "$LOG"+ return 0}trap release_lock EXIT-# uv's own failure lines, defused for Pinokio's matcher (see above).-defuse() { sed -u -e 's/[Ee][Rr][Rr][Oo][Rr]:/problem -/g' -e 's/[Ee]rrno /errno-/g'; }+# uv's own failure lines, defused for Pinokio's matcher (see above). The raw+# text goes to $LOG first - install_cause reads it after a failed run.+LOG="$(mktemp -t phos_engine_env)" || LOG=/dev/null+defuse() { tee -a "$LOG" | sed -u -e 's/[Ee][Rr][Rr][Oo][Rr]:/problem -/g' -e 's/[Ee]rrno /errno-/g'; }attempt() {uv pip install --python env/bin/python 'mlx==0.31.1' 'mlx-lm==0.31.1' \@@ -98,6 +123,7 @@ n=1while :; doecho "--- attempt $n of 3 ---"if attempt; then+ record ok ""echo 'engine environment ready - ltx_core_mlx, ltx_pipelines_mlx and mlx import'exit 0fi@@ -107,8 +133,18 @@ while :; dosleep "$wait_s"n=$(( n + 1 ))done-echo 'FATAL error: the engine environment did not install after 3 attempts.'-echo 'Check the network, then run Install again (or press Repair engine in the panel).'+CAUSE="$(install_cause "$LOG")"+record failed "$CAUSE"+case "$CAUSE" in+ disk) WHY='the disk is full - free some space' ;;+ timeout) WHY='downloads kept timing out - check the connection' ;;+ network) WHY='the package server could not be reached - check the network' ;;+ uv_error) WHY='the package installer could not resolve or build a package' ;;+ python_missing) WHY='the engine venv Python stopped working' ;;+ *) WHY='see the lines above' ;;+esac+echo "FATAL error: the engine environment did not install after 3 attempts ($CAUSE: $WHY)."+echo 'Run Install again - it resumes, nothing is downloaded twice - or press Repair engine in the panel.'echo 'Nothing was deleted; every model is kept.'exit 1diff --git a/scripts/pinokio/music_lora_fetch.py b/scripts/pinokio/music_lora_fetch.pyindex 4b33cdf..b28a71d 100644--- a/scripts/pinokio/music_lora_fetch.py+++ b/scripts/pinokio/music_lora_fetch.py@@ -49,6 +49,7 @@ import hashlibimport jsonimport osfrom pathlib import Path+import re as _reimport shutilimport sys@@ -267,6 +268,12 @@ def _entry(path: Path, root: Path, *, builtin: bool) -> dict:elif meta.get("dialect") == "score":bits.append("trained with a score — use Melody or Melody + chords")note = " · ".join(filter(None, [note] + bits))+ # 4.17.5: a dropped-in file that is not a music adapter (a video LoRA, the+ # fleet case) says so in the picker, and the queue refuses it by name.+ problem = "" if builtin else music_adapter_problem(path)+ if problem:+ meta = {**meta, "problem": problem}+ note = problemreturn {"id": str(path.relative_to(root)), "file": path.name, "name": label,"note": note, "builtin": builtin, "branch": branch,"bytes": path.stat().st_size,@@ -291,6 +298,75 @@ def pack_adapters(root) -> list[dict]:return found+# 4.17.5 (fleet): a YuE2 song failed after its whole model load with+# "unsupported tensor targets: diffusion_model..." - a VIDEO (LTX) LoRA had been+# copied into the music LoRA folder and picked. yue2_lora.read_adapter refuses+# it correctly, but only once the engine is up. These read the file's+# safetensors HEADER (its tensor names, no tensors) so the panel can refuse the+# pick by name before the job runs, and the picker can say what it is.+#+# The target rule mirrors yue2_lora's (_PREFIXES + _TARGET_RE + IO_MODULES): a+# music adapter names `layers.N.<self_attn|mlp|nar_self_attn|nar_mlp>.<proj>`+# after an optional PEFT prefix, or the decoder's vae2llm/llm2vae companions.+# test_music_lora_foreign.py holds the two definitions together.+_MUSIC_KEY_PREFIXES = ("base_model.model.model.", "base_model.model.",+ "base_model.", "transformer.", "model.")+_MUSIC_TARGET_RE = _re.compile(+ r"^layers\.\d+\.(self_attn|mlp|nar_self_attn|nar_mlp)\."+ r"(q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj)\.")+_MUSIC_IO_RE = _re.compile(r"^(vae2llm|llm2vae)\.(weight|bias)$")+#: Tensor-name prefixes that identify a VIDEO adapter (LTX / H3 DiT), named in+#: the refusal so the user knows where the file belongs.+_VIDEO_KEY_HINTS = ("diffusion_model.", "transformer_blocks.", "lora_unet_",+ "transformer.transformer_blocks.",+ "blocks.", "single_transformer_blocks.")+_HEADER_MAX = 64 * 1024 * 1024+++def safetensors_keys(path) -> list[str] | None:+ """Tensor names in a .safetensors file, from its header only; None when the+ header cannot be read (a truncated or non-safetensors file)."""+ try:+ with open(path, "rb") as fh:+ raw = fh.read(8)+ if len(raw) != 8:+ return None+ n = int.from_bytes(raw, "little")+ if n <= 0 or n > _HEADER_MAX:+ return None+ header = json.loads(fh.read(n).decode("utf-8"))+ except (OSError, ValueError, UnicodeDecodeError):+ return None+ if not isinstance(header, dict):+ return None+ return [k for k in header if k != "__metadata__"]+++def music_adapter_problem(path) -> str:+ """"" when `path` looks like a YuE2 adapter, else a sentence saying what it+ is instead. Header-only; the engine still does the full check."""+ p = Path(path)+ keys = safetensors_keys(p)+ if not keys:+ # Unreadable or empty: not provably foreign - the engine's own+ # read_adapter names that failure precisely; refuse only what is SURE.+ return ""+ for key in keys:+ k = key+ for prefix in _MUSIC_KEY_PREFIXES:+ if k.startswith(prefix):+ k = k[len(prefix):]+ break+ if _MUSIC_TARGET_RE.match(k) or _MUSIC_IO_RE.match(k):+ return ""+ if any(key.startswith(_VIDEO_KEY_HINTS) for key in keys):+ return (f"{p.name} is a video LoRA (LTX / Hailuo H3), not a music "+ f"voice - it cannot change a song. Move it to the video LoRA "+ f"folder and pick a music LoRA here instead")+ return (f"{p.name} is not a YuE2 music LoRA (none of its tensors target "+ f"the music model)")++def resolve_in_pack(root, identifier: str) -> Path:"""A picker id → a real file, refusing anything outside the LoRA folder."""root = Path(root).expanduser().resolve()diff --git a/scripts/release_gates.sh b/scripts/release_gates.shindex d7f244f..b1339d7 100755--- a/scripts/release_gates.sh+++ b/scripts/release_gates.sh@@ -51,6 +51,17 @@ fiLOGDIR="$(mktemp -d "${TMPDIR:-/tmp}/phosphene-gates.XXXXXX")"+# HERMETIC, like conftest.py does for pytest (4.17.5): the unittest sweep does+# not load conftest, and a full run used to leave an 810 MB Hugging Face+# download in the system temp dir every time. Every gate gets its own TMPDIR+# under LOGDIR (removed below, the logs kept) and an offline Hugging Face hub.+GATE_TMP="$LOGDIR/tmp"+mkdir -p "$GATE_TMP"+export TMPDIR="$GATE_TMP/"+export HF_HUB_OFFLINE=1+export HF_HUB_DISABLE_TELEMETRY=1+trap 'rm -rf "$GATE_TMP"' EXIT+# Parallel arrays: gate name, result, log path.NAMES=()RESULTS=()diff --git a/test_character_roundtrip.py b/test_character_roundtrip.pyindex 7582c46..8782841 100644--- a/test_character_roundtrip.py+++ b/test_character_roundtrip.py@@ -635,7 +635,12 @@ class TestQueueCharacterVoiceContract(unittest.TestCase):if audio_declared_missing else None)),}saved = (P.list_characters, P.persist_queue, P.push,- P._active_ltx_transformer_path, P.h3_capable)+ P._active_ltx_transformer_path, P.h3_capable,+ P.job_input_refusal)+ # This contract is about the CHARACTER, posted for every mode with+ # no picture / clip / song (4.17.5's input refusal would answer+ # those first; test_queue_input_refusal.py covers it).+ P.job_input_refusal = lambda params: NoneP.list_characters = lambda: [char]P.persist_queue = lambda: NoneP.push = lambda line: None@@ -657,7 +662,8 @@ class TestQueueCharacterVoiceContract(unittest.TestCase):params["loras"] = [dict(x) for x in params.get("loras") or []]finally:(P.list_characters, P.persist_queue, P.push,- P._active_ltx_transformer_path, P.h3_capable) = saved+ P._active_ltx_transformer_path, P.h3_capable,+ P.job_input_refusal) = savedreturn reply, paramsdef test_reported_t2v_api_case_stacks_face_and_trained_voice(self):diff --git a/test_codex_4170_ui.py b/test_codex_4170_ui.pyindex 7f7e691..cd0b632 100644--- a/test_codex_4170_ui.py+++ b/test_codex_4170_ui.py@@ -480,6 +480,8 @@ const mk = () => ({ hidden: false, disabled: false, textContent: '', classList:const els = { updateBanner: mk(), ubStar: mk(), ubTitle: mk(), ubSub: mk(), ubUpdate: mk(), ubLater: mk(), versionPill: mk() };global.document = { getElementById: id => els[id] || null };global._uiEvent = () => {};+// health.js's module-level state (bc09bf3 reads it in _ubRestartState).+global._versionState = null;const toasts = [];global.phosToast = (t) => toasts.push(t);let reloaded = false;diff --git a/test_image_engine_presets.py b/test_image_engine_presets.pyindex 326a86d..f76164d 100644--- a/test_image_engine_presets.py+++ b/test_image_engine_presets.py@@ -42,8 +42,13 @@ def _argv(cfg) -> list:with tempfile.TemporaryDirectory() as tmp:ref = Path(tmp) / "ref.png"ref.write_bytes(b"x")+ # 4.17.5: and nothing is DOWNLOADED. The Lightning LoRA is resolved+ # through hf_hub_download - unmocked, every run of this file fetched+ # the real 810 MB adapter into whatever HF_HOME the process had.with mock.patch.object(image_engine, "_resolve_mflux_bin", lambda c: "/nonexistent/mflux-generate-qwen-edit"), \mock.patch.object(image_engine, "repair_partial_hf_download", lambda *a, **k: None), \+ mock.patch("huggingface_hub.hf_hub_download",+ lambda repo_id, filename, **k: f"/fake-hf/{repo_id}/{filename}"), \mock.patch("subprocess.Popen", popen):try:image_engine._generate_mflux("a test", 1, 512, 512, Path(tmp), 1, cfg, refs=[str(ref)])@@ -66,6 +71,8 @@ class LightningRunsWithoutCfg(unittest.TestCase):self.assertEqual(float(cmd[cmd.index("--guidance") + 1]), 1.0)self.assertEqual(cmd[cmd.index("--steps") + 1], "4")self.assertIn("--lora-paths", cmd)+ self.assertTrue(cmd[cmd.index("--lora-paths") + 1].startswith("/fake-hf/"),+ "the adapter must come from the (mocked) resolver")def test_the_default_and_promoted_lightning_configs_send_guidance_one(self):self.assertEqual(_guidance(image_engine.ImageEngineConfig(diff --git a/test_image_partial_download.py b/test_image_partial_download.pyindex e25674c..7316e21 100644--- a/test_image_partial_download.py+++ b/test_image_partial_download.py@@ -26,9 +26,17 @@ from pathlib import PathROOT = Path(__file__).resolve().parentHF_HOME = Path(tempfile.mkdtemp(prefix="phos-hf-"))STATE = Path(tempfile.mkdtemp(prefix="phos-partial-state-"))+# 4.17.5: what this module changes in the process environment, so it can be+# put back (tearDownModule). It used to stay pointed at a temp HF_HOME for+# every test that ran after it in the same process - one of which then+# downloaded an 810 MB LoRA into it, on every full run, never removed.+_ENV_BEFORE = {k: os.environ.get(k) for k in+ ("HF_HOME", "HF_HUB_CACHE", "HUGGINGFACE_HUB_CACHE", "LTX_STATE_DIR",+ "HF_HUB_OFFLINE")}os.environ["HF_HOME"] = str(HF_HOME)os.environ.pop("HF_HUB_CACHE", None)os.environ.pop("HUGGINGFACE_HUB_CACHE", None)+os.environ["HF_HUB_OFFLINE"] = "1" # every repo here is a local fakeos.environ["LTX_STATE_DIR"] = str(STATE)os.environ["PHOSPHENE_ANALYTICS_DISABLED"] = "1"os.environ["PHOSPHENE_DISABLE_VERSION_CHECK"] = "1"@@ -38,6 +46,13 @@ sys.path.insert(0, str(ROOT))import image_engine # noqa: E402REPO = "Qwen/Qwen-Image-Edit-2511"+_FAKE_ROOTS: list[Path] = []+++def _tmp_root() -> Path:+ root = Path(tempfile.mkdtemp(prefix="phos-hf-fake-"))+ _FAKE_ROOTS.append(root)+ return rootdef _fake_repo(root: Path, repo: str, *, partial: bool) -> Path:@@ -57,7 +72,7 @@ def _fake_repo(root: Path, repo: str, *, partial: bool) -> Path:class PartialDownloadDetection(unittest.TestCase):def test_clean_repo_is_not_partial_and_repair_is_a_noop(self) -> None:- root = Path(tempfile.mkdtemp())+ root = _tmp_root()repo_dir = _fake_repo(root, REPO, partial=False)env = {"HF_HOME": str(root)}self.assertIsNone(image_engine.hf_repo_partial_download(REPO, env))@@ -65,7 +80,7 @@ class PartialDownloadDetection(unittest.TestCase):self.assertTrue((repo_dir / "snapshots").is_dir(), "a complete cache is left alone")def test_incomplete_blob_is_detected_and_repair_keeps_finished_blobs(self) -> None:- root = Path(tempfile.mkdtemp())+ root = _tmp_root()repo_dir = _fake_repo(root, REPO, partial=True)env = {"HF_HOME": str(root)}info = image_engine.hf_repo_partial_download(REPO, env)@@ -122,7 +137,7 @@ class LeftoversOfACompleteDownload(unittest.TestCase):image_engine._REPAIR_MEMO.clear()def _repo(self, name: str):- root = Path(tempfile.mkdtemp())+ root = _tmp_root()return root, _fake_repo(root, name, partial=False)def test_incomplete_with_a_finished_twin_is_litter(self) -> None:@@ -161,5 +176,16 @@ class LeftoversOfACompleteDownload(unittest.TestCase):self.assertTrue(left.exists(), "a partial that may still be needed is never deleted")+def tearDownModule() -> None:+ import shutil+ for k, v in _ENV_BEFORE.items():+ if v is None:+ os.environ.pop(k, None)+ else:+ os.environ[k] = v+ for d in (HF_HOME, STATE, *_FAKE_ROOTS):+ shutil.rmtree(d, ignore_errors=True)++if __name__ == "__main__":unittest.main(verbosity=2)diff --git a/test_install_cause.py b/test_install_cause.pynew file mode 100644index 0000000..7a444bf--- /dev/null+++ b/test_install_cause.py@@ -0,0 +1,226 @@+"""4.17.5 (fleet): a failed install step says WHY, in one closed word.++THE FIELD SHAPE (4.17.4): four fresh installs reported install_step+engine_env failed (venv_broken); two recovered, two never rendered, and the+event carried nothing about the cause. Two of the four booted the panel in+the same second as app_installed - Pinokio's Install was still writing the+venv. Separator installs failed as weights_failed / pip_failed, likewise with+no reason.++THE FIX, each part tested here:+ * scripts/pinokio/install_cause.sh maps a failed step's own output to one+ word - network, timeout, disk, uv_error, python_missing, other - and never+ mistakes a package NAME (pyopenssl, async-timeout) for a cause;+ * ltx_engine_env.sh records {"outcome","cause","ts"} in the venv on every+ finished run, and its FATAL line names the cause in plain words;+ * the panel's engine_env_cause() answers installing (Install still running),+ python_missing, the record's cause, or unknown; install_step engine_env+ carries it as `cause`; a changed cause is reported again, and an Install+ that was mid-way at boot is reported when it ends;+ * the Repair bar says the cause in the user's words.+"""+from __future__ import annotations++import json+import os+import shutil+import subprocess+import sys+import tempfile+import unittest+from pathlib import Path+from unittest import mock++ROOT = Path(__file__).resolve().parent+sys.path.insert(0, str(ROOT))+sys.path.insert(0, str(ROOT / "scripts"))+os.environ.setdefault("PHOSPHENE_ANALYTICS_DISABLED", "1")++import mlx_ltx_panel as P # noqa: E402+import test_engine_env_repair as T # noqa: E402+from extract_panel_js import extract_function # noqa: E402++CAUSE = ROOT / "scripts" / "pinokio" / "install_cause.sh"+NODE = shutil.which("node")+++def cause_of(text: str) -> str:+ with tempfile.NamedTemporaryFile("w", suffix=".log", delete=False) as fh:+ fh.write(text)+ log = fh.name+ try:+ r = subprocess.run(["bash", "-c", f'. "{CAUSE}"; install_cause "{log}"'],+ capture_output=True, text=True, timeout=20)+ return r.stdout.strip()+ finally:+ os.unlink(log)+++class TheCauseWords(unittest.TestCase):+ CASES = {+ "disk": ["error: Failed to write to the cache: No space left on device (os error 28)"],+ "timeout": ["error: Failed to download `torch==2.11.0`\n Caused by: error sending "+ "request for url (https://files.pythonhosted.org/x)\n Caused by: operation timed out",+ "urllib.error.URLError: <urlopen error timed out>"],+ "network": ["error: Failed to fetch: https://pypi.org/simple/mlx/\n"+ " Caused by: [Errno 54] Connection reset by peer",+ "error: dns error: failed to lookup address information: nodename nor servname provided",+ "ssl.SSLCertVerificationError: certificate verify failed: unable to get local issuer"],+ "uv_error": [" x No solution found when resolving dependencies:\n Because torchaudio==2.11.0 "+ "depends on torch==2.11.0 and you require torch==2.1.0, we can conclude...",+ "bash: uv: command not found"],+ "python_missing": ["FATAL error: the engine venv has no working Python - run Install"],+ "other": ["something else entirely went wrong"],+ }++ def test_each_cause(self):+ for want, texts in self.CASES.items():+ for text in texts:+ with self.subTest(want=want, text=text[:40]):+ self.assertEqual(cause_of(text), want)++ def test_package_names_are_not_causes(self):+ """uv lists what it installed; a resolver failure in the same log must+ not read as a network or timeout problem because of a NAME."""+ log = (" + pyopenssl==24.2.1\n + async-timeout==4.0.3\n + requests-toolbelt==1.0\n"+ " x No solution found when resolving dependencies:\n")+ self.assertEqual(cause_of(log), "uv_error")++ def test_a_missing_log_is_other(self):+ r = subprocess.run(["bash", "-c", f'. "{CAUSE}"; install_cause /nonexistent/x.log'],+ capture_output=True, text=True, timeout=20)+ self.assertEqual(r.stdout.strip(), "other")++ def test_the_word_list_matches_the_panel(self):+ for word in ("network", "timeout", "disk", "uv_error", "python_missing", "other"):+ self.assertIn(word, P.ENGINE_ENV_CAUSES)+ self.assertIn(f"echo {word}", CAUSE.read_text())+++class _App(T._App):+ """The engine step in a fake app tree, with the classifier beside it."""++ def __init__(self, *a, **k):+ super().__init__(*a, **k)+ shutil.copy(CAUSE, self.tmp / "scripts" / "pinokio" / CAUSE.name)++ def record(self) -> dict:+ return json.loads((self.mlx / "env" / P.ENGINE_ENV_RESULT_NAME).read_text())+++class TheEngineStepRecordsWhy(unittest.TestCase):+ def test_a_network_failure_is_recorded_and_said(self):+ app = _App(uv_fails=99)+ r = app.run()+ self.assertEqual(r.returncode, 1)+ self.assertEqual(app.record()["outcome"], "failed")+ self.assertEqual(app.record()["cause"], "network")+ fatal = [l for l in r.stdout.splitlines() if l.startswith("FATAL error:")]+ self.assertEqual(len(fatal), 1, r.stdout)+ self.assertIn("(network:", fatal[0])+ self.assertIn("check the network", fatal[0])++ def test_success_records_ok(self):+ app = _App(uv_fails=1)+ self.assertEqual(app.run().returncode, 0)+ self.assertEqual(app.record()["outcome"], "ok")++ def test_no_working_python_is_python_missing(self):+ app = _App()+ (app.mlx / "env" / "bin" / "python").write_text("#!/bin/bash\nexit 1\n")+ r = app.run()+ self.assertEqual(r.returncode, 1)+ self.assertEqual(app.record()["cause"], "python_missing")++ def test_without_the_classifier_it_still_runs(self):+ """An older tree mid-update: the script must not die on the source."""+ app = T._App(uv_fails=99)+ r = app.run()+ self.assertEqual(r.returncode, 1)+ self.assertIn("FATAL error:", r.stdout)+ self.assertNotIn("No such file", r.stdout + r.stderr)++ def test_the_raw_errors_never_reach_pinokio(self):+ app = _App(uv_fails=2)+ r = app.run()+ self.assertEqual(r.returncode, 0)+ self.assertIsNone(T.PINOKIO_BREAK.search(r.stdout + r.stderr))+++class ThePanelSaysWhy(unittest.TestCase):+ def test_cause_order(self):+ with T._Venv() as v:+ self.assertEqual(P.engine_env_cause(), "unknown")+ (v.env / P.ENGINE_ENV_RESULT_NAME).write_text(+ json.dumps({"outcome": "failed", "cause": "disk", "ts": 1}))+ self.assertEqual(P.engine_env_cause(), "disk")+ self.assertEqual(P.engine_env_status().get("cause"), "disk")+ (v.env / P.ENGINE_ENV_RESULT_NAME).write_text(+ json.dumps({"outcome": "failed", "cause": "/Users/x/evil", "ts": 1}))+ self.assertEqual(P.engine_env_cause(), "unknown",+ "a word outside the vocabulary must never travel")+ T._lock(v.env, os.getpid())+ self.assertEqual(P.engine_env_cause(), "installing")+ T._lock(v.env, 999999)+ P.HELPER_PYTHON = v.env / "bin" / "python3.11.gone"+ self.assertEqual(P.engine_env_cause(), "python_missing")++ def test_the_event_carries_the_cause_and_reports_a_change(self):+ store = {"analytics_install_steps": {}}+ sent = []+ with mock.patch.object(P, "get_settings", lambda: store), \+ mock.patch.object(P, "_settings_set_internal", lambda **kw: store.update(kw)), \+ mock.patch.object(P, "_analytics_capture", lambda e, p: sent.append((e, p))):+ P._analytics_install_step("engine_env", "failed", "venv_broken", cause="installing")+ P._analytics_install_step("engine_env", "failed", "venv_broken", cause="installing")+ P._analytics_install_step("engine_env", "failed", "venv_broken", cause="network")+ P._analytics_install_step("engine_env", "ok")+ P._analytics_install_step("engine_env", "failed", "venv_broken", cause="bogus")+ self.assertEqual([p.get("cause") for _, p in sent],+ ["installing", "network", None, "other"])+ self.assertTrue(all(e == "install_step" for e, _ in sent))++ def test_an_install_that_ends_after_boot_is_reported(self):+ steps = []+ with T._Venv() as v, mock.patch.object(+ P, "_analytics_install_step",+ side_effect=lambda *a, **k: steps.append((a, k))):+ P._ENGINE_ENV_WATCH["installing"] = None+ T._lock(v.env, os.getpid())+ P.engine_env_status() # Install running+ self.assertEqual(steps, [])+ (v.env / P.ENGINE_ENV_RESULT_NAME).write_text(+ json.dumps({"outcome": "failed", "cause": "timeout", "ts": 2}))+ T._lock(v.env, 999999) # Install ended, still broken+ P.engine_env_status()+ P.engine_env_status() # once, not per poll+ self.assertEqual(len(steps), 1, steps)+ self.assertEqual(steps[0][0][:2], ("engine_env", "failed"))+ self.assertEqual(steps[0][1].get("cause"), "timeout")++[email protected](NODE, "node not on PATH")+class TheBarSaysWhy(unittest.TestCase):+ def test_bar_text(self):+ js = (ROOT / "webapp" / "js" / "queue.js").read_text()+ fn = extract_function("engineEnvBannerHtml", js)+ prog = ("function escapeHtml(s){return String(s);}\n"+ "function _redactLocalPaths(s){return s;}\n" + fn + "\n"+ "console.log(JSON.stringify(["+ "engineEnvBannerHtml({ok:false,cause:'network',repair:{}}),"+ "engineEnvBannerHtml({ok:false,cause:'unknown',repair:{}})]));")+ with tempfile.NamedTemporaryFile("w", suffix=".js", delete=False) as fh:+ fh.write(prog)+ try:+ out = subprocess.run([NODE, fh.name], capture_output=True, text=True, timeout=30)+ self.assertEqual(out.returncode, 0, out.stderr)+ net, unk = json.loads(out.stdout)+ finally:+ os.unlink(fh.name)+ self.assertIn("could not reach the package server", net)+ self.assertIn("Repair engine", net)+ self.assertNotIn("package server", unk)+++if __name__ == "__main__":+ unittest.main(verbosity=2)diff --git a/test_lipsync_quality.py b/test_lipsync_quality.pyindex 34f4b59..65e2a4d 100644--- a/test_lipsync_quality.py+++ b/test_lipsync_quality.py@@ -118,8 +118,12 @@ def test_voice_only_off_and_explicit_stems_are_untouched(song, tmp_path):sep.assert_not_called()-def test_queue_add_refuses_voice_only_when_the_separator_is_missing():- form = {"mode": ["a2v"], "prompt": ["a singer"], "audio": ["/x/song.wav"],+def test_queue_add_refuses_voice_only_when_the_separator_is_missing(tmp_path):+ # A song that EXISTS: 4.17.5 refuses a missing one first (input_missing),+ # and this test is about the separator.+ song = tmp_path / "song.wav"+ song.write_bytes(b"RIFF")+ form = {"mode": ["a2v"], "prompt": ["a singer"], "audio": [str(song)],"audio_stem_auto": ["on"]}h = _H(form)before = len(P.STATE["queue"])diff --git a/test_metal_watchdog_loop.py b/test_metal_watchdog_loop.pynew file mode 100644index 0000000..5a5b595--- /dev/null+++ b/test_metal_watchdog_loop.py@@ -0,0 +1,365 @@+"""4.17.5 (fleet): the Metal watchdog loop on M1/M2 Macs cannot repeat.++THE FIELD SHAPE (4.17.4, the top error for weeks): one M1 Max 32 GB install+rendered LTX Standard 768x448 121f i2v from the form 50 times in 15 hours and+macOS's GPU watchdog killed 48 of them about 30 s in (SIGABRT,+kIOGPUCommandBufferCallbackErrorTimeout); every Retry of the same job worked+(33 of 33). An M2 Max 96 GB and an M2 Pro 32 GB hit it too. Nothing made the+next attempt different, nothing remembered the last one, and nothing stopped+the loop.++THE FIX, each part tested here:+ * M1/M2-class GPUs spawn the helper with smaller Metal command buffers+ (MLX_MAX_OPS_PER_BUFFER / MLX_MAX_MB_PER_BUFFER - what MLX exposes for+ exactly this); a value the user set is never overridden;+ * a watchdog kill re-runs THAT job once, at once, on short GPU steps (one+ op per command buffer), with one plain line in the log, the+ note on the Queue row, and `watchdog_retry` / `gpu_steps` on the event;+ * the setting is remembered: its next run starts short;+ * a kill on short steps refuses the setting up front on this Mac for 24 h+ (or until the next update), with Retry smaller on the card - so the+ 50-failure loop becomes at most two failures.+"""+from __future__ import annotations++import json+import os+import shutil+import subprocess+import sys+import tempfile+import time+import unittest+from pathlib import Path+from unittest import mock++ROOT = Path(__file__).resolve().parent+sys.path.insert(0, str(ROOT))+sys.path.insert(0, str(ROOT / "scripts"))+os.environ.setdefault("PHOSPHENE_ANALYTICS_DISABLED", "1")++import mlx_ltx_panel as P # noqa: E402+from extract_panel_js import extract_function # noqa: E402++NODE = shutil.which("node")+WATCHDOG = ("helper exited from SIGABRT (the macOS GPU watchdog killed a Metal "+ "command buffer (kIOGPUCommandBufferCallbackErrorTimeout)); returncode=-6")+++def _job(**params) -> dict:+ p = {"mode": "i2v", "engine": "ltx", "quality": "standard", "width": 768,+ "height": 448, "frames": 121}+ p.update(params)+ return {"id": "j1", "status": "running", "params": p}+++class _Store(unittest.TestCase):+ def setUp(self):+ self.tmp = Path(tempfile.mkdtemp(prefix="wd-"))+ self._p = mock.patch.object(P, "METAL_WATCHDOG_FILE", self.tmp / "metal_watchdog.json")+ self._p.start()++ def tearDown(self):+ self._p.stop()+ P._JOB_CTX.job = None+++class TheStore(_Store):+ def test_key_is_closed_fields_only(self):+ key = P.metal_watchdog_key(_job(prompt="secret words", image="/Users/x/a.png")["params"])+ self.assertEqual(key, "ltx|i2v|standard|768x448|121")+ self.assertEqual(P.metal_watchdog_key({}), "")++ def test_a_kill_asks_for_short_and_a_short_kill_refuses(self):+ k = "ltx|i2v|standard|768x448|121"+ self.assertFalse(P.metal_watchdog_wants_short(k))+ P.metal_watchdog_record_kill(k, short=False, phase="encode")+ self.assertTrue(P.metal_watchdog_wants_short(k))+ self.assertIsNone(P.metal_watchdog_refusal(k))+ P.metal_watchdog_record_kill(k, short=True, phase="denoise")+ msg = P.metal_watchdog_refusal(k)+ self.assertIn("GPU watchdog stopped this exact render", msg)+ self.assertIn("Retry smaller", msg)+ # ...for 24 hours, then it gets a try again.+ self.assertIsNone(P.metal_watchdog_refusal(k, now=time.time() + 25 * 3600))+ # Other settings are untouched.+ self.assertFalse(P.metal_watchdog_wants_short("ltx|t2v|quick|640x448|121"))+ data = json.loads((self.tmp / "metal_watchdog.json").read_text())+ self.assertEqual(data["settings"][k]["phase"], "denoise")++ def test_source_driven_modes_are_keyed_by_what_they_consume(self):+ """Codex 4.17.5: Retake/Extend take geometry and length from the+ source and their own fields - one big Retake must not pause every+ small one."""+ a = {"mode": "retake", "quality": "balanced", "width": 1280, "height": 704,+ "frames": 121, "video_path": "/x/big.mp4", "retake_start_sec": "0",+ "retake_end_sec": "8"}+ b = dict(a, video_path="/x/small.mp4")+ c = dict(a, retake_end_sec="2")+ keys = {P.metal_watchdog_key(x) for x in (a, b, c)}+ self.assertEqual(len(keys), 3)+ self.assertNotIn("/x/", "".join(keys), "no path in the key")+ e1 = {"mode": "extend", "video_path": "/x/a.mp4", "extend_frames": 5}+ e2 = dict(e1, extend_frames=2)+ self.assertNotEqual(P.metal_watchdog_key(e1), P.metal_watchdog_key(e2))++ def test_the_refusal_names_a_way_out_for_the_mode(self):+ k = "ltx|retake|balanced|1280x704|121|abc"+ P.metal_watchdog_record_kill(k, short=True)+ self.assertIn("shorter extension or section", P.metal_watchdog_refusal(k, mode="retake"))+ self.assertIn("Retry smaller", P.metal_watchdog_refusal(k, mode="i2v"))++ def test_an_update_clears_the_store(self):+ k = "ltx|i2v|standard|768x448|121"+ P.metal_watchdog_record_kill(k, short=True)+ with mock.patch.object(P, "running_version", lambda: "9.9.9"):+ self.assertIsNone(P.metal_watchdog_refusal(k))+ self.assertFalse(P.metal_watchdog_wants_short(k))+++class _FakeHelper(P.WarmHelper):+ """A WarmHelper whose renders are scripted: each _run_once call pops the+ next outcome - "ok", "watchdog", or "boom" (an ordinary error)."""++ def __init__(self, outcomes):+ super().__init__()+ self.outcomes = list(outcomes)+ self.runs = [] # the step size each run used++ def _run_once(self, job_spec, timeout=None):+ self._metal_timeout_seen = False+ self._past_prompt_encode = False+ self._last_phase = ""+ self.runs.append(self._gpu_short_wanted)+ what = self.outcomes.pop(0) if self.outcomes else "watchdog"+ if what == "ok":+ return {"event": "done"}+ if what.startswith("watchdog"):+ self._metal_timeout_seen = True+ self._last_phase = "encode" if what == "watchdog_encode" else "denoise"+ self._past_prompt_encode = what != "watchdog_encode"+ raise RuntimeError(WATCHDOG)+ raise RuntimeError("something else broke")+++class TheHelperRetriesOnShortSteps(_Store):+ def run_job(self, helper, job):+ P._JOB_CTX.job = job+ try:+ return helper.run({"action": "generate", "id": job["id"], "params": {}})+ finally:+ P._JOB_CTX.job = None++ def test_a_kill_is_rerun_once_on_short_steps(self):+ h = _FakeHelper(["watchdog", "ok"])+ job = _job()+ self.assertEqual(self.run_job(h, job), {"event": "done"})+ self.assertEqual(h.runs, [False, True])+ self.assertTrue(job["watchdog_retry"])+ self.assertEqual(job["watchdog_phase"], "denoise")+ self.assertEqual(job["gpu_steps"], "short")+ self.assertIn(P.GPU_STEPS_NOTE, job["params"]["generation_clamp_notes"])+ self.assertTrue(P.metal_watchdog_wants_short(P.metal_watchdog_key(job["params"])))+ log = "\n".join(list(P.STATE.get("log") or [])[-10:])+ self.assertIn("Rendering it again in short GPU steps", log)++ def test_the_next_run_of_that_setting_starts_short(self):+ self.run_job(_FakeHelper(["watchdog", "ok"]), _job())+ fresh = _FakeHelper(["ok"]) # a new boot+ job = _job()+ self.run_job(fresh, job)+ self.assertEqual(fresh.runs, [True])+ self.assertEqual(job["gpu_steps"], "short")+ self.assertNotIn("watchdog_retry", job)++ def test_a_kill_during_prompt_encoding_also_shortens_the_encode(self):+ h = _FakeHelper(["watchdog_encode", "ok"])+ self.run_job(h, _job())+ self.assertEqual(h.gemma_max_length, P.WarmHelper.GEMMA_FALLBACK_MAX_LENGTH)+ self.assertEqual(h.runs, [False, True])++ def test_a_kill_on_short_steps_is_not_rerun_and_says_what_next(self):+ h = _FakeHelper(["watchdog", "watchdog"])+ with self.assertRaises(RuntimeError) as cm:+ self.run_job(h, _job())+ self.assertEqual(h.runs, [False, True])+ self.assertIn("24 hours", str(cm.exception))+ self.assertIn("kIOGPUCommandBufferCallbackErrorTimeout", str(cm.exception),+ "the class must still read as metal_watchdog")+ self.assertEqual(P._analytics_error_class(str(cm.exception)), "metal_watchdog")++ def test_the_fifty_failure_loop_is_impossible(self):+ """The field case: the same setting submitted again and again on a Mac+ where every run dies. At most two renders fail; the rest are refused+ before any GPU work."""+ h = _FakeHelper(["watchdog"] * 200)+ failed = refused = 0+ for _ in range(50):+ try:+ self.run_job(h, _job())+ except P.RenderRefused as exc:+ self.assertEqual(exc.reason, "hardware_tier")+ refused += 1+ except RuntimeError:+ failed += 1+ self.assertEqual(failed, 1, "one job: default run + its short re-run")+ self.assertEqual(len(h.runs), 2)+ self.assertEqual(refused, 49)++ def test_a_restart_keeps_the_shorter_encode_too(self):+ """Codex 4.17.5: a setting saved by short steps AND the 256-token+ encode lost the encode after a restart, then got refused on the next+ encode kill without ever trying it."""+ self.run_job(_FakeHelper(["watchdog_encode", "ok"]), _job())+ fresh = _FakeHelper(["ok"])+ self.run_job(fresh, _job())+ self.assertEqual(fresh.gemma_max_length, P.WarmHelper.GEMMA_FALLBACK_MAX_LENGTH)++ def test_short_steps_still_get_the_unused_encode_retry(self):+ """Short steps already on (another size needed them this boot), then+ an encode kill: the shorter encode is still untried, so it runs again+ with it instead of refusing the size."""+ h = _FakeHelper(["watchdog_encode", "ok"])+ h.gpu_short_session = True+ job = _job()+ self.assertEqual(self.run_job(h, job), {"event": "done"})+ self.assertEqual(h.runs, [True, True])+ self.assertEqual(h.gemma_max_length, P.WarmHelper.GEMMA_FALLBACK_MAX_LENGTH)+ self.assertIsNone(P.metal_watchdog_refusal(P.metal_watchdog_key(job["params"])))++ def test_runs_are_bounded_even_when_every_mitigation_is_tried(self):+ h = _FakeHelper(["watchdog_encode", "watchdog_encode", "watchdog_encode", "ok"])+ with self.assertRaises(RuntimeError):+ self.run_job(h, _job())+ self.assertLessEqual(len(h.runs), 3)++ def test_a_stopped_job_is_not_rerun(self):+ h = _FakeHelper(["watchdog", "ok"])+ job = _job()+ job["cancel_requested"] = True+ with self.assertRaises(RuntimeError):+ self.run_job(h, job)+ self.assertEqual(h.runs, [False])++ def test_an_ordinary_failure_is_not_a_watchdog(self):+ h = _FakeHelper(["boom", "ok"])+ with self.assertRaises(RuntimeError):+ self.run_job(h, _job())+ self.assertEqual(h.runs, [False])+ self.assertFalse(P.metal_watchdog_wants_short("ltx|i2v|standard|768x448|121"))+++class _Proc:+ pid = 4242+ stdin = stdout = None++ def poll(self):+ return None+++class TheSpawnEnvironment(_Store):+ def spawn(self, helper, chip="M1 Max", extra_env=None):+ captured = {}++ def popen(cmd, **kw):+ captured.update(kw["env"])+ return _Proc()+ env = dict(os.environ)+ for k in list(P.GPU_STEPS_SHORT) + list(P.GPU_STEPS_M1M2):+ env.pop(k, None)+ env.update(extra_env or {})+ with mock.patch.object(P.subprocess, "Popen", popen), \+ mock.patch.object(P, "engine_env_fault", lambda: ""), \+ mock.patch.object(P, "engine_env_busy", lambda: ""), \+ mock.patch.object(P, "_proc_guard_write", lambda *a, **k: None), \+ mock.patch.object(P, "_hw_chip_family", lambda: chip), \+ mock.patch.dict(os.environ, env, clear=True):+ try:+ helper._ensure()+ except Exception: # noqa: BLE001+ pass # the fake proc has no pipes; the env is what we want+ helper.proc = None+ return captured++ def test_m1_m2_get_smaller_buffers(self):+ env = self.spawn(P.WarmHelper(), chip="M1 Max")+ for k, v in P.GPU_STEPS_M1M2.items():+ self.assertEqual(env.get(k), v)++ def test_m3_and_later_are_untouched(self):+ env = self.spawn(P.WarmHelper(), chip="M4 Max")+ for k in P.GPU_STEPS_M1M2:+ self.assertNotIn(k, env)++ def test_short_steps_on_any_chip(self):+ h = P.WarmHelper()+ h._gpu_short_wanted = True+ env = self.spawn(h, chip="M4 Max")+ for k, v in P.GPU_STEPS_SHORT.items():+ self.assertEqual(env.get(k), v)+ self.assertTrue(h._spawned_gpu_short)++ def test_the_users_own_value_wins(self):+ env = self.spawn(P.WarmHelper(), chip="M2 Pro",+ extra_env={"MLX_MAX_OPS_PER_BUFFER": "77"})+ self.assertEqual(env["MLX_MAX_OPS_PER_BUFFER"], "77")++ def test_a_live_helper_of_the_other_size_is_retired(self):+ h = P.WarmHelper()+ h._spawned_gpu_short = False+ killed = []+ with mock.patch.object(h, "is_alive", lambda: True), \+ mock.patch.object(h, "kill", lambda: killed.append(1)):+ h._set_gpu_steps(False)+ self.assertEqual(killed, [])+ h._set_gpu_steps(True)+ self.assertEqual(killed, [1])+++class TheEventSaysWhatHappened(unittest.TestCase):+ def test_props(self):+ sent = []+ with mock.patch.object(P, "_analytics_capture", lambda e, p: sent.append((e, p))), \+ mock.patch.object(P, "get_settings",+ lambda: {"analytics_first_render_reported": True}):+ P._analytics_render_event({"status": "done", "elapsed_sec": 300,+ "gpu_steps": "short", "watchdog_retry": True,+ "watchdog_phase": "load",+ "params": _job()["params"]})+ P._analytics_render_event({"status": "done", "elapsed_sec": 300,+ "params": _job()["params"]})+ self.assertEqual(sent[0][1]["gpu_steps"], "short")+ self.assertIs(sent[0][1]["watchdog_retry"], True)+ self.assertEqual(sent[0][1]["watchdog_phase"], "load")+ self.assertNotIn("gpu_steps", sent[1][1])+ self.assertNotIn("watchdog_retry", sent[1][1])++[email protected](NODE, "node not on PATH")+class TheCardOffersSmaller(unittest.TestCase):+ def test_paused_size_card(self):+ js = (ROOT / "webapp" / "js" / "queue.js").read_text()+ fns = "\n".join(extract_function(n, js) for n in+ ("friendlyJobError", "nowCardFailureActions"))+ refusal = P.metal_watchdog_refusal.__doc__ and (+ "macOS's GPU watchdog stopped this exact render twice on this Mac")+ prog = ("function _redactLocalPaths(s){return s;}\nfunction escapeHtml(s){return s;}\n"+ + fns + "\n"+ "const info = friendlyJobError(" + json.dumps(refusal) + ", 'ltx');\n"+ "const html = nowCardFailureActions({refused_reason:'hardware_tier'}, info);\n"+ "console.log(JSON.stringify({smaller: !!info.smaller, friendly: info.friendly, html}));")+ with tempfile.NamedTemporaryFile("w", suffix=".js", delete=False) as fh:+ fh.write(prog)+ try:+ r = subprocess.run([NODE, fh.name], capture_output=True, text=True, timeout=30)+ self.assertEqual(r.returncode, 0, r.stderr[-1500:])+ out = json.loads(r.stdout.strip().splitlines()[-1])+ finally:+ os.unlink(fh.name)+ self.assertTrue(out["smaller"])+ self.assertIn('data-action="retry-smaller"', out["html"])+ self.assertNotIn('data-action="retry"', out["html"].replace("retry-smaller", ""))+++if __name__ == "__main__":+ unittest.main(verbosity=2)diff --git a/test_queue_input_refusal.py b/test_queue_input_refusal.pynew file mode 100644index 0000000..1cd6466--- /dev/null+++ b/test_queue_input_refusal.py@@ -0,0 +1,165 @@+"""4.17.5 (fleet): a job that can only fail for want of its input is refused+at the queue, in the form's own words - never queued to fail as a red card.++THE FIELD SHAPE (4.17.4, one install, all source "form"): Upscale & Face Fix+with source '' (2), Control with a control video of '' (2), Image mode with no+picture (2, and once i2v_clean_audio), an a2v whose audio was not on disk, and+one job in mode "retain" - no surface offers that mode; it travelled all the+way to the helper and failed as "unsupported mode: retain". The page's own+submit guards cover some of these, but /queue/add is also the API, and a+stale page or a script never runs those guards. /queue/retry copies params+verbatim, so a Retry of such a job failed the same way.+"""+from __future__ import annotations++import copy+import os+import sys+import tempfile+import unittest+from pathlib import Path+from unittest import mock++ROOT = Path(__file__).resolve().parent+sys.path.insert(0, str(ROOT))+os.environ.setdefault("PHOSPHENE_ANALYTICS_DISABLED", "1")++import mlx_ltx_panel as P # noqa: E402++routes_queue = sys.modules["panel.routes_queue"]+++class _H:+ def __init__(self, form=None):+ self.status, self.payload = None, None+ self._form = {k: [v] for k, v in (form or {}).items()}++ def _read_form_body(self):+ return b"", self._form++ def _json(self, payload, status=200):+ self.payload, self.status = payload, status+++class _QueueTest(unittest.TestCase):+ def setUp(self):+ with P.LOCK:+ self.saved = {k: copy.deepcopy(P.STATE.get(k))+ for k in ("queue", "history", "current")}+ P.STATE["queue"], P.STATE["history"], P.STATE["current"] = [], [], None+ self._p = mock.patch.object(P, "persist_queue", lambda: None)+ self._p.start()+ self.tmp = tempfile.TemporaryDirectory()+ self.clip = Path(self.tmp.name) / "clip.mp4"+ self.clip.write_bytes(b"\0" * 64)+ self.pic = Path(self.tmp.name) / "pic.png"+ self.pic.write_bytes(b"\0" * 64)++ def tearDown(self):+ self._p.stop()+ with P.LOCK:+ for k, v in self.saved.items():+ P.STATE[k] = v+ self.tmp.cleanup()++ def add(self, **form) -> _H:+ h = _H(form)+ routes_queue.post_run(h, "/queue/add", {}, "")+ return h+++class TheQueueRefusesEmptyInputs(_QueueTest):+ def assertRefused(self, h, *words):+ self.assertEqual(h.status, 400, h.payload)+ self.assertEqual(h.payload.get("code"), "input_missing", h.payload)+ for w in words:+ self.assertIn(w, h.payload["error"])+ self.assertEqual(P.STATE["queue"], [], "nothing may be queued")++ def test_upscale_with_no_clip(self):+ self.assertRefused(self.add(mode="upscale", upscale_source_path=""),+ "Pick the clip to fix first")++ def test_upscale_with_a_clip_that_is_gone(self):+ self.assertRefused(self.add(mode="upscale",+ upscale_source_path=str(self.clip) + ".gone"),+ "not found")++ def test_control_with_no_clip(self):+ self.assertRefused(self.add(mode="control", control_video_path=""),+ "Control needs a clip to follow")++ def test_image_mode_with_no_picture(self):+ self.assertRefused(self.add(mode="i2v", prompt="x"),+ "Image mode needs a reference image")++ def test_image_with_clean_audio_and_no_picture(self):+ self.assertRefused(self.add(mode="i2v_clean_audio", prompt="x"),+ "Image mode needs a reference image")++ def test_lipsync_with_no_audio(self):+ self.assertRefused(self.add(mode="a2v", prompt="x", image=str(self.pic)),+ "Lip-sync needs a song")++ def test_an_unknown_mode(self):+ self.assertRefused(self.add(mode="retain", prompt="x"),+ "Unknown render mode 'retain'")++ def test_jobs_with_their_inputs_still_queue(self):+ for form in ({"mode": "t2v", "prompt": "a lighthouse"},+ {"mode": "i2v", "prompt": "x", "image": str(self.pic)},+ {"mode": "upscale", "upscale_source_path": str(self.clip)},+ {"mode": "control", "prompt": "x",+ "control_video_path": str(self.clip)}):+ with self.subTest(form=form):+ h = self.add(**form)+ self.assertNotEqual(h.payload.get("code"), "input_missing", h.payload)+++class RetryRefusesTheSameWay(_QueueTest):+ def test_retry_of_an_input_less_job_is_refused(self):+ src = {"id": "old1", "status": "failed",+ "params": {"mode": "upscale", "upscale_source_path": "",+ "quality": "balanced"}}+ P.STATE["history"].append(src)+ h = _H({"id": "old1"})+ routes_queue.post_queue_retry(h, "/queue/retry", {}, "")+ self.assertEqual(h.status, 400, h.payload)+ self.assertEqual(h.payload.get("code"), "input_missing")+ self.assertEqual(P.STATE["queue"], [])+++class RetrySmallerShortensAnExtend(_QueueTest):+ def test_extend_frames_are_halved(self):+ """Codex 4.17.5: Extend renders extend_frames, not frames - "smaller"+ must shrink what that pipeline consumes."""+ P.STATE["history"].append({"id": "ext1", "status": "failed", "params": {+ "mode": "extend", "video_path": str(self.clip), "extend_frames": 6,+ "quality": "standard", "width": 768, "height": 448, "frames": 121}})+ h = _H({"id": "ext1", "smaller": "1"})+ routes_queue.post_queue_retry(h, "/queue/retry", {}, "")+ self.assertEqual(h.status, 200, h.payload)+ self.assertEqual(P.STATE["queue"][-1]["params"]["extend_frames"], 3)+++class ThePureCheck(unittest.TestCase):+ def test_music_image_and_train_are_not_judged_here(self):+ for mode in ("music", "image", "train"):+ self.assertIsNone(P.job_input_refusal({"mode": mode}))++ def test_every_dispatched_video_mode_is_known(self):+ """The set must cover every mode run_job_inner dispatches, or a real+ mode would be refused as unknown."""+ for mode in ("t2v", "i2v", "i2v_clean_audio", "extend", "keyframe",+ "a2v", "retake", "restore", "ingredients", "control",+ "upscale", "sharp_export"):+ self.assertIn(mode, P.QUEUEABLE_VIDEO_MODES)++ def test_the_unpicked_audio_placeholder_reads_as_not_picked(self):+ msg = P.job_input_refusal({"mode": "a2v", "audio": str(P.AUDIO_DEFAULT)})+ if not P.AUDIO_DEFAULT.exists():+ self.assertEqual(msg, P.INPUT_MISSING_AUDIO)+++if __name__ == "__main__":+ unittest.main(verbosity=2)diff --git a/test_separator_retry.py b/test_separator_retry.pynew file mode 100644index 0000000..d88fa21--- /dev/null+++ b/test_separator_retry.py@@ -0,0 +1,312 @@+"""4.17.5 (fleet): the voice separator install survives a bad connection, and+when it does fail it says why.++THE FIELD SHAPE (4.17.4): separator_install failed with weights_failed on two+installs (the package installed, the 80 MB htdemucs model did not download)+and pip_failed on one (twice, 33 s apart, at panel boot). demucs fetches its+model through torch.hub in ONE request - no timeout, no resume - from+dl.fbaipublicfiles.com; the package step ran once, and a dropped connection+ended both. Neither failure said whether the network, the disk or the+resolver was to blame.++THE FIX, each part tested here:+ * a2v_stems_deps.sh retries a NETWORK or TIMEOUT package failure 3 times -+ and only those (a resolver conflict fails the same way again); it records+ the cause (install_cause.sh words) next to the class, prints a plain last+ line the panel's card shows with its Try again, and never lets a raw+ "error:" line reach Pinokio (which ends the whole Install/Update on it);+ * a2v_separate.py --prefetch downloads the model itself into torch.hub's+ own cache path: resumable (HTTP Range), with a timeout, four attempts, a+ sha256 check the way torch.hub checks it, and an optional mirror;+ * the panel's separator_install event carries the cause.+"""+from __future__ import annotations++import hashlib+import http.server+import json+import os+import re+import shutil+import stat+import subprocess+import sys+import tempfile+import threading+import unittest+from pathlib import Path+from unittest import mock++ROOT = Path(__file__).resolve().parent+sys.path.insert(0, str(ROOT))+sys.path.insert(0, str(ROOT / "scripts"))+os.environ.setdefault("PHOSPHENE_ANALYTICS_DISABLED", "1")++import a2v_separate as SEP # noqa: E402++SCRIPT = ROOT / "scripts" / "pinokio" / "a2v_stems_deps.sh"+CAUSE = ROOT / "scripts" / "pinokio" / "install_cause.sh"+PINOKIO_BREAK = re.compile(r"error:|errno ", re.I)+++def _x(path: Path, body: str) -> None:+ path.write_text(body)+ path.chmod(path.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)+++class _App:+ """The installer in a fake app tree. A fake engine `python` answers the pin+ dump, the import probe (ok once uv "installed") and the runner's prefetch;+ a fake `uv` fails `uv_fails` times with `uv_text` first."""++ def __init__(self, uv_fails=0, uv_text="", prefetch_ok=True):+ self.tmp = Path(tempfile.mkdtemp(prefix="sep-"))+ pin = self.tmp / "scripts" / "pinokio"+ pin.mkdir(parents=True)+ shutil.copy(SCRIPT, pin / SCRIPT.name)+ shutil.copy(CAUSE, pin / CAUSE.name)+ (self.tmp / "scripts" / "a2v_separate.py").write_text("# fake runner\n")+ self.mlx = self.tmp / "ltx-2-mlx"+ (self.mlx / "env" / "bin").mkdir(parents=True)+ self.mark = self.tmp / "installed.mark"+ self.count = self.tmp / "uv.count"+ self.count.write_text("0")+ prefetch = ("echo 'vocal separator ready'; exit 0" if prefetch_ok else+ "echo 'separator weights: attempt 4 of 4 did not finish (URLError: "+ "<urlopen error [Errno 8] nodename nor servname provided>)' >&2; "+ "echo 'Traceback (most recent call last):' >&2; exit 1")+ _x(self.mlx / "env" / "bin" / "python3.11",+ "#!/bin/bash\n"+ f"if [ \"$1\" = - ]; then cat >/dev/null; echo 'torch==2.11.0'; exit 0; fi\n"+ f"if [ \"$1\" = -c ]; then [ -f '{self.mark}' ] && exit 0;"+ " echo \"ModuleNotFoundError: No module named 'demucs'\" >&2; exit 1; fi\n"+ f"case \"$*\" in *--prefetch*) {prefetch} ;; esac\nexit 0\n")+ self.bin = self.tmp / "bin"+ self.bin.mkdir()+ _x(self.bin / "uv",+ "#!/bin/bash\n"+ f"n=$(cat '{self.count}'); n=$((n+1)); echo $n > '{self.count}'\n"+ f"if [ $n -le {uv_fails} ]; then printf '%s\\n' \"{uv_text}\" >&2; exit 2; fi\n"+ f"touch '{self.mark}'; echo 'Installed 11 packages'\n")++ def run(self):+ env = dict(os.environ, PATH=f"{self.bin}:/usr/bin:/bin",+ PHOSPHENE_SEPARATOR_RETRY_WAIT="0",+ PHOSPHENE_SEPARATOR_HOME=str(self.tmp / "demucs"))+ return subprocess.run(["bash", str(self.tmp / "scripts" / "pinokio" / SCRIPT.name),+ str(self.mlx)], capture_output=True, text=True,+ env=env, timeout=60)++ def record(self) -> dict:+ return json.loads((self.tmp / "demucs" / "last_install.json").read_text())+++NET = "error: Failed to fetch: https://pypi.org/simple/demucs/\n Caused by: Connection reset by peer"+RESOLVER = (" x No solution found when resolving dependencies:\n Because torchaudio==2.11.0 "+ "depends on torch==2.11.0 and you require torch==2.1.0, we can conclude")+++class TheInstaller(unittest.TestCase):+ def test_a_dropped_connection_is_retried(self):+ app = _App(uv_fails=2, uv_text=NET)+ r = app.run()+ out = r.stdout + r.stderr+ self.assertEqual(r.returncode, 0, out)+ self.assertEqual(app.count.read_text().strip(), "3")+ self.assertEqual(app.record()["outcome"], "ok")+ self.assertIsNone(PINOKIO_BREAK.search(out),+ "a retried attempt printed a line Pinokio stops on")++ def test_a_resolver_conflict_is_not_retried_and_says_so(self):+ app = _App(uv_fails=9, uv_text=RESOLVER)+ r = app.run()+ self.assertEqual(r.returncode, 1)+ self.assertEqual(app.count.read_text().strip(), "1")+ rec = app.record()+ self.assertEqual((rec["outcome"], rec["error_class"], rec["cause"]),+ ("failed", "pip_failed", "uv_error"))+ self.assertIn("could not resolve demucs", r.stderr.strip().splitlines()[-1])++ def test_a_network_failure_that_persists_names_the_network(self):+ app = _App(uv_fails=9, uv_text=NET)+ r = app.run()+ self.assertEqual(r.returncode, 1)+ self.assertEqual(app.count.read_text().strip(), "3")+ self.assertEqual(app.record()["cause"], "network")+ self.assertIn("could not be reached", r.stderr.strip().splitlines()[-1])+ self.assertIsNone(PINOKIO_BREAK.search(r.stdout + r.stderr))++ def test_a_weights_failure_records_its_cause(self):+ app = _App(prefetch_ok=False)+ r = app.run()+ self.assertEqual(r.returncode, 1)+ rec = app.record()+ self.assertEqual((rec["error_class"], rec["cause"]), ("weights_failed", "network"))+ self.assertIsNone(PINOKIO_BREAK.search(r.stdout + r.stderr),+ "the runner's URLError / Errno lines must be defused")++ def test_the_record_carries_no_path(self):+ app = _App(uv_fails=9, uv_text=NET)+ app.run()+ raw = (app.tmp / "demucs" / "last_install.json").read_text()+ self.assertNotIn("/", raw.replace('"via"', ""))+++class _Server:+ """A one-file HTTP server: the first GET dies half way, later GETs honour+ Range - a dropped connection and a resume."""++ def __init__(self, payload: bytes, *, cut_first=True, corrupt_first=False):+ self.payload, self.hits = payload, []+ outer = self++ class H(http.server.BaseHTTPRequestHandler):+ def log_message(self, *a):+ pass++ def do_GET(self):+ outer.hits.append(self.headers.get("Range"))+ first = len(outer.hits) == 1+ body = outer.payload+ if first and corrupt_first:+ body = b"x" * len(body)+ rng = self.headers.get("Range")+ start = int(rng.split("=")[1].split("-")[0]) if rng else 0+ self.send_response(206 if rng else 200)+ self.send_header("Content-Length", str(len(body) - start))+ self.end_headers()+ chunk = body[start:]+ if first and cut_first:+ self.wfile.write(chunk[: len(chunk) // 2])+ self.wfile.flush()+ self.connection.shutdown(2)+ return+ self.wfile.write(chunk)++ self.httpd = http.server.ThreadingHTTPServer(("127.0.0.1", 0), H)+ self.url = f"http://127.0.0.1:{self.httpd.server_address[1]}"+ threading.Thread(target=self.httpd.serve_forever, daemon=True).start()++ def close(self):+ self.httpd.shutdown()+++class ThePrefetch(unittest.TestCase):+ def setUp(self):+ self.payload = os.urandom(300_000)+ sha = hashlib.sha256(self.payload).hexdigest()+ self.name = f"955717e8-{sha[:8]}.th"+ self.home = Path(tempfile.mkdtemp(prefix="torchhome-"))+ self.env = mock.patch.dict(os.environ, {"TORCH_HOME": str(self.home)})+ self.env.start()++ def tearDown(self):+ self.env.stop()++ def _files(self, srv):+ return [(self.name, f"{srv.url}/{self.name}")]++ def dest(self) -> Path:+ return self.home / "hub" / "checkpoints" / self.name++ def test_a_dropped_download_resumes(self):+ srv = _Server(self.payload, cut_first=True)+ try:+ with mock.patch.object(SEP, "model_files", lambda name: self._files(srv)):+ SEP.prefetch("htdemucs", sleep=lambda s: None)+ finally:+ srv.close()+ self.assertEqual(self.dest().read_bytes(), self.payload)+ self.assertIsNone(srv.hits[0])+ self.assertTrue(srv.hits[1] and srv.hits[1].startswith("bytes="),+ "the second attempt must resume, not start over")++ def test_a_corrupt_file_is_refetched(self):+ srv = _Server(self.payload, cut_first=False, corrupt_first=True)+ try:+ with mock.patch.object(SEP, "model_files", lambda name: self._files(srv)):+ SEP.prefetch("htdemucs", sleep=lambda s: None)+ finally:+ srv.close()+ self.assertEqual(self.dest().read_bytes(), self.payload)++ def test_an_unreachable_host_fails_after_four_attempts(self):+ calls = []+ with mock.patch.object(SEP, "model_files",+ lambda name: [(self.name, "http://127.0.0.1:9/x.th")]), \+ mock.patch.object(SEP, "DOWNLOAD_TIMEOUT_S", 2):+ with self.assertRaises(SEP.DownloadExhausted):+ SEP.prefetch("htdemucs", sleep=calls.append)+ self.assertEqual(len(calls), 3)++ def test_the_mirror_is_tried_after_the_official_host(self):+ srv = _Server(self.payload, cut_first=False)+ try:+ with mock.patch.object(SEP, "model_files",+ lambda name: [(self.name, "http://127.0.0.1:9/" + self.name)]), \+ mock.patch.object(SEP, "DOWNLOAD_TIMEOUT_S", 2), \+ mock.patch.dict(os.environ, {"PHOSPHENE_DEMUCS_MIRROR": srv.url}):+ SEP.prefetch("htdemucs", sleep=lambda s: None)+ finally:+ srv.close()+ self.assertEqual(self.dest().read_bytes(), self.payload)++ def test_an_already_complete_file_downloads_nothing(self):+ self.dest().parent.mkdir(parents=True)+ self.dest().write_bytes(self.payload)+ with mock.patch.object(SEP, "_fetch_one", side_effect=AssertionError("fetched")), \+ mock.patch.object(SEP, "model_files",+ lambda name: [(self.name, "http://x/" + self.name)]):+ SEP.prefetch("htdemucs", sleep=lambda s: None)++ def test_exhausted_downloads_end_the_prefetch_without_torch_hub(self):+ """Codex 4.17.5: after four failed attempts main() fell through to+ torch.hub's own download - one request, no timeout - which could hang+ an Install for good."""+ loaded = []+ with mock.patch.object(SEP, "prefetch",+ side_effect=SEP.DownloadExhausted("unreachable")), \+ mock.patch.object(SEP, "load_model", lambda name: loaded.append(name)):+ self.assertEqual(SEP.main(["--prefetch"]), 3)+ self.assertEqual(loaded, [])++ def test_a_table_problem_still_falls_back_with_a_timeout(self):+ import socket+ loaded = []+ saved = socket.getdefaulttimeout()+ try:+ with mock.patch.object(SEP, "prefetch", side_effect=KeyError("htdemucs")), \+ mock.patch.object(SEP, "load_model", lambda name: loaded.append(name)):+ self.assertEqual(SEP.main(["--prefetch"]), 0)+ self.assertEqual(socket.getdefaulttimeout(), SEP.DOWNLOAD_TIMEOUT_S)+ finally:+ socket.setdefaulttimeout(saved)+ self.assertEqual(loaded, ["htdemucs"])++ def test_the_real_table_names_htdemucs(self):+ try:+ files = SEP.model_files("htdemucs")+ except ImportError:+ self.skipTest("demucs not in this interpreter")+ self.assertEqual(files[0][0], "955717e8-8726e21a.th")+ self.assertTrue(files[0][1].startswith("https://dl.fbaipublicfiles.com/"))+++class ThePanelReportsTheCause(unittest.TestCase):+ def test_event_cause(self):+ import mlx_ltx_panel as P+ sent = []+ with mock.patch.object(P, "_analytics_capture", lambda e, p: sent.append(p)):+ P._analytics_separator_install("failed", "update", "weights_failed",+ ready=True, weights=False, cause="network")+ P._analytics_separator_install("failed", "update", "pip_failed",+ ready=False, weights=False, cause="/etc/x")+ P._analytics_separator_install("ok", "update", ready=True, weights=True,+ cause="network")+ self.assertEqual(sent[0]["cause"], "network")+ self.assertEqual(sent[1]["cause"], "other")+ self.assertNotIn("cause", sent[2])+++if __name__ == "__main__":+ unittest.main(verbosity=2)diff --git a/test_small_fixes_4175.py b/test_small_fixes_4175.pynew file mode 100644index 0000000..ed1f399--- /dev/null+++ b/test_small_fixes_4175.py@@ -0,0 +1,135 @@+"""4.17.5 (fleet) - the small ones, each a field failure on 4.17.x.++ * "ffprobe not found on PATH. Install it with: brew install ffmpeg" on a+ Control export: the engine library looks ffmpeg AND ffprobe up on PATH,+ and every child spawn prepended only FFMPEG's folder - an ffprobe the+ panel had resolved from another folder was invisible to the child.+ * A YuE2 song failed after the whole model load on "unsupported tensor+ targets: diffusion_model..." - a video (LTX) LoRA had been copied into the+ music LoRA folder and picked. It is now refused BY NAME at the queue (and+ the picker says what the file is), from the safetensors header alone.+ * "[METAL] Command buffer execution failed: Impacting Interactivity" - the+ GPU watchdog under its other name - was filed as `other` (4 renders).+"""+from __future__ import annotations++import json+import os+import struct+import sys+import tempfile+import unittest+from pathlib import Path+from unittest import mock++ROOT = Path(__file__).resolve().parent+sys.path.insert(0, str(ROOT))+os.environ.setdefault("PHOSPHENE_ANALYTICS_DISABLED", "1")++import mlx_ltx_panel as P # noqa: E402+from scripts.pinokio import music_lora_fetch as M # noqa: E402+++def write_safetensors(path: Path, keys: list[str]) -> None:+ header = {k: {"dtype": "BF16", "shape": [1, 1], "data_offsets": [0, 2]} for k in keys}+ raw = json.dumps(header).encode()+ path.write_bytes(struct.pack("<Q", len(raw)) + raw + b"\0\0")+++class FfprobeReachesTheChild(unittest.TestCase):+ def test_both_folders_lead_the_path(self):+ with tempfile.TemporaryDirectory() as a, tempfile.TemporaryDirectory() as b:+ ffmpeg, ffprobe = Path(a) / "ffmpeg", Path(b) / "ffprobe"+ ffmpeg.write_text(""); ffprobe.write_text("")+ with mock.patch.object(P, "FFMPEG_BIN", Path(a)), \+ mock.patch.object(P, "FFPROBE", ffprobe):+ path = P.media_tool_path(f"/usr/bin:{a}:/bin")+ parts = path.split(":")+ self.assertEqual(parts[:2], [a, b])+ self.assertEqual(parts.count(a), 1, "no duplicate entries")+ self.assertIn("/usr/bin", parts)++ def test_a_missing_ffprobe_adds_nothing(self):+ with tempfile.TemporaryDirectory() as a:+ with mock.patch.object(P, "FFMPEG_BIN", Path(a)), \+ mock.patch.object(P, "FFPROBE", Path("/nonexistent/ffprobe")):+ self.assertEqual(P.media_tool_path("/bin"), f"{a}:/bin")++ def test_no_child_spawn_prepends_ffmpeg_alone(self):+ src = (ROOT / "mlx_ltx_panel.py").read_text()+ self.assertNotIn('env["PATH"] = f"{FFMPEG_BIN}:', src)+ self.assertGreaterEqual(src.count('media_tool_path(env.get("PATH", ""))'), 5)+++class AVideoLoraIsNotAMusicVoice(unittest.TestCase):+ def setUp(self):+ self.tmp = Path(tempfile.mkdtemp(prefix="music-loras-"))+ (self.tmp / "user").mkdir()+ self.video = self.tmp / "user" / "my_ltx_style.safetensors"+ write_safetensors(self.video, [+ "diffusion_model.transformer_blocks.0.attn1.to_q.lora_A.weight",+ "diffusion_model.transformer_blocks.0.attn1.to_q.lora_B.weight"])+ self.voice = self.tmp / "user" / "my_voice.safetensors"+ write_safetensors(self.voice, [+ "base_model.model.model.layers.0.self_attn.q_proj.lora_A.weight",+ "base_model.model.model.layers.0.self_attn.q_proj.lora_B.weight"])+ self.nar = self.tmp / "user" / "nar.safetensors"+ write_safetensors(self.nar, ["layers.3.nar_mlp.up_proj.lora_A",+ "layers.3.nar_mlp.up_proj.lora_B"])++ def test_the_header_check(self):+ self.assertIn("video LoRA", M.music_adapter_problem(self.video))+ self.assertIn(self.video.name, M.music_adapter_problem(self.video))+ self.assertEqual(M.music_adapter_problem(self.voice), "")+ self.assertEqual(M.music_adapter_problem(self.nar), "")+ junk = self.tmp / "user" / "junk.safetensors"+ junk.write_bytes(b"not a safetensors file")+ self.assertEqual(M.music_adapter_problem(junk), "",+ "an unreadable file is the engine's to name, not ours")++ def test_the_engine_agrees_on_what_a_music_adapter_is(self):+ """yue2_lora's own rule, applied to the same keys - the two+ definitions must not drift apart."""+ try:+ from scripts.music import yue2_lora as Y+ except Exception as exc: # noqa: BLE001+ self.skipTest(f"engine module not importable here: {exc}")+ for path, ok in ((self.voice, True), (self.nar, True), (self.video, False)):+ keys = M.safetensors_keys(path)+ engine_ok = any(Y._describe(Y.normalize_key(k).rsplit(".", 1)[0])+ for k in keys)+ self.assertEqual(engine_ok, ok, path.name)++ def test_the_queue_refuses_it_by_name(self):+ with mock.patch.object(P, "MUSIC_LORAS", self.tmp):+ got = P.music_lora_foreign(["user/my_ltx_style.safetensors:0.8"])+ self.assertEqual(len(got), 1)+ self.assertIn("my_ltx_style.safetensors", got[0])+ self.assertEqual(P.music_lora_foreign(["user/my_voice.safetensors:1.0"]), [])+ src = (ROOT / "mlx_ltx_panel.py").read_text()+ i = src.index("missing = music_lora_unresolved(form.get(\"music_loras\"))")+ self.assertIn("music_lora_foreign(form.get(\"music_loras\"))", src[i:i + 800])++ def test_the_picker_says_what_the_file_is(self):+ entries = {e["file"]: e for e in M.pack_adapters(self.tmp)}+ self.assertIn("video LoRA", entries["my_ltx_style.safetensors"]["note"])+ self.assertTrue(entries["my_ltx_style.safetensors"].get("problem"))+ self.assertNotIn("problem", entries["my_voice.safetensors"])+ js = (ROOT / "webapp" / "js" / "characters.js").read_text()+ self.assertIn("a.problem ? 'disabled' : ''", js)+++class TheWatchdogUnderItsOtherName(unittest.TestCase):+ def test_impacting_interactivity_is_the_watchdog(self):+ line = ("[METAL] Command buffer execution failed: Impacting Interactivity "+ "(0000000e:kIOGPUCommandBufferCallbackErrorImpactingInteractivity)")+ self.assertEqual(P._analytics_error_class(line), "metal_watchdog")++ def test_out_of_memory_stays_out_of_memory(self):+ line = ("[METAL] Command buffer execution failed: Insufficient Memory "+ "(00000008:kIOGPUCommandBufferCallbackErrorOutOfMemory)")+ self.assertEqual(P._analytics_error_class(line), "metal_oom")+++if __name__ == "__main__":+ unittest.main(verbosity=2)diff --git a/test_update_noop_pull.py b/test_update_noop_pull.pynew file mode 100644index 0000000..91dfd80--- /dev/null+++ b/test_update_noop_pull.py@@ -0,0 +1,235 @@+"""4.17.5 (fleet): an in-panel "Update now" that pulls NOTHING is not an update.++THE FIELD SHAPE: two installs sent update_outcome {stage restart_pending,+outcome failed, from 4.17.4, version 4.17.4}. Both had the update pop-up shown+on 4.17.4 itself, pressed "Update now", and came back on 4.17.4. The pull+found nothing new, but the panel still turned the pill into "Restart+Phosphene" and the banner into "Updated to 4.17.4 - restart to finish"; the+restart booted the same build and the boot report counted it as a failed+update. A false failure, and users told to restart for nothing.++THE FIX, tested here against real throwaway git repos:+ * /version/pull answers moved=False when HEAD did not move and the process+ already runs what is on disk - no post_update, no restart, and the+ "pressed Update" marker is cleared so the next boot reports nothing;+ * a pull that moved HEAD still says moved=True;+ * the marker carries the build SHA: a different build under the SAME+ VERSION counts as landed, the same build does not;+ * a local HEAD that is not among public main's commits, with the remote's+ own VERSION, is not "30+ behind" (the pop-up said "4.17.4 is out - you're+ on 4.17.4");+ * the page handles moved=False without arming the restart pill.+"""+from __future__ import annotations++import json+import os+import shutil+import subprocess+import sys+import tempfile+import unittest+from pathlib import Path+from unittest import mock++ROOT = Path(__file__).resolve().parent+sys.path.insert(0, str(ROOT))++import mlx_ltx_panel as P # noqa: E402++routes_meta = sys.modules["panel.routes_meta"]+GIT_ENV = dict(os.environ, GIT_CONFIG_GLOBAL="/dev/null", GIT_CONFIG_SYSTEM="/dev/null",+ GIT_AUTHOR_NAME="t", GIT_AUTHOR_EMAIL="t@t", GIT_COMMITTER_NAME="t",+ GIT_COMMITTER_EMAIL="t@t")+++def git(cwd: Path, *args: str) -> str:+ return subprocess.run(["git", *args], cwd=str(cwd), env=GIT_ENV, check=True,+ capture_output=True, text=True, errors="replace").stdout.strip()+++class _H:+ def __init__(self):+ self.status, self.payload = None, None++ def _json(self, payload, status=200):+ self.payload, self.status = payload, status++[email protected](shutil.which("git"), "git not on PATH")+class NothingNewIsNotAnUpdate(unittest.TestCase):+ def setUp(self):+ self.tmp = tempfile.TemporaryDirectory()+ base = Path(self.tmp.name)+ self.up, self.clone = base / "up", base / "clone"+ self.up.mkdir()+ git(self.up, "init", "-q", "-b", "main", ".")+ (self.up / "VERSION").write_text("4.17.4\n")+ guard = ROOT / "scripts" / "pinokio" / "update_obstruction_guard.sh"+ (self.up / "scripts" / "pinokio").mkdir(parents=True)+ shutil.copy(guard, self.up / "scripts" / "pinokio" / guard.name)+ git(self.up, "add", ".")+ git(self.up, "commit", "-qm", "v1")+ git(base, "clone", "-q", str(self.up), str(self.clone))+ self.settings = {"analytics_update_pressed": "4.17.4@" + "a" * 40}+ self.post_update = []+ real_capture = P._git_capture+ self._patches = [+ mock.patch.object(P, "ROOT", self.clone),+ mock.patch.object(P, "_git_capture",+ lambda args, cwd=None: real_capture(args, cwd=self.clone)),+ mock.patch.object(P, "_detect_local_install_state", lambda: None),+ mock.patch.object(P, "_check_remote_once", lambda: None),+ mock.patch.object(P, "get_version_state", lambda: {"stale_process": False}),+ mock.patch.object(P, "post_update_start",+ lambda trigger: self.post_update.append(trigger)),+ mock.patch.object(P, "_settings_set_internal",+ lambda **kw: self.settings.update(kw)),+ mock.patch.dict(P._VERSION_STATE, {}, clear=False),+ mock.patch.dict(os.environ, {"GIT_CONFIG_GLOBAL": "/dev/null",+ "GIT_CONFIG_SYSTEM": "/dev/null"}),+ ]+ for p in self._patches:+ p.start()++ def tearDown(self):+ for p in reversed(self._patches):+ p.stop()+ self.tmp.cleanup()++ def _pull(self) -> _H:+ h = _H()+ routes_meta.post_version_pull(h, "/version/pull", {}, "")+ return h++ def test_an_up_to_date_pull_asks_for_no_restart(self):+ h = self._pull()+ self.assertTrue(h.payload["ok"], h.payload)+ self.assertIs(h.payload.get("moved"), False, h.payload)+ self.assertEqual(self.post_update, [])+ self.assertEqual(self.settings["analytics_update_pressed"], "",+ "a no-op pull must not leave a marker the next boot "+ "reports as a failed update")+ self.assertEqual(P._VERSION_STATE.get("pull_state"), "current")++ def test_a_pull_that_moved_head_still_finishes_the_update(self):+ (self.up / "VERSION").write_text("4.17.5\n")+ git(self.up, "commit", "-qam", "v2")+ h = self._pull()+ self.assertTrue(h.payload["ok"], h.payload)+ self.assertIs(h.payload.get("moved"), True, h.payload)+ self.assertEqual(self.post_update, ["update_now"])+ self.assertNotEqual(self.settings["analytics_update_pressed"], "")++ def test_a_stale_process_keeps_its_restart(self):+ """Disk already moved under this process: nothing to pull, but the+ restart IS needed, and the marker must survive to measure it."""+ with mock.patch.object(P, "get_version_state",+ lambda: {"stale_process": True}):+ h = self._pull()+ self.assertTrue(h.payload["ok"], h.payload)+ self.assertNotEqual(self.settings["analytics_update_pressed"], "")+++class FinishingTheUpdateHoldsTheGpuGate(unittest.TestCase):+ """Codex 4.17.5 (on bc09bf3): post_update.sh ran while Prompt Enhance or an+ inline image render held _GPU_LOCK - Enhance had its helper killed under+ it, an image render ran against packages being replaced."""++ def test_the_run_waits_for_the_gate_and_holds_it(self):+ import threading+ ran, held = [], []++ def fake_run():+ ran.append(1)+ held.append(not P._GPU_LOCK.acquire(blocking=False))+ P._GPU_LOCK.acquire() # an Enhance is in flight+ try:+ with mock.patch.object(P, "_post_update_run", fake_run):+ t = threading.Thread(target=P._post_update_thread, daemon=True)+ t.start()+ t.join(0.5)+ self.assertEqual(ran, [], "the script started under an Enhance")+ P._GPU_LOCK.release()+ t.join(5)+ finally:+ if P._GPU_LOCK.locked() and not ran:+ P._GPU_LOCK.release()+ self.assertEqual(ran, [1])+ self.assertEqual(held, [True], "the gate was not held during the run")+ self.assertFalse(P._GPU_LOCK.locked(), "the gate must be released after")+++class TheMarkerKnowsTheBuild(unittest.TestCase):+ def _stamp(self, version, sha):+ return {"sha": sha, "short": sha[:7] if sha else None, "version": version,+ "branch": "main", "commit_date": None}++ def test_same_version_same_build_did_not_land(self):+ with mock.patch.object(P, "boot_build_stamp", lambda: self._stamp("4.17.4", "b" * 40)):+ self.assertEqual(P.update_pressed_landed("4.17.4@" + "b" * 40), (False, "4.17.4"))++ def test_same_version_new_build_landed(self):+ with mock.patch.object(P, "boot_build_stamp", lambda: self._stamp("4.17.4", "c" * 40)):+ self.assertEqual(P.update_pressed_landed("4.17.4@" + "b" * 40), (True, "4.17.4"))++ def test_new_version_landed_and_old_markers_still_read(self):+ with mock.patch.object(P, "boot_build_stamp", lambda: self._stamp("4.17.5", "c" * 40)):+ self.assertEqual(P.update_pressed_landed("4.17.4"), (True, "4.17.4"))+ self.assertEqual(P.update_pressed_landed("4.17.4@" + "b" * 40), (True, "4.17.4"))+ with mock.patch.object(P, "boot_build_stamp", lambda: self._stamp("4.17.4", "c" * 40)):+ self.assertEqual(P.update_pressed_landed("4.17.4"), (False, "4.17.4"))++ def test_the_route_writes_version_at_sha(self):+ with mock.patch.object(P, "boot_build_stamp", lambda: self._stamp("4.17.4", "d" * 40)):+ self.assertEqual(P.update_pressed_marker(), "4.17.4@" + "d" * 40)+ src = (ROOT / "panel" / "routes_meta.py").read_text()+ self.assertIn("analytics_update_pressed=P.update_pressed_marker()", src)+++class AnUnlistedHeadOnTheLatestReleaseIsNotBehind(unittest.TestCase):+ def _check(self, local_sha, local_version, remote_version):+ commits = [{"sha": "r" * 40, "commit": {"message": "release(v4.17.4)",+ "author": {"name": "x", "date": ""}}}]+ state = dict(P._VERSION_STATE)+ with mock.patch.dict(P._VERSION_STATE, state, clear=True), \+ mock.patch.object(P, "_detect_local_install_state",+ lambda: P._VERSION_STATE.update(+ local_sha=local_sha, local_version=local_version,+ suppress_reason=None)), \+ mock.patch.object(P, "_fetch_remote_commits", lambda limit=30: commits), \+ mock.patch.object(P, "_fetch_raw_text", lambda url, timeout=10: remote_version), \+ mock.patch.object(P, "_fetch_broadcast", lambda: None):+ P._check_remote_once()+ return dict(P._VERSION_STATE)++ def test_same_release_unknown_sha_is_current(self):+ st = self._check("m" * 40, "4.17.4", "4.17.4")+ self.assertEqual(st["behind_by"], 0)+ self.assertFalse(st["behind_more_than"])+ self.assertEqual(st["commits_ahead"], [])++ def test_an_older_release_is_still_behind(self):+ st = self._check("o" * 40, "4.17.3", "4.17.4")+ self.assertGreater(st["behind_by"], 0)++ def test_the_tip_itself_is_current(self):+ st = self._check("r" * 40, "4.17.4", "4.17.4")+ self.assertEqual(st["behind_by"], 0)+++class ThePageDoesNotArmARestartForNothing(unittest.TestCase):+ def test_moved_false_returns_before_the_restart_pill(self):+ js = (ROOT / "webapp" / "js" / "health.js").read_text()+ body = js[js.index("async function versionDoPull("):]+ body = body[:body.index("\n}\n")]+ i_moved = body.index("data.moved === false")+ i_arm = body.index("_versionRestartPending = true")+ self.assertLess(i_moved, i_arm)+ branch = body[i_moved:i_arm]+ self.assertIn("return;", branch)+ self.assertIn("Already up to date", branch)+++if __name__ == "__main__":+ unittest.main(verbosity=2)diff --git a/test_update_now_post_update.py b/test_update_now_post_update.pynew file mode 100644index 0000000..b928b10--- /dev/null+++ b/test_update_now_post_update.py@@ -0,0 +1,204 @@+"""The panel's own "Update now" finishes the update like Pinokio's Update.++THE HOLE (found validating 4.17.4). /version/pull was a git pull and nothing+else; the restart after it ("Restart to finish update", or Stop/Start) never+ran scripts/post_update.sh, the step Pinokio's Update runs after its pull. So+whatever a release adds there silently did not happen for anyone who used the+panel's button: 4.17.3's Lip-sync voice separator, on a 16 GB Mac that then had+three Lip-sync jobs refused a second after the new build came up.++THE FIX: after a pull that moved HEAD the panel runs post_update.sh itself,+in the background, with Pinokio's environment for it; the queue holds and a+running render is waited out; /restart is refused until it has finished, and+a failure names its step. These tests run a REAL pull against throwaway repos+whose post_update.sh is a marker script, and a real subprocess.+"""+from __future__ import annotations++import os+import shutil+import subprocess+import sys+import tempfile+import time+import unittest+from pathlib import Path+from unittest import mock++ROOT = Path(__file__).resolve().parent+os.environ.setdefault("PHOSPHENE_ANALYTICS_DISABLED", "1")+os.environ.setdefault("PHOSPHENE_DISABLE_VERSION_CHECK", "1")+sys.path.insert(0, str(ROOT))++import mlx_ltx_panel as P # noqa: E402++routes_meta = sys.modules["panel.routes_meta"]+GIT_ENV = dict(os.environ, GIT_CONFIG_GLOBAL="/dev/null", GIT_CONFIG_SYSTEM="/dev/null",+ GIT_AUTHOR_NAME="t", GIT_AUTHOR_EMAIL="t@t", GIT_COMMITTER_NAME="t",+ GIT_COMMITTER_EMAIL="t@t")++# What the marker post_update.sh records: that it ran, and the env it ran in.+MARKER_SCRIPT = """#!/bin/bash+ROOT="${1:?}"+{ echo "ran $(git -C "$ROOT" rev-parse --short HEAD)"+ echo "MPS=${PYTORCH_ENABLE_MPS_FALLBACK:-}"+ echo "TORCH_LOAD=${TORCH_FORCE_NO_WEIGHTS_ONLY_LOAD:-}"+ echo "SSL=${SSL_CERT_FILE:-}"+ echo "PYTHONPATH=${PYTHONPATH:-}"+ echo "VENV=${VIRTUAL_ENV:-}"+} > "$ROOT/post_update_marker.txt"+echo "=== Phosphene post-update - marker step ==="+"""++FAILING_SCRIPT = """#!/bin/bash+echo "!! PHOSPHENE UPDATE FAILED: the mlx 0.31.1 pin"+echo "!! error: the Update did not complete"+exit 1+"""+++def git(cwd: Path, *args: str) -> str:+ return subprocess.run(["git", *args], cwd=str(cwd), env=GIT_ENV, check=True,+ capture_output=True, text=True, errors="replace").stdout.strip()+++class _H:+ def __init__(self):+ self.status, self.payload = None, None+ self.wfile = mock.Mock()++ def _json(self, payload, status=200):+ self.payload, self.status = payload, status+++def _wait_done(timeout=20.0):+ t0 = time.time()+ while time.time() - t0 < timeout:+ st = P.post_update_status()+ if not st.get("pending") and not st.get("active"):+ return st+ time.sleep(0.1)+ raise AssertionError(f"post_update never finished: {P.post_update_status()}")++[email protected](shutil.which("git"), "git not on PATH")+class UpdateNowRunsPostUpdate(unittest.TestCase):+ def setUp(self):+ self.tmp = tempfile.TemporaryDirectory()+ base = Path(self.tmp.name)+ self.up, self.clone = base / "up", base / "clone"+ (self.up / "scripts" / "pinokio").mkdir(parents=True)+ git(self.up, "init", "-q", "-b", "main", ".")+ (self.up / "VERSION").write_text("4.17.4\n")+ guard = ROOT / "scripts" / "pinokio" / "update_obstruction_guard.sh"+ shutil.copy(guard, self.up / "scripts" / "pinokio" / guard.name)+ git(self.up, "add", ".")+ git(self.up, "commit", "-qm", "4.17.4")+ git(base, "clone", "-q", str(self.up), str(self.clone))+ real_capture = P._git_capture+ self.helper = mock.Mock()+ self._patches = [+ mock.patch.object(P, "ROOT", self.clone),+ mock.patch.object(P, "HELPER", self.helper),+ mock.patch.object(P, "_git_capture",+ lambda args, cwd=None: real_capture(args, cwd=self.clone)),+ mock.patch.object(P, "_detect_local_install_state", lambda: None),+ mock.patch.object(P, "_check_remote_once", lambda: None),+ mock.patch.dict(P._VERSION_STATE, {}, clear=False),+ mock.patch.dict(os.environ, {"GIT_CONFIG_GLOBAL": "/dev/null",+ "GIT_CONFIG_SYSTEM": "/dev/null",+ "SSL_CERT_FILE": "/x/cacert.pem",+ "PYTHONPATH": "/x/shim"}),+ ]+ for p in self._patches:+ p.start()+ with P.POST_UPDATE_LOCK:+ P.POST_UPDATE.clear()+ P.POST_UPDATE.update({"state": "idle", "active": False, "pending": False})++ def tearDown(self):+ for p in reversed(self._patches):+ p.stop()+ with P.POST_UPDATE_LOCK:+ P.POST_UPDATE.clear()+ P.POST_UPDATE.update({"state": "idle", "active": False, "pending": False})+ self.tmp.cleanup()++ def _release(self, script: str, version: str = "4.17.5"):+ (self.up / "scripts" / "post_update.sh").write_text(script)+ (self.up / "VERSION").write_text(version + "\n")+ git(self.up, "add", ".")+ git(self.up, "commit", "-qm", version)++ def _pull(self):+ h = _H()+ routes_meta.post_version_pull(h, "/version/pull", {}, "")+ return h++ def test_update_now_runs_the_new_post_update_with_pinokios_env(self):+ self._release(MARKER_SCRIPT)+ h = self._pull()+ self.assertEqual(h.status, 200, h.payload)+ st = _wait_done()+ self.assertEqual(st["state"], "done", st)+ rec = (self.clone / "post_update_marker.txt").read_text()+ self.assertIn("ran " + git(self.clone, "rev-parse", "--short", "HEAD"), rec)+ self.assertIn("MPS=1", rec) # Pinokio's kernel hardcode+ self.assertIn("TORCH_LOAD=1", rec)+ self.assertIn("SSL=\n", rec) # Pinokio deletes /SSH|SSL/ keys+ self.assertIn("PYTHONPATH=\n", rec) # ...and PYTHONPATH+ self.assertIn("VENV=\n", rec) # never inside the panel's venv+ self.helper.kill.assert_called() # it had the packages open++ def test_a_pull_that_moves_nothing_runs_nothing(self):+ h = self._pull()+ self.assertEqual(h.status, 200, h.payload)+ self.assertEqual(P.post_update_status()["state"], "idle")++ def test_restart_waits_for_it_and_a_failure_blocks_restart_with_its_step(self):+ self._release(FAILING_SCRIPT)+ self._pull()+ st = _wait_done()+ self.assertEqual(st["state"], "failed")+ self.assertEqual(st["error"], "the mlx 0.31.1 pin")+ h = _H()+ with mock.patch.object(P, "persist_queue"), \+ mock.patch.object(P.threading, "Thread") as thread:+ routes_meta.post_restart(h, "/restart", {}, "")+ self.assertEqual(h.status, 409)+ self.assertIn("did not finish", h.payload["error"])+ self.assertIn("mlx 0.31.1 pin", h.payload["error"])+ thread.assert_not_called()++ def test_a_running_render_is_waited_out_and_the_queue_holds(self):+ self._release(MARKER_SCRIPT)+ with P.LOCK:+ saved = P.STATE.get("current")+ P.STATE["current"] = {"id": "busy"}+ try:+ self._pull()+ time.sleep(0.5)+ st = P.post_update_status()+ self.assertTrue(st["pending"])+ self.assertFalse((self.clone / "post_update_marker.txt").exists())+ self.assertIn("the update", P._external_build_hold())+ h = _H()+ routes_meta.post_restart(h, "/restart", {}, "")+ self.assertEqual(h.status, 409)+ self.assertIn("Finishing the update", h.payload["error"])+ finally:+ with P.LOCK:+ P.STATE["current"] = saved+ self.assertEqual(_wait_done()["state"], "done")+ self.assertTrue((self.clone / "post_update_marker.txt").exists())+ self.assertNotIn("the update", P._external_build_hold())++ def test_retry_route_and_status_field(self):+ from panel import routes as R # noqa: PLC0415+ self.assertIs(R.POST_ROUTES["/version/finish"], routes_meta.post_version_finish)+ src = (ROOT / "mlx_ltx_panel.py").read_text(encoding="utf-8")+ self.assertIn('snap["post_update"] = post_update_status()', src)+++if __name__ == "__main__":+ unittest.main()diff --git a/webapp/docs/troubleshooting.md b/webapp/docs/troubleshooting.mdindex dde2fdd..20fbf04 100644--- a/webapp/docs/troubleshooting.md+++ b/webapp/docs/troubleshooting.md@@ -37,7 +37,7 @@ If you updated and the panel still behaves like the old version, it is still run## The GPU watchdog {#gpu-watchdog}-*"the macOS GPU watchdog killed a Metal command buffer"* — macOS itself stopped a GPU task that ran too long. It is a driver-level kill, not a Phosphene bug report. Phosphene retries the prompt encoding at a shorter length for the rest of the session. If it keeps happening, the message links to the GitHub issue where chip, macOS version and the crash log help most.+*"the macOS GPU watchdog killed a Metal command buffer"* — macOS itself stopped a GPU task that ran too long. It is a driver-level kill, not a Phosphene bug report, and it is most common on M1 and M2 Macs. Phosphene renders the same job again once, straight away, in **short GPU steps** (smaller pieces of GPU work, a little slower), and remembers the size: its next render on this Mac starts in short steps, and the Queue row says so. If macOS stops it even in short steps, that size is paused on this Mac for 24 hours (or until the next update) and the card offers **Retry smaller**. If it keeps happening, the message links to the GitHub issue where chip, macOS version and the crash log help most.## A character training run failed {#training-failed}diff --git a/webapp/js/characters.js b/webapp/js/characters.jsindex 451079b..9a1ec03 100644--- a/webapp/js/characters.js+++ b/webapp/js/characters.js@@ -210,7 +210,7 @@ function musicLoraRender(music) {const branch = a.branch === 'nar' ? 'sound' : 'writing';return `<div class="music-lora-item${state.on ? ' active' : ''}" data-id="${charactersEscapeAttr(a.id)}"><label class="music-lora-head">- <input type="checkbox" ${state.on ? 'checked' : ''} onchange="musicLoraToggled(this)">+ <input type="checkbox" ${state.on && !a.problem ? 'checked' : ''} ${a.problem ? 'disabled' : ''} onchange="musicLoraToggled(this)"><span class="music-lora-name">${charactersEscapeHtml(a.name)}</span><span class="music-lora-branch">${branch}</span></label>diff --git a/webapp/js/health.js b/webapp/js/health.jsindex c4fb91f..c19beda 100644--- a/webapp/js/health.js+++ b/webapp/js/health.js@@ -338,7 +338,30 @@ function _ubRestartState(newVersion, requiresFullUpdate) {// reinstall them (that needs Pinokio's own Update, which reinstalls// the venv) -- that's the one case still asking for a manual step,// and it says exactly why.- if (requiresFullUpdate) {+ // Beta, after 4.17.4: the pull is followed by post_update.sh, run by the+ // panel itself (the step Pinokio's Update runs). Until it is done the+ // banner says so and Restart waits; a failure names why.+ const pu = ((_versionState || {}).post_update) || {};+ if (pu.pending || pu.active || pu.state === 'failed') {+ if (title) title.textContent = pu.state === 'failed'+ ? 'The update did not finish'+ : `Updated to ${newVersion} \u2014 finishing the update\u2026`;+ if (sub) sub.textContent = pu.state === 'failed'+ ? (pu.error || 'post_update.sh failed') + ' \u2014 use Pinokio\u2019s Update (Stop, then Update), or try again.'+ : 'Installing what the new version needs (the same step Pinokio\u2019s Update runs). '+ + 'Restart becomes available when it finishes. ' + ((pu.log || []).slice(-1)[0] || '');+ if (go) {+ go.hidden = pu.state !== 'failed';+ go.disabled = false;+ go.textContent = 'Try again';+ go.onclick = async () => {+ go.disabled = true;+ try { await fetch('/version/finish', { method: 'POST' }); } catch (e) {}+ _ubFollowPostUpdate(newVersion);+ };+ }+ if (pu.state !== 'failed') _ubFollowPostUpdate(newVersion);+ } else if (requiresFullUpdate && !pu.state) {if (sub) sub.textContent = 'This update touched Python dependencies, so use Pinokio\u2019s Update button (not just Stop and Start) so they reinstall.';if (go) go.hidden = true;} else {@@ -368,6 +391,21 @@ function _ubRestartState(newVersion, requiresFullUpdate) {return true;}+// Poll /version while post_update.sh runs; repaint the banner as it moves,+// and hand over to the Restart now state when it is done.+let _ubPostUpdateTimer = null;+function _ubFollowPostUpdate(newVersion) {+ clearTimeout(_ubPostUpdateTimer);+ _ubPostUpdateTimer = setTimeout(async () => {+ try {+ const r = await fetch('/version', { cache: 'no-store' });+ if (r.ok) _versionState = await r.json();+ } catch (e) { /* keep polling */ }+ const pu = ((_versionState || {}).post_update) || {};+ _ubRestartState(newVersion, !!((_versionState || {}).pull_requires_full_update) && !pu.state);+ }, 2000);+}+async function _ubSaveSetting(patch) {Object.assign(window._ubStarSettings || (window._ubStarSettings = {}), patch);try {@@ -586,7 +624,14 @@ async function panelRestart() {async function versionPillClick() {if (_versionRestartPending) {const s = _versionState || {};- if (s.pull_requires_full_update) {+ const _pu = s.post_update || {};+ if (_pu.pending || _pu.active || _pu.state === 'failed') {+ phosToast(_pu.state === 'failed'+ ? 'The update did not finish: ' + (_pu.error || '') + ' Use Pinokio\u2019s Update.'+ : 'Finishing the update first \u2014 restart becomes available when it is done.', 'warn');+ return;+ }+ if (s.pull_requires_full_update && !_pu.state) {// Genuinely can't self-restart into this one -- dependencies /// patches changed, and only Pinokio's own Update reinstalls those.alert("Pulled. Because this update touched Python deps / patches, use Pinokio's Update button (it reinstalls + reapplies patches). After that click Start.");@@ -709,11 +754,29 @@ async function versionDoPull(opts) {`cases where you have local changes that block a fast-forward.`);return;}+ // 4.17.5: a pull that moved nothing is not an update - no restart, no+ // "Updated to" banner (the restart came back on the same build and was+ // counted as a failed update). A stale process still gets its own pill.+ if (data.moved === false) {+ pill.classList.remove('pill-busy');+ renderVersionPill();+ const go = document.getElementById('ubUpdate');+ if (go) { go.disabled = false; go.textContent = 'Update now'; }+ try { _ubRender(_versionState); } catch (e) {}+ if (typeof phosToast === 'function') {+ phosToast('Already up to date - nothing to restart.', { kind: 'success' });+ }+ return;+ }_versionRestartPending = true;pill.classList.remove('pill-busy');renderVersionPill();const newVersion = (data.state && (data.state.pull_pulled_to_version || data.state.pull_pulled_to_short)) || 'new version';- const fullUpdateNote = data.state && data.state.pull_requires_full_update+ const _puNow = (data.state && data.state.post_update) || {};+ const fullUpdateNote = (_puNow.pending || _puNow.active)+ ? `\n\nPhosphene is now finishing the update in the background (the same ` ++ `step Pinokio's Update runs). Restart once the banner says it is done.`+ : data.state && data.state.pull_requires_full_update? `\n\n⚠ This update touched Python dependencies / patches. Use ` +`Pinokio's Update button (not just Stop+Start) so deps reinstall.`: '';diff --git a/webapp/js/queue.js b/webapp/js/queue.jsindex bc980e9..8ac863b 100644--- a/webapp/js/queue.js+++ b/webapp/js/queue.js@@ -2847,6 +2847,15 @@ async function repairModel(key) {// offers nothing: a second installer into the same venv would race it.let _engineEnvWasBroken = false;function engineEnvBannerHtml(st) {+ // /status.engine_env.cause (4.17.5) in the user's words. Server vocabulary:+ // ENGINE_ENV_CAUSES in mlx_ltx_panel.py; "unknown" and "installing" say nothing.+ const ENGINE_ENV_CAUSE_TEXT = {+ network: 'The last install could not reach the package server - check the connection.',+ timeout: 'The last install timed out downloading packages - check the connection.',+ disk: 'The last install ran out of disk space - free some space first.',+ uv_error: 'The last install could not resolve or build a package.',+ python_missing: 'The engine Python stopped working - run Install from Pinokio to rebuild it (models kept).',+ };if (!st || st.ok) return '';const rep = st.repair || {};const last = (rep.log || []).slice(-1)[0] || '';@@ -2864,9 +2873,12 @@ function engineEnvBannerHtml(st) {+ '<button class="btn btn-primary" data-action="repair-engine">Try again</button></span>'+ pinokio;}+ // 4.17.5: why the last install stopped, when its installer recorded it.+ const why = ENGINE_ENV_CAUSE_TEXT[st.cause] || '';return '<span style="font-weight:700">The render engine did not finish installing</span>'+ '<span style="opacity:.92">Its Python packages are missing from its environment, so '- + 'renders cannot start. Repair re-installs only those packages (a few minutes); '+ + 'renders cannot start. ' + (why ? escapeHtml(why) + ' ' : '')+ + 'Repair re-installs only those packages (a few minutes); '+ 'every model is kept.</span>'+ '<span style="margin-left:auto;display:flex;gap:8px">'+ '<button class="btn btn-primary" data-action="repair-engine">Repair engine</button></span>'@@ -2979,6 +2991,15 @@ function nowCardFailureActions(last, info) {`<svg class="ph" aria-hidden="true"><use href="#ph-arrow-clockwise"/></svg>` +`<span>Repair engine</span></button>` + dismiss;}+ // 4.17.5: a size refused because macOS's GPU watchdog stopped it (even in+ // short GPU steps) has one way forward - smaller. Retry as is would only be+ // refused again.+ if (refusedTier && smaller && action !== 'models') {+ return `<button type="button" class="now-card-retry" data-action="retry-smaller" ` ++ `title="Try again smaller — one quality rung down, a smaller canvas and about half the length">` ++ `<svg class="ph" aria-hidden="true"><use href="#ph-arrow-clockwise"/></svg>` ++ `<span>Retry smaller</span></button>` + dismiss;+ }if (refusedTier && action !== 'models') return dismiss;return (action === 'models'? `<button type="button" class="now-card-retry" onclick="openModelsModal()" ` +@@ -3000,6 +3021,19 @@ function nowCardFailureActions(last, info) {}function friendlyJobError(raw, engine) {raw = raw || 'unknown error';+ // 4.17.5: a size macOS's GPU watchdog stopped twice on this Mac (once in+ // short GPU steps) is refused up front instead of failing again - smaller+ // is the way forward, and the card offers exactly that.+ if (/GPU watchdog stopped this exact render/i.test(raw)) {+ return {+ friendly: 'This size is paused on this Mac.',+ hint: 'macOS stopped it twice, the second time in short GPU steps. Retry smaller '+ + 'renders one quality rung down at about half the length.',+ smaller: true,+ details: raw,+ docsAnchor: 'gpu-watchdog',+ };+ }// 4.17.4 (fleet: venv_broken, 18 installs in 30 days): the engine venv has// no engine packages - "Retry" fails the same way in one second, every time.// One gave up after three. Point at the one-click repair instead.@@ -3058,7 +3092,9 @@ function friendlyJobError(raw, engine) {// the specific, common case on M1/M2-class GPUs; anything else that// aborts at the C level still gets the crashlog ask, just demoted.const isWatchdog = rawLower.includes('gpu watchdog') || rawLower.includes('gpu timeout')- || rawLower.includes('commandbuffercallbackerrortimeout');+ || rawLower.includes('commandbuffercallbackerrortimeout')+ || rawLower.includes('impacting interactivity')+ || rawLower.includes('commandbuffercallbackerrorimpactinginteractivity');if (isWatchdog) {return {friendly: 'macOS stopped the render — this Mac ran out of GPU time.',