Skip to content

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

release(v5.0.3): Hailuo H3 that sets itself up, faster images, a fix for failing One Shot renders, one calm loading logo, clearer anonymous counts

mrbizarro7dc644d05445
diff --git a/README.md b/README.md
index bc25543..0e6d025 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ It runs **LTX-2.5** and **MiniMax H3 (Hailuo H3)** for text-to-video and image-t
and it still installs with one click through Pinokio. It is built on Apple's MLX: no CUDA, no cloud GPU, no API key, no credits and no watermark.
Your prompts, pictures and videos never leave your Mac.
-**Current release: v5.0.2.** Made by Mr Bizarro.
+**Current release: v5.0.3.** Made by Mr Bizarro.
## Why Phosphene
diff --git a/VERSION b/VERSION
index a1ef0ca..50e2274 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.0.2
+5.0.3
diff --git a/docs/ANALYTICS.md b/docs/ANALYTICS.md
index c4a25b1..75dfbdf 100644
--- a/docs/ANALYTICS.md
+++ b/docs/ANALYTICS.md
@@ -148,6 +148,46 @@ your Mac.
---
+## Super properties (5.0.3)
+
+Phosphene runs in two places: through Pinokio, and as the Phosphene Mac app. Both
+run the same Studio, so an event on its own could not say which. From 5.0.3 every
+event below also carries these, unless the event already names the field itself:
+
+| Property | Values | Why |
+|---|---|---|
+| `distribution` | `mac-app` or `pinokio` | A bug in the app is not a bug in Pinokio, and the other way round |
+| `edition` | `free` or `pro` | Pro runs a different render path |
+| `app_version`, `app_build` | e.g. `1.0.3`, `27`; Mac app only | The app and the Studio update separately |
+| `studio_version` | e.g. `5.0.3` | The Studio build that sent it (same as `version`) |
+| `os_version`, `chip_family`, `ram_gb` | `26.4`, `M4 Max`, `64` | The coarse machine class, so any event can be split by hardware |
+
+All are closed words, version numbers or whole numbers. No path, no name, no
+prompt. The Mac app also sends its own few events (`mac_*`, below) with the same
+rules and the same off switch. The Settings toggle and
+`PHOSPHENE_ANALYTICS_DISABLED=1` switch both off. When the Mac app minted this
+Mac's random id before the Studio first ran, the Studio keeps that same id
+(`PHOSPHENE_ANALYTICS_INSTALL_ID`), so one install is one id.
+
+### The Mac app's own events (`mac_*`)
+
+Sent by the app itself, not the Studio, to the same place, only while analytics is
+on. Properties: the super properties above (without the Studio-only ones) plus:
+
+| Event | When | Extra properties |
+|---|---|---|
+| `mac_launch` | each time the app opens | `first_launch` (true on the first ever open) |
+| `mac_setup` | setup, before the Studio exists: the plan and the install | `step` (`plan` or `install`), `outcome` (`started`, `ok`, `failed`), on a failure `error_class` (closed words such as `disk_full`, `network`, `download_failed`, `timeout`) and `error_signature` (one line, 120 characters, paths / URLs / e-mails / keys / ids / your user name removed), `seconds_bucket` |
+| `mac_engine` | the app starting the Studio | `step` is `studio`, `outcome` (`ok`, `failed`, `exited` when it quit by itself), `error_class`, `error_signature`, `exit_status`, `seconds_bucket` |
+| `mac_update` | Sparkle, the app's updater | `stage` `check` with `outcome` `found` or `failed` (with `error_domain` and `error_code`, numbers only, never the message; at most once per cause per six hours), or `stage` `installed` with `outcome` `ok`, `from_version`, `to_version` (noticed the next time the new app opens) |
+| `mac_crash` | the app did not quit cleanly last time | `outcome` is `crashed` |
+
+A copy of every `mac_*` event is written, as sent, to `mac-usage-log.jsonl` in the app's
+`state` folder (the key is not in it). Success steps are reported once per launch; nothing
+repeats on a timer.
+
+---
+
## Events
Seven events. That's the whole list. (An eighth is described at the end
diff --git a/docs/CHANGELOG_5.0.3.md b/docs/CHANGELOG_5.0.3.md
new file mode 100644
index 0000000..6dda3ca
--- /dev/null
+++ b/docs/CHANGELOG_5.0.3.md
@@ -0,0 +1,30 @@
+# Phosphene 5.0.3
+
+**Faster pictures, a Mac app that sets Hailuo H3 up by itself, and a fix for One Shot renders that failed on the Mac app.** Nothing that was free was taken away.
+
+## Images
+
+- **P-H3-Image is about five times faster by default.** Fast is now the first choice: a picture takes about 1 minute instead of about 5 (56 s for the first and about 47 s for each next one on an M4 Max with 64 GB). On 64 GB Macs the image models stay loaded between pictures, so the next one starts right away. When memory gets tight Phosphene lets them go and renders the normal way. Fast makes a 1.5 MP picture. The 2, 4 and 8 MP choices are still in the picker for when you want more detail.
+- **Pro: Faster Fast images.** With Pro, Fast is quicker still, at a slightly smaller size. The picker shows the size you will get.
+- The Hailuo H3 engine moves to a new version so it can keep image models loaded. Press **Update**, then restart. An older H3 engine still works at the new size, just without the speed-up from keeping models loaded.
+- If the image engine is missing, Phosphene now says so and says how to get it back.
+
+## One Shot
+
+- **One Shot renders that start from a picture no longer fail on the Mac app.** The step that takes the last frame of a clip for the next one used an option the Mac app's video tool no longer has. It now uses the current option and falls back to the old one, so it works with both.
+
+## Mac app
+
+- **Hailuo H3 sets itself up.** If the H3 weights are on your Mac, the app prepares H3 in the background. There is no repair box and nothing to click. On Macs with 36 to 59 GB it also builds the compact engine H3 needs there, once, when there is room.
+- **One calm loading logo** in the app and in the Studio, the same animation everywhere.
+- **Clearer anonymous counts.** The Mac app now counts when it is opened, whether its setup worked, whether Studio started, whether an update worked and whether it closed unexpectedly, so problems can be found and fixed. It is anonymous, never includes your prompts, files or paths, and follows the same switch as the other statistics (Settings, Anonymous usage analytics).
+
+## Everywhere
+
+- The header **Pro** button for Free users wears the same purple tag as the rest of the app.
+- The prompt box hint uses plain short sentences.
+- **Pro video:** Faster H3 picture-to-video is kept on the Pro speed path with the new engine.
+
+## Free
+
+- Nothing was taken away from Free. The faster default, keeping models loaded and the new engine are for everyone.
diff --git a/docs/H3_ENGINE.md b/docs/H3_ENGINE.md
index d32ab14..69f48cf 100644
--- a/docs/H3_ENGINE.md
+++ b/docs/H3_ENGINE.md
@@ -970,7 +970,7 @@ plus a rank-128 adapter (208 modules, scale 1.0: proven tensor by tensor against
five-tap Qwen3-VL-4B text encoder + connector and a new single-frame ViT image decoder.
- Runner: `scripts/generate_image.py PROMPT -o OUT --root <models>/p-h3-image --dit <q8> --aspect A --mp 2|4|8 --seed N --metrics M`
- (engine branch `image/p-h3-image`, pin 63893b3 on ref `phosphene/v5.0-image2`). Staged: text encoder out, then DiT + adapter,
+ (engine pin cd07c3c on ref `phosphene/v5.0-image3`: 63893b3 plus the resident worker `scripts/serve_image.py` and compiled repeated blocks). Staged: text encoder out, then DiT + adapter,
then the decoder (tiled, 16x16 tokens).
- Adapter layout: qkv rows permuted to our per-head layout, fc1 as published (NOT `--lora-fc1-swap`, unlike Flex). The load logs
`208 applied, 0 skipped`.
diff --git a/image_engine.py b/image_engine.py
index 217e28f..a789d28 100644
--- a/image_engine.py
+++ b/image_engine.py
@@ -513,12 +513,15 @@ class ImageEngineConfig:
# P-H3-Image (Pruna, on MiniMax H3), run by the H3 engine's own runner as a subprocess.
# The panel fills the paths (it owns the H3 install); `ph3image_mp` is the quality tier:
- # 2 / 4 / 8 megapixels (the model is trained for 8).
+ # Fast 1.5 / Draft 2 / Standard 4 / High 8 megapixels.
ph3image_python_path: str = ""
ph3image_script_path: str = ""
ph3image_root: str = "" # folder made by fetch_ph3_image.py
ph3image_dit: str = "" # MiniMax-H3 FL2VA transformer (our Q8 pack)
- ph3image_mp: float = 8.0
+ ph3image_mp: float = 1.5
+ ph3image_warm_service: bool = False # Studio enables on qualified 64 GB hosts
+ ph3image_pro_profile: bool = False # private runner, admitted by the shared Pro gate
+ ph3image_warm_batch: bool = False # experimental until real-weight speed/parity validation
def to_public_dict(self) -> dict:
d = asdict(self)
@@ -589,6 +592,9 @@ def generate(*, prompt: str, n: int, output_dir: Path,
Returns a list of `{png_path, seed, engine, width, height, ...}`
dicts in submission order.
"""
+ if config.kind != "ph3image":
+ import ph3_image_service
+ ph3_image_service.evict()
output_dir = Path(output_dir)
output_dir.mkdir(parents=True, exist_ok=True)
width, height = ASPECT_DIMS.get(aspect, ASPECT_DIMS["16:9"])
@@ -671,7 +677,7 @@ def health_check(config: ImageEngineConfig) -> tuple[bool, str]:
missing = ph3image_missing(config)
if missing:
return False, "P-H3-Image is not installed: " + "; ".join(missing)
- return True, f"P-H3-Image ready ({config.ph3image_mp:g} MP, 8 steps)"
+ return True, f"P-H3-Image ready ({config.ph3image_mp:g} MP, {5 if config.ph3image_pro_profile else 8} steps)"
return False, f"unknown engine kind: {config.kind!r}"
@@ -1300,13 +1306,22 @@ def _generate_mflux(prompt: str, n: int, width: int, height: int,
fam_defaults = MFLUX_FAMILY_DEFAULTS.get(fam, MFLUX_FAMILY_DEFAULTS["flux1"])
if not bin_path:
+ # The image-engine pack (scripts/pinokio/mflux_pack.sh) is optional at
+ # install, so a failed or skipped pack leaves no mflux CLI. This used to
+ # say "<bin> not found ... `pip install -U mflux>=0.17` (see
+ # docs/AGENTIC_FLOWS.md)": a terminal command, an eager upgrade this
+ # repo forbids (it re-resolves transformers and breaks video), and a
+ # deleted doc (fleet fw-20261107-0907: 11 failures on 7 Macs). It now
+ # names the one-click way back. The CLI name stays at the end for logs.
raise RuntimeError(
- f"{bin_name} not found (family: {fam}). Install or upgrade "
- f"mflux into the panel's venv: "
- f"`ltx-2-mlx/env/bin/pip install -U mflux>=0.17` "
- f"(see docs/AGENTIC_FLOWS.md § Image generation backends). "
- f"First-run model download is 4-34 GB to ~/.cache/huggingface "
- f"depending on family."
+ "The image engine is not installed, so images cannot start. "
+ + _dist.say(
+ "In Pinokio, click \"Install/repair image engines (Ideogram 4 + "
+ "Qwen-Edit)\" in Phosphene's menu; it keeps every model. ",
+ "Quit Phosphene and open it again so setup can put it back; if "
+ "it keeps happening, report it with "
+ f"{_dist.MAC_REPORT_MENU} ")
+ + f"Video renders are not affected. ({bin_name} missing, family {fam})"
)
# 4.19.6: a Pillow the engine cannot import stops HERE, in a second, with
@@ -2482,6 +2497,39 @@ def _ph3image_aspect(aspect: str) -> str:
return PH3IMAGE_RATIOS.get(aspect, "16:9")
+# Studio installs its existing signed-token authority. Standalone callers fail closed.
+_ph3image_pro_status = lambda: {"active": False}
+
+
+def ph3image_resident_headroom_gb(config):
+ # Weights are already resident: reserve additional working space by canvas size.
+ return max(6.0, min(12.0, float(config.ph3image_mp) * 2.0))
+
+
+# What a private profile must not leave beside a picture: the schedule that makes it faster.
+# The profile name stays (it is how a render proves which path ran); the method does not.
+_PH3IMAGE_PRIVATE_METRIC_KEYS = ("sigmas", "forwards", "steps", "schedule", "timesteps")
+
+
+def _ph3image_scrub_private_metrics(path) -> None:
+ try:
+ p = Path(path)
+ data = json.loads(p.read_text())
+ if isinstance(data, dict) and any(k in data for k in _PH3IMAGE_PRIVATE_METRIC_KEYS):
+ for k in _PH3IMAGE_PRIVATE_METRIC_KEYS:
+ data.pop(k, None)
+ p.write_text(json.dumps(data, indent=2))
+ except (OSError, ValueError):
+ pass
+
+
+def ph3image_pro_active():
+ try:
+ return bool(_ph3image_pro_status().get("active"))
+ except Exception:
+ return False
+
+
def _generate_ph3image(prompt: str, n: int, aspect: str, output_dir: Path, base_seed: int | None,
config: ImageEngineConfig, refs: list[str] | None = None,
on_log: "callable | None" = None) -> list[dict]:
@@ -2495,34 +2543,98 @@ def _generate_ph3image(prompt: str, n: int, aspect: str, output_dir: Path, base_
raise FileNotFoundError("P-H3-Image is not ready: " + "; ".join(missing))
if refs and on_log:
on_log("[p-h3-image] reference images are not used yet (text-to-image only); rendering from the prompt")
- mp = float(config.ph3image_mp or 8.0)
+ if (config.ph3image_pro_profile or Path(config.ph3image_script_path).name == "generate_image_pro.py") and not ph3image_pro_active():
+ import ph3_image_service
+ ph3_image_service.evict()
+ raise RuntimeError("Pro is no longer active. Select Fast again to use the Free profile.")
+ mp = float(config.ph3image_mp or 1.5)
ratio = _ph3image_aspect(aspect)
results: list[dict] = []
ts = int(time.time() * 1000)
+ requests = []
for i in range(n):
seed = (base_seed + i) if base_seed is not None else random.randint(0, 2**31 - 1)
png = output_dir / f"cand_{i:02d}_ph3image_{ts}.png"
metrics = output_dir / f"cand_{i:02d}_ph3image_{ts}.json"
- cmd = [config.ph3image_python_path, config.ph3image_script_path, prompt,
- "-o", str(png), "--root", config.ph3image_root, "--dit", config.ph3image_dit,
- "--aspect", ratio, "--mp", f"{mp:g}", "--seed", str(seed), "--metrics", str(metrics)]
+ requests.append(dict(prompt=prompt, output=str(png), metrics=str(metrics), seed=seed,
+ aspect=ratio, mp=mp))
+ service_script = Path(config.ph3image_script_path).with_name("serve_image_pro.py" if config.ph3image_pro_profile else "serve_image.py")
+ if config.ph3image_warm_service and service_script.is_file():
+ import ph3_image_service
+ import hostinfo
+ command = [config.ph3image_python_path, str(service_script),
+ "--root", config.ph3image_root, "--dit", config.ph3image_dit]
+ def memory_preflight(reusing):
+ # Selection and admission share the worker mutex, so idle eviction
+ # cannot turn a warm budget check into an unchecked cold load.
+ if hostinfo.total_ram_bytes() < 64 * 1024**3:
+ raise ph3_image_service.ResidencyUnavailable("Warm image retention needs 64 GB")
+ required = (ph3image_resident_headroom_gb(config) if reusing else 40) * 1024**3
+ if hostinfo.available_bytes() < required:
+ raise ph3_image_service.ResidencyUnavailable("Not enough free memory for image retention")
+ for index, request in enumerate(requests):
+ try:
+ info = ph3_image_service.WORKER.request(command, request, _clean_subprocess_env(),
+ timeout=float(os.environ.get("PHOSPHENE_PH3IMAGE_TIMEOUT_S", "3600")),
+ on_log=on_log, register=_register_active_proc, unregister=_unregister_active_proc,
+ preflight=memory_preflight)
+ except ph3_image_service.ResidencyUnavailable:
+ # request() reaps the resident process before propagating admission
+ # failure. A staged image is still allowed if its smaller budget fits.
+ if hostinfo.available_bytes() < 26 * 1024**3:
+ raise RuntimeError("P-H3-Image needs more free memory. Close other apps and retry.")
+ if on_log:
+ on_log("[p-h3-image] releasing warm models; rendering with staged memory")
+ requests = requests[index:]
+ break
+ if config.ph3image_pro_profile:
+ _ph3image_scrub_private_metrics(request["metrics"])
+ results.append({"png_path": request["output"], "seed": request["seed"], "engine": "p-h3-image",
+ "width": int(info.get("width") or 0), "height": int(info.get("height") or 0),
+ "seconds": float(info.get("request_seconds") or 0.0)})
+ else:
+ return results
+ # A staged request must evict a worker left by an earlier warm request,
+ # including when the service was disabled or the installed script changed.
+ import ph3_image_service
+ ph3_image_service.evict()
+ # One subprocess per batch also bounds residency to this caller's GPU-lock lifetime.
+ warm = config.ph3image_warm_batch and len(requests) > 1
+ groups = [requests[i:i + 16] for i in range(0, len(requests), 16)] if warm else [[r] for r in requests]
+ for i, group in enumerate(groups):
+ request = group[0]
+ seed = request["seed"]
+ png, metrics = Path(request["output"]), Path(request["metrics"])
+ cmd = [config.ph3image_python_path, config.ph3image_script_path]
+ batch_file = None
+ if warm:
+ batch_file = output_dir / f"ph3image_batch_{ts}.json"
+ batch_file.write_text(_json.dumps(group))
+ cmd += ["--batch-json", str(batch_file)]
+ else:
+ cmd += [prompt, "-o", str(png), "--aspect", ratio, "--mp", f"{mp:g}",
+ "--seed", str(seed), "--metrics", str(metrics)]
+ cmd += ["--root", config.ph3image_root, "--dit", config.ph3image_dit]
if on_log:
on_log(f"[p-h3-image] image {i + 1}/{n}: {ratio} at {mp:g} MP, seed {seed}")
- proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True,
- errors="replace", env=_clean_subprocess_env(), start_new_session=True)
+ try:
+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True,
+ errors="replace", env=_clean_subprocess_env(), start_new_session=True)
+ except OSError:
+ if batch_file is not None:
+ batch_file.unlink(missing_ok=True)
+ raise
_register_active_proc(proc)
- deadline = float(os.environ.get("PHOSPHENE_PH3IMAGE_TIMEOUT_S", "3600"))
+ deadline = float(os.environ.get("PHOSPHENE_PH3IMAGE_TIMEOUT_S", "3600")) * len(group)
timed_out = {"v": False}
def _kill():
timed_out["v"] = True
+ # The image CLI creates no children; stop only the process we started.
try:
- os.killpg(os.getpgid(proc.pid), 9)
- except Exception:
- try:
- proc.kill()
- except Exception:
- pass
+ proc.kill()
+ except ProcessLookupError:
+ pass
wd = threading.Timer(deadline, _kill)
wd.daemon = True
@@ -2534,23 +2646,35 @@ def _generate_ph3image(prompt: str, n: int, aspect: str, output_dir: Path, base_
if line and on_log:
on_log(f"[p-h3-image] {line}")
rc = proc.wait()
+ except BaseException:
+ proc.kill()
+ proc.wait()
+ raise
finally:
wd.cancel()
_unregister_active_proc(proc)
+ if batch_file is not None:
+ batch_file.unlink(missing_ok=True)
+ if proc.stdout is not None:
+ proc.stdout.close()
if timed_out["v"]:
raise RuntimeError(f"P-H3-Image exceeded its {deadline:.0f}s deadline and was stopped")
if rc in (-15, 143, -9, 137):
raise ImageJobCancelled(f"P-H3-Image cancelled by /stop (rc={rc})")
if rc != 0:
raise RuntimeError(f"P-H3-Image failed with rc={rc}")
- if not png.exists():
- raise RuntimeError(f"P-H3-Image finished but no PNG at {png}")
- info: dict = {}
- try:
- info = _json.loads(metrics.read_text())
- except Exception:
- pass
- results.append({"png_path": str(png), "seed": seed, "engine": "p-h3-image",
- "width": int(info.get("width") or 0), "height": int(info.get("height") or 0),
- "seconds": float(info.get("total_seconds") or 0.0)})
+ for request in group:
+ png, metrics = Path(request["output"]), Path(request["metrics"])
+ if not png.exists():
+ raise RuntimeError(f"P-H3-Image finished but no PNG at {png}")
+ info: dict = {}
+ try:
+ info = _json.loads(metrics.read_text())
+ except Exception:
+ pass
+ if config.ph3image_pro_profile:
+ _ph3image_scrub_private_metrics(metrics)
+ results.append({"png_path": str(png), "seed": request["seed"], "engine": "p-h3-image",
+ "width": int(info.get("width") or 0), "height": int(info.get("height") or 0),
+ "seconds": float(info.get("total_seconds") or 0.0)})
return results
diff --git a/mlx_ltx_panel.py b/mlx_ltx_panel.py
index 7c6963b..0e7c523 100644
--- a/mlx_ltx_panel.py
+++ b/mlx_ltx_panel.py
@@ -3890,8 +3890,7 @@ def _h3_install_turbo(push_log, download_fn=None, embedder_fn=None) -> dict:
"support in its runner). Re-run 'Install Hailuo H3' "
"from the Phosphene sidebar in Pinokio to update the "
"clone — it keeps every weight already on disk.",
- "This Hailuo H3 runner predates Turbo. Updating the "
- "runner isn't available in the Mac app yet.")}
+ "Turbo isn't available for Hailuo H3 in the Mac app yet.")}
target = _h3_turbo_dir()
if any((target / f).is_file() for f, _v, _fb in H3_TURBO_LORA_CANDIDATES):
# The adapter is here; an install from before the adaLN companion came
@@ -5861,6 +5860,36 @@ def _is_app_bootstrap(pid: int) -> bool:
return ok
+# ---- The Mac app builds Hailuo H3's runtime by itself (5.0.3) --------------
+# When the H3 weights are on this Mac and this app version has no H3 runner, the
+# app runs bootstrap.sh `h3` in the background (engine code + its own Python
+# environment, nothing downloaded for the weights) and writes its progress to
+# <LTX_STATE_DIR>/app_h3.json {state: building|ready|failed|idle, pid}. The
+# person is never asked to repair, build or configure anything; this only lets
+# the page say one calm line instead of showing a broken engine.
+APP_H3_FILE = "app_h3.json"
+APP_H3_LOCK = Path(".locks") / "h3.lock"
+
+
+def app_h3_prep() -> str:
+ """"building" while the app's H3 build is running, "failed" when its last run
+ failed, else "waiting" (it has not started, or finished without making H3)."""
+ try:
+ rec = json.loads((STATE_DIR / APP_H3_FILE).read_text(encoding="utf-8"))
+ except (OSError, ValueError):
+ rec = {}
+ state = str((rec or {}).get("state") or "")
+ pid = 0
+ try:
+ pid = int((_app_home() / APP_H3_LOCK / "owner").read_text(encoding="utf-8").strip())
+ os.kill(pid, 0)
+ if _is_app_bootstrap(pid):
+ return "building"
+ except (OSError, ValueError):
+ pass
+ return "failed" if state == "failed" else "waiting"
+
+
#: = scripts/fetch_pack_release.py PACK_LOCK_SUFFIX: every writer of a pack
#: folder (that fetcher in any process, and Remove / Repair here) holds an
#: exclusive flock on ".<folder>.fetchlock" beside the folder's real path.
@@ -9917,15 +9946,13 @@ H3_TIER_CHAIN_NOTE = ("Every 5 s window is asked for the same prompt, so a "
"one-off action happens once per window — open "
"Per-window prompts above (with the prompt box) to "
"give each window its own beat.")
-H3_TIER_CHAIN_NOTE_LEGACY = ("Scripted dialogue repeats once per 5 s window — "
- "put dialogue cues late in the prompt. Per-window "
- "prompts need `--chain-prompts` on the installed "
- "H3 runner; " + _dist.say(
- "re-run 'Install Hailuo H3' from the "
- "Phosphene sidebar to update the clone (weights "
- "stay).",
- "updating that runner isn't available in the "
- "Mac app yet."))
+H3_TIER_CHAIN_NOTE_LEGACY = _dist.say(
+ "Scripted dialogue repeats once per 5 s window — put dialogue cues late "
+ "in the prompt. Per-window prompts need `--chain-prompts` on the installed "
+ "H3 runner; re-run 'Install Hailuo H3' from the Phosphene sidebar to update "
+ "the clone (weights stay).",
+ "Scripted dialogue repeats once per 5 s window, so put dialogue cues late "
+ "in the prompt.")
# The `?` copy for the per-window prompts control. Server-side because the panel
# already keeps every honest sentence in Python — one place to edit, and the UI
# can never disagree with the mechanism it is describing.
@@ -12091,7 +12118,7 @@ def h3_cell_gate(cell: dict) -> tuple[bool, str]:
f"`--chain-windows` on the installed H3 runner. " + _dist.say(
"Re-run 'Install Hailuo H3' from the Phosphene sidebar to "
"update the clone — your weights stay.",
- "Updating the Hailuo H3 runner isn't available in the Mac app yet."))
+ "This part of Hailuo H3 isn't available in the Mac app yet."))
if cell.get("fast_hd"):
if cell.get("dense"):
return (False, "Fast HD is built from 5 s windows; pick 3s, 5s, 10s or 15s.")
@@ -14518,9 +14545,21 @@ def h3_size_note() -> str:
def _h3_q8_lane_mac(ram: str) -> str:
"""h3_ram_verdict's Q8-lane sentence inside the Mac app: it can run here,
but the app cannot install, repair or build H3 yet."""
- return (f"Hailuo H3 can run on this Mac on its reduced-RAM lane (the "
- f"compact Q8 engine needs {H3_MIN_RAM_GB_Q8:.0f} GB; {ram}), but "
- f"it isn't available in the Mac app yet. Render on LTX.")
+ prep = ""
+ try:
+ prep = app_h3_prep()
+ rec = json.loads((STATE_DIR / APP_H3_FILE).read_text(encoding="utf-8"))
+ state = str((rec or {}).get("state") or "")
+ except (OSError, ValueError):
+ state = ""
+ if prep == "building" or state == "building":
+ return ("Hailuo H3 is getting ready on this Mac and turns on by itself. "
+ "Render on LTX for now.")
+ if state == "needs_space":
+ return ("Hailuo H3 needs about 25 GB of free space on this Mac to get ready; "
+ "it turns on by itself once there is room. Render on LTX for now.")
+ return (f"Hailuo H3 can run on this Mac ({ram}), but "
+ f"it isn't set up in the Mac app yet. Render on LTX.")
def h3_ram_verdict() -> dict:
@@ -14730,7 +14769,7 @@ def _h3_runner_behind(flag: str, runner: str | Path, remedy: str = "") -> str:
f"{H3_RUNNER_BEHIND}: it has no `{flag}` ({runner}). " + _dist.say(
"Re-run 'Install Hailuo H3' from the Phosphene sidebar to update "
"the clone — every weight already on disk is kept.",
- "Updating the Hailuo H3 runner isn't available in the Mac app yet.") + tail
+ "This part of Hailuo H3 isn't available in the Mac app yet.") + tail
)
@@ -15627,8 +15666,7 @@ def _h3_install_tristep(push_log, download_fn=None) -> dict:
"(no --sigma-subset). Run 'Update Hailuo H3 runner' "
"from the Phosphene sidebar in Pinokio — your weights "
"stay.",
- "This Hailuo H3 runner predates Fast (3 steps). Updating "
- "the runner isn't available in the Mac app yet.")}
+ "Fast isn't available for Hailuo H3 in the Mac app yet.")}
resolved = h3_tristep_paths()
target = resolved["dir"]
if resolved["files_ok"]:
@@ -15832,7 +15870,7 @@ def _h3_install_flex_turbo(push_log, fetch_fn=None) -> dict:
"error": _dist.say(
"This Hailuo H3 runner predates H3 Flex Turbo. Run 'Update Hailuo H3 "
"runner' from the Phosphene sidebar in Pinokio - your weights stay.",
- "This Hailuo H3 runner predates H3 Flex Turbo. Update Phosphene to get it.")}
+ "H3 Flex Turbo isn't available for Hailuo H3 in the Mac app yet.")}
resolved = h3_flex_turbo_paths()
target = resolved["dir"]
if resolved["files_ok"]:
@@ -15952,8 +15990,7 @@ def _h3_install_flex(push_log, fetch_fn=None) -> dict:
"This Hailuo H3 runner predates Pika H3 Flex (its six-step "
"sampler). Run 'Update Hailuo H3 runner' from the Phosphene "
"sidebar in Pinokio - your weights stay.",
- "This Hailuo H3 runner predates Pika H3 Flex. Updating the "
- "runner isn't available in the Mac app yet.")}
+ "Pika H3 Flex isn't available for Hailuo H3 in the Mac app yet.")}
resolved = h3_flex_paths()
target = resolved["dir"]
if resolved["files_ok"]:
@@ -16015,14 +16052,14 @@ PH3IMAGE_CREDIT = ("P-H3-Image by Pruna AI, based on MiniMax-H3 by MiniMax "
"Powered by MiniMax H3. Fetched from Pruna's repository, never re-hosted.")
PH3IMAGE_NOTICE = ("MiniMax H3 is licensed under the MiniMax H3 Community License Agreement, "
"Copyright (c) 2026 MiniMax. All Rights Reserved.")
-PH3IMAGE_TIERS = {"draft": 2.0, "standard": 4.0, "high": 8.0}
+PH3IMAGE_TIERS = {"fast": 1.5, "draft": 2.0, "standard": 4.0, "high": 8.0}
# Peak Metal residency the pre-flight gate prices a render at. MEASURED (port bench, 4-5 Nov 2026,
# M4 Max 64 GB, Q8 DiT + runtime adapter): 24.2 GB at 2 MP, 24.7 at 4 MP, 25.5 at 8 MP; rounded up.
PH3IMAGE_PEAK_GB = 26.0
# Whole-image wall seconds per tier on that Mac (model load + text + 8 forwards + decode), from the
# same bench (ports/p-h3-image-pruna/bench/RESULT.md). The engine table starts from these and then
# follows the user's own renders.
-PH3IMAGE_SEC_PER_IMAGE = {"draft": 75.0, "standard": 146.0, "high": 312.0}
+PH3IMAGE_SEC_PER_IMAGE = {"fast": 58.0, "draft": 76.0, "standard": 148.0, "high": 312.0}
_ph3image_dl_lock = threading.Lock()
_ph3image_dl_state: dict = {}
@@ -16104,22 +16141,47 @@ def ph3image_status() -> dict:
}
-def ph3image_engine_config(tier: str = "high"):
- """The image-engine config for a quality tier (draft 2 MP, standard 4 MP, high 8 MP)."""
+def _ph3image_pro_dirs() -> list[Path]:
+ """Where the private Fast pair can be: the signed Pro pack's own engine first (the pack
+ installs this Studio with its engine beside it as pro_engine/h3, the same place the Pro H3
+ video route uses), then beside the Free runner (a developer checkout). The public H3
+ checkout never has the pair, so a Free install never finds it. Presence never grants Pro:
+ the caller asks pro_status() first."""
+ return [Path(__file__).resolve().parent / "pro_engine" / "h3" / "scripts", _ph3image_script().parent]
+
+
+def _ph3image_private_script() -> Path | None:
+ for folder in _ph3image_pro_dirs():
+ script, worker = folder / "generate_image_pro.py", folder / "serve_image_pro.py"
+ if script.is_file() and worker.is_file():
+ return script
+ return None
+
+
+def ph3image_engine_config(tier: str = "fast"):
+ """Measured Fast default, with explicit 2/4/8 MP choices."""
py = _h3_python()
dit = ph3image_dit_path()
+ import hostinfo
+ # Pro ledger row ph3-image-fast-pro: the signed-token Pro status, then the pack's private pair.
+ ph3_pro = str(tier).lower() == "fast" and bool(pro_status().get("active"))
+ private_script = _ph3image_private_script() if ph3_pro else None
+ pro_fast = private_script is not None
+ warm = hostinfo.total_ram_bytes() >= 64 * 1024**3
return agent_image_engine.ImageEngineConfig(
kind="ph3image",
ph3image_python_path=str(py) if py else "",
- ph3image_script_path=str(_ph3image_script()),
+ ph3image_script_path=str(private_script if pro_fast else _ph3image_script()),
ph3image_root=str(_ph3image_dir()),
ph3image_dit=str(dit) if dit else "",
- ph3image_mp=float(PH3IMAGE_TIERS.get(str(tier).lower(), 8.0)),
+ ph3image_warm_service=warm,
+ ph3image_pro_profile=pro_fast,
+ ph3image_mp=1.0 if pro_fast else float(PH3IMAGE_TIERS.get(str(tier).lower(), PH3IMAGE_TIERS["fast"])),
)
def ph3image_engine_rows() -> list[dict]:
- """The three quality tiers as /image/engines rows (the Image Studio's engine table).
+ """The quality tiers as /image/engines rows (the Image Studio's engine table).
`sec_per_image` is the bench's measured time per tier (M4 Max 64 GB) until the user has two
renders of their own on a tier; then it is the mean of those, like every other image engine."""
@@ -16130,11 +16192,14 @@ def ph3image_engine_rows() -> list[dict]:
except Exception: # noqa: BLE001
fits, mac_gb = True, 0
rows = []
- for engine, tier in (("ph3image_draft_inline", "draft"), ("ph3image_standard_inline", "standard"),
+ for engine, tier in (("ph3image_fast_inline", "fast"), ("ph3image_draft_inline", "draft"), ("ph3image_standard_inline", "standard"),
("ph3image_inline", "high")):
+ cfg = ph3image_engine_config(tier)
sec, samples = PH3IMAGE_SEC_PER_IMAGE[tier], "bench-m4max-64gb"
+ if cfg.ph3image_pro_profile:
+ sec, samples = 30, "bench-m4max-64gb-pro"
observed = _IMG_ENGINE_TIMING.get(engine) or []
- if len(observed) >= 2:
+ if len(observed) >= 2 and not cfg.ph3image_pro_profile:
sec = round(sum(max(1.0, el / max(1, n)) for (n, el) in observed) / len(observed), 1)
samples = f"observed-{len(observed)}"
rows.append({
@@ -16143,7 +16208,10 @@ def ph3image_engine_rows() -> list[dict]:
"mac_gb_needed": int(mac_gb), "fits_mac": bool(fits), "partial": False, "partial_gb": 0,
"family_installed": bool(status["supported"] and status["h3_ready"]),
"download_gb": PH3IMAGE_DOWNLOAD_GB, "sec_per_image": sec, "cold_start_sec": 0.0,
- "samples_source": samples, "gated": False, "megapixels": PH3IMAGE_TIERS[tier],
+ "samples_source": samples, "gated": False, "megapixels": cfg.ph3image_mp,
+ "version_label": ("P-H3-Image — Fast (1 MP, Pro)" if cfg.ph3image_pro_profile
+ else "P-H3-Image — Fast (1.5 MP, ~1 min)") if tier == "fast" else None,
+ "pro_profile": cfg.ph3image_pro_profile,
"license": PH3IMAGE_LICENSE, "label": PH3IMAGE_LABEL, "credit": PH3IMAGE_CREDIT,
# The Image Studio's chip reads these: why it cannot run yet, and the one-time download.
"ph3image_reason": status["reason"], "installing": bool(status["installing"]),
@@ -16214,8 +16282,7 @@ def _ph3image_install(push_log, fetch_fn=None) -> dict:
"error": _dist.say(
"This Hailuo H3 runner predates P-H3-Image. Run 'Update Hailuo H3 runner' from the "
"Phosphene sidebar in Pinokio - your weights stay.",
- "This Hailuo H3 runner predates P-H3-Image. Updating the runner isn't available "
- "in the Mac app yet.")}
+ "The Hailuo H3 image models aren't available in the Mac app yet.")}
resolved = ph3image_paths()
target = resolved["dir"]
if resolved["files_ok"]:
@@ -16416,8 +16483,7 @@ def _h3_install_v13(push_log, fetch_fn=None) -> dict:
"This Hailuo H3 runner predates lightx2v v1.3 (it takes one "
"adapter only). Run 'Update Hailuo H3 runner' from the "
"Phosphene sidebar in Pinokio - your weights stay.",
- "This Hailuo H3 runner predates lightx2v v1.3. Updating "
- "the runner isn't available in the Mac app yet.")}
+ "lightx2v v1.3 isn't available for Hailuo H3 in the Mac app yet.")}
resolved = h3_v13_paths()
target = resolved["dir"]
if resolved["files_ok"]:
@@ -18247,9 +18313,8 @@ def h3_status() -> dict:
"Run \'Update Hailuo H3 runner\' from the Phosphene "
"sidebar in Pinokio — your weights stay. Renders are "
"unaffected meanwhile.",
- "This Hailuo H3 pack predates the live preview. Updating "
- "the runner isn't available in the Mac app yet. Renders "
- "are unaffected.")
+ "The live preview isn't available for Hailuo H3 in the Mac app yet. "
+ "Renders are unaffected.")
if (available and not h3_supports_live_preview()) else ""),
},
# Turbo — the 4-step distill LoRA. A separate block rather than a bare
@@ -18446,6 +18511,15 @@ def h3_status() -> dict:
# tint only — never a repaint.
# state "ready" | "announced". An announced engine renders as an
# inert "soon" chip and can never be selected.
+ if _dist.is_mac_app() and not available and paths["weights_ok"]:
+ # The weights are here and the runtime is not (yet): in the Mac app the
+ # app builds it (see app_h3_prep). Never a repair story, never paths.
+ result.update({"repairable": False, "venv_broken": False, "missing": [],
+ "reason": "preparing", "preparing": True,
+ "prep_state": app_h3_prep(), "root": "", "models": "",
+ "ram_note": ""})
+ else:
+ result["preparing"] = False
_H3_STATUS_CACHE = (time.time(), result)
return result
@@ -19427,6 +19501,12 @@ def run_music_job_inner(job: dict) -> None:
raise RenderRefused("music_installing", "The music engine is still installing. Compose again when the install finishes.")
if paths["missing"]:
missing = "; ".join(paths["missing"])
+ if _dist.is_mac_app():
+ # No paths and no sidebar talk in the app: say where things stand and the one button.
+ raise RuntimeError(
+ "The music engine needs a quick one-click setup before it can compose. Open Audio, Compose and press the setup button. Your music files are kept."
+ if paths["repairable"] else
+ "The music engine isn't installed yet. Open Audio, Compose and press Install music engine.")
if paths["repairable"]:
raise RuntimeError(f"The YuE2 weights are on disk but the engine needs repair — missing: {missing}. Open Audio → Compose and click 'Repair music engine'" + _dist.say(" (or use the Phosphene sidebar in Pinokio)", "") + " — it is idempotent and skips every weight already on disk, so this is a couple of minutes, NOT an 11 GB download.")
raise RuntimeError(f"The music engine isn't installed — missing: {missing}. Open Audio → Compose and click 'Install music engine'" + _dist.say(" (or use the Phosphene sidebar in Pinokio)", "") + " — ~11 GB, resumable.")
@@ -20104,7 +20184,7 @@ ENGINES: tuple[dict, ...] = (
"mark": "eng-mark-img-ph3", "accent": "#FF2E9F",
"accent_dim": "rgba(255,46,159,0.14)", "accent_soft": "rgba(255,46,159,0.42)",
"modes": ("t2i",), "serves_label": "Text", "preview": True,
- "image_engines": ("ph3image_standard_inline", "ph3image_draft_inline", "ph3image_inline"),
+ "image_engines": ("ph3image_fast_inline", "ph3image_standard_inline", "ph3image_draft_inline", "ph3image_inline"),
"capability": "images.p_h3_image"},
)),
# ---- Flux Video ---------------------------------------------------------
@@ -20640,7 +20720,12 @@ def _analytics_install_id() -> str:
if _ANALYTICS_UUID_RE.match(cur):
return cur
import uuid as _uuid
- new = str(_uuid.uuid4())
+ # 5.0.3: the Mac app may have minted this Mac's id before the Studio ever ran
+ # (its setup / start events), and hands it over in PHOSPHENE_ANALYTICS_INSTALL_ID
+ # so both halves of one install are one id. Used only when this Studio has no id
+ # of its own yet; an existing id is never replaced.
+ seed = (os.environ.get("PHOSPHENE_ANALYTICS_INSTALL_ID") or "").strip().lower()
+ new = seed if _ANALYTICS_UUID_RE.match(seed) else str(_uuid.uuid4())
_settings_set_internal(analytics_install_id=new)
return new
@@ -21058,6 +21143,73 @@ _ANALYTICS_EVENTS = (
)
+# ---- Super properties (5.0.3): who is this, and which Phosphene --------------
+# Pinokio and the Mac app both run THIS Studio, so a Studio event on its own could
+# not say which of the two it came from (7 Nov 2026: 192 Macs rendered in 24 h and
+# the Panel could not say how many used the app). These ride on EVERY event, filled
+# in only where the call site did not already say it. All closed or numeric:
+# distribution "mac-app" | "pinokio" (distribution.py)
+# edition "free" | "pro" (the app says so; Pinokio: the signed token)
+# app_version / app_build the Mac app's own version and build; Mac app only
+# studio_version the Studio build this process runs (same as `version`)
+# os_version / chip_family / ram_gb the coarse machine class every event now repeats
+# Never a path, a name, an id of a person, a prompt. See docs/ANALYTICS.md "Super properties".
+_ANALYTICS_BUILD_RE = re.compile(r"^[0-9][0-9A-Za-z.\-]{0,23}$")
+_ANALYTICS_EDITION_CACHE: tuple = (0.0, "")
+
+
+def _analytics_edition() -> str:
+ """'pro' or 'free'. The Mac app names it (PHOSPHENE_EDITION); under Pinokio the
+ signed Pro token decides, looked at most once a minute (this runs per event)."""
+ global _ANALYTICS_EDITION_CACHE
+ named = _dist.edition()
+ if named:
+ return named
+ now = time.time()
+ if now - _ANALYTICS_EDITION_CACHE[0] < 60 and _ANALYTICS_EDITION_CACHE[1]:
+ return _ANALYTICS_EDITION_CACHE[1]
+ try:
+ ed = "pro" if pro_status().get("active") else "free"
+ except Exception: # noqa: BLE001
+ ed = "free"
+ _ANALYTICS_EDITION_CACHE = (now, ed)
+ return ed
+
+
+def _analytics_app_field(name: str) -> str:
+ raw = (os.environ.get(name) or "").strip()
+ return raw if _ANALYTICS_BUILD_RE.match(raw) else ""
+
+
+def _analytics_context() -> dict:
+ """The super properties above. Never raises; a missing piece is simply absent."""
+ ctx: dict = {}
+ try:
+ ctx["distribution"] = _dist.distribution()
+ ctx["edition"] = _analytics_edition()
+ if _dist.is_mac_app():
+ av, ab = _analytics_app_field("PHOSPHENE_APP_VERSION"), _analytics_app_field("PHOSPHENE_APP_BUILD")
+ if av:
+ ctx["app_version"] = av
+ if ab:
+ ctx["app_build"] = ab
+ ctx["studio_version"] = running_version()
+ ctx["os_version"] = _analytics_os_version()
+ ctx["chip_family"] = _analytics_chip_family()
+ ctx["ram_gb"] = int(round(SYSTEM_RAM_GB))
+ except Exception: # noqa: BLE001
+ pass
+ return ctx
+
+
+def _analytics_with_context(props: dict) -> dict:
+ """Call-site properties win; the super properties fill what is missing."""
+ out = dict(_analytics_context())
+ out.update(props)
+ return out
+
+
+
def _analytics_capture(event: str, props: dict | None = None) -> None:
"""Record one event. Returns immediately; never raises; never blocks.
@@ -21070,7 +21222,7 @@ def _analytics_capture(event: str, props: dict | None = None) -> None:
event, props = _analytics_refusal_event(event, props or {})
payload = {
"event": str(event)[:64],
- "props": _analytics_clean_props(props or {}),
+ "props": _analytics_with_context(_analytics_clean_props(props or {})),
"install_id": _analytics_install_id(),
"ts": time.time(),
"at": iso_now(),
@@ -21102,7 +21254,7 @@ def _analytics_capture_sync(event: str, props: dict | None = None) -> bool:
event, props = _analytics_refusal_event(event, props or {})
payload = {
"event": str(event)[:64],
- "props": _analytics_clean_props(props or {}),
+ "props": _analytics_with_context(_analytics_clean_props(props or {})),
"install_id": _analytics_install_id(),
"ts": time.time(),
"at": iso_now(),
@@ -24585,6 +24737,10 @@ def pro_status() -> dict:
"holder": None, "source": "licence", "reason": "ok"}
+# One authority for config selection and admission immediately before a private render.
+agent_image_engine._ph3image_pro_status = lambda: pro_status()
+
+
def pro_receipt(payload: dict) -> dict | None:
"""The sidecar's Pro receipt: only when the render ran a Pro speed profile (params.pro_profile, admitted
by the Pro pipeline) and the elapsed time is known. Free renders never get one."""
@@ -36121,9 +36277,9 @@ def make_job(form: dict[str, list[str]] | dict[str, str], *,
f"Hailuo H3 can render {H3_MODE_LABELS.get(mode_in, mode_in)} once "
"its runner is updated (Update in Pinokio, or 'Update Hailuo H3 "
"runner') — rendering this one on LTX.",
- f"Hailuo H3 needs a newer runner to render "
- f"{H3_MODE_LABELS.get(mode_in, mode_in)}. Updating the runner "
- "isn't available in the Mac app yet — rendering this one on LTX."))
+ f"Hailuo H3 can't render "
+ f"{H3_MODE_LABELS.get(mode_in, mode_in)} in the Mac app yet. "
+ "Rendering this one on LTX."))
_engine = "ltx"
elif not h3_capable():
# Same verdict the refusal raises: the floor depends on the lane,
@@ -36286,7 +36442,7 @@ def make_job(form: dict[str, list[str]] | dict[str, str], *,
"every window with the main prompt. " + _dist.say(
"Re-run 'Install Hailuo H3' from the Phosphene sidebar to "
"update the clone; your weights stay.",
- "Updating the Hailuo H3 runner isn't available in the Mac app yet."))
+ "This part of Hailuo H3 isn't available in the Mac app yet."))
_h3_chain_prompts = []
# Orientation: flip the resolved cell's canvas for vertical work.
_h3_orientation = (f("h3_orientation", H3_ORIENTATION_DEFAULT)
@@ -37310,6 +37466,7 @@ _IMAGE_ENGINE_LABELS = {
"hidream_quality_inline": "HiDream Quality",
"flux2_klein_inline": "FLUX.2 [klein] 4B",
"ph3image_inline": "P-H3-Image (High, 8 MP)",
+ "ph3image_fast_inline": "P-H3-Image (Fast)",
"ph3image_standard_inline": "P-H3-Image (Standard, 4 MP)",
"ph3image_draft_inline": "P-H3-Image (Draft, 2 MP)",
}
@@ -37362,6 +37519,13 @@ def _preflight_image_job(cfg, *, engine_override: str = "auto") -> None:
(pass or skip) so post-mortems can tell the difference between "preflight
rejected this" and "preflight passed and the render still died".
"""
+ if getattr(cfg, "kind", None) != "ph3image":
+ import ph3_image_service
+ ph3_image_service.evict()
+ if getattr(cfg, "kind", None) == "ph3image" and getattr(cfg, "ph3image_warm_service", False) and HELPER.is_alive():
+ # The resident image stack and the video helper cannot both keep their
+ # full weights on the reference Mac. The GPU gate makes the helper idle.
+ HELPER.kill()
# Licence first (4.19.8): Ideogram 4, FLUX.1 Krea [dev] and Bria FIBO are
# non-commercial models whose screen must be accepted once. Not skippable
# by PHOSPHENE_SKIP_PREFLIGHT - that switch is about RAM and disk.
@@ -37419,6 +37583,12 @@ def _preflight_image_job(cfg, *, engine_override: str = "auto") -> None:
f"memory and needs a {mac_gb} GB Mac; this Mac has "
f"{SYSTEM_RAM_GB:.0f} GB. {way_out}"
)
+ if (cfg.kind == "ph3image" and cfg.ph3image_warm_service
+ and Path(cfg.ph3image_script_path).with_name("serve_image_pro.py" if cfg.ph3image_pro_profile else "serve_image.py").is_file()):
+ # The stdio worker checks the cold (40 GiB) or resident (6–12 GiB) budget
+ # atomically with choosing its process. Counting all resident weights
+ # again here would refuse the second image on a 64 GB Mac.
+ need_gb = agent_image_engine.ph3image_resident_headroom_gb(cfg)
if free_gb < need_gb and HELPER.is_alive():
# The video helper keeps its pipelines warm between jobs; on a 32 GB
# Mac that is most of the memory an image engine needs, and the fleet
@@ -39551,7 +39721,7 @@ def run_h3_job_inner(job: dict) -> None:
f"ffmpeg is not installed where Phosphene looks for it ({FFMPEG}). Pinokio "
"ships it at ~/pinokio/bin/ffmpeg-env/bin/ffmpeg — reinstall Phosphene from "
"the Pinokio sidebar, or set LTX_FFMPEG to your ffmpeg binary.",
- f"ffmpeg isn't where Phosphene looks for it ({FFMPEG}). Quit Phosphene "
+ "Phosphene's video encoder isn't ready. Quit Phosphene "
"and open it again so setup can find a working video encoder."))
p = job["params"]
@@ -39567,6 +39737,14 @@ def run_h3_job_inner(job: dict) -> None:
f"({SYSTEM_RAM_GB:.0f} GB unified memory). "
f"Render on the LTX engine instead.")
if paths["missing"]:
+ if _dist.is_mac_app():
+ # Nothing to repair, no paths: the app sets H3 up by itself when its
+ # weights are here (bootstrap.sh h3), and this says only where things stand.
+ raise RuntimeError(
+ "Hailuo H3 is still getting ready on this Mac. Render on LTX for "
+ "now; Hailuo H3 turns on by itself when it is ready."
+ if paths["weights_ok"] else
+ "Hailuo H3 isn't available in the Mac app yet.")
raise RuntimeError(
("The Hailuo H3 weights are on disk but the engine needs repair — "
if paths["repairable"] else
@@ -39667,7 +39845,7 @@ def run_h3_job_inner(job: dict) -> None:
"instead. " + _dist.say(
"Re-run 'Install Hailuo H3' from the Phosphene "
"sidebar to update the clone; your weights stay.",
- "Updating the Hailuo H3 runner isn't available in the Mac app yet."))
+ "This part of Hailuo H3 isn't available in the Mac app yet."))
# ---- user LoRA -------------------------------------------------------
# Resolved BEFORE Turbo, deliberately: the two compete for the runner's one
@@ -40397,9 +40575,8 @@ def run_h3_job_inner(job: dict) -> None:
"decoding in float32 (same picture, a little slower). Press "
"Update in Pinokio, or \"Update Hailuo H3 runner\" in the "
"sidebar, to get it.",
- "[h3] This H3 runner predates the faster FP16 video decode — "
- "decoding in float32 (same picture, a little slower). Updating "
- "the runner isn't available in the Mac app yet."))
+ "[h3] The faster video decode isn't available for Hailuo H3 in "
+ "the Mac app yet. The picture is the same, a little slower."))
elif _vae_mixed:
cmd += ["--vae-dtype", "float32"]
p["h3_vae_dtype"] = "float32"
@@ -41460,11 +41637,24 @@ def _take_last_frame(ff: str, source: str, output: str, job: dict) -> None:
target = Path(output)
fd, scratch = tempfile.mkstemp(prefix=".handoff-", suffix=".png", dir=target.parent)
os.close(fd)
- try:
- _take_ffmpeg([ff, "-loglevel", "error", "-y", "-i", source,
- "-map", "0:v:0", "-an", "-vsync", "0",
- "-pix_fmt", "rgb24", "-compression_level", "0",
- "-update", "1", scratch], "One Shot handoff frame", job)
+ head = [ff, "-loglevel", "error", "-y", "-i", source, "-map", "0:v:0", "-an"]
+ tail = ["-pix_fmt", "rgb24", "-compression_level", "0", "-update", "1", scratch]
+ try:
+ # Every decoded frame goes to the PNG as it is (no frame-rate
+ # conversion). `-fps_mode passthrough` is the spelling since ffmpeg
+ # 5.1; the old `-vsync 0` is gone from current builds, and on those
+ # every One Shot died at its first handoff with "Unrecognized option
+ # 'vsync'" (fleet, 5.0.0/5.0.1: one Mac lost 35 renders in a row).
+ # An ffmpeg older than 5.1 has no -fps_mode, so it gets -vsync.
+ try:
+ _take_ffmpeg(head + ["-fps_mode", "passthrough"] + tail,
+ "One Shot handoff frame", job)
+ except JobCancelled:
+ raise
+ except RuntimeError as e:
+ if "option 'fps_mode'" not in str(e):
+ raise
+ _take_ffmpeg(head + ["-vsync", "0"] + tail, "One Shot handoff frame", job)
if not Path(scratch).stat().st_size:
raise RuntimeError("One Shot handoff frame: no video frame decoded")
os.replace(scratch, target)
@@ -45081,6 +45271,9 @@ def worker_loop() -> None:
with _GPU_LOCK:
_JOB_CTX.job = job
try:
+ if (job.get("params") or {}).get("mode") != "image":
+ import ph3_image_service
+ ph3_image_service.evict()
run_job_inner(job)
finally:
_JOB_CTX.job = None
@@ -45230,6 +45423,9 @@ _GPU_HOLDER: dict = {}
def gpu_gate_mark(kind: str) -> None:
"""Record the out-of-queue holder of _GPU_LOCK (call right after acquire)."""
global _GPU_HOLDER
+ if kind != "image":
+ import ph3_image_service
+ ph3_image_service.evict()
_GPU_HOLDER = {"kind": str(kind), "since": time.time()}
@@ -45633,10 +45829,11 @@ def _build_image_engine_config(
hidream_fb_threshold=0.10,
hidream_fb_keep_last=12,
)
- if engine_override in ("ph3image_inline", "ph3image_draft_inline", "ph3image_standard_inline"):
- # P-H3-Image: High = 8 MP (what it was trained for), Standard 4 MP, Draft 2 MP.
+ if engine_override in ("ph3image_fast_inline", "ph3image_inline", "ph3image_draft_inline", "ph3image_standard_inline"):
+ # P-H3-Image: Fast defaults to 1.5 MP; existing explicit sizes keep their meaning.
return ph3image_engine_config(
- "draft" if engine_override == "ph3image_draft_inline"
+ "fast" if engine_override == "ph3image_fast_inline"
+ else "draft" if engine_override == "ph3image_draft_inline"
else "standard" if engine_override == "ph3image_standard_inline" else "high")
if engine_override == "mock_inline":
return agent_image_engine.ImageEngineConfig(kind="mock")
diff --git a/model_capabilities.py b/model_capabilities.py
index 2d9c372..233a89d 100644
--- a/model_capabilities.py
+++ b/model_capabilities.py
@@ -107,7 +107,7 @@ ENGINES: dict[str, dict] = {
"label": "Images",
"surface": "image",
"modes": ["t2i", "edit"],
- "qualities": ["draft", "standard", "high"],
+ "qualities": ["fast", "draft", "standard", "high"],
"lengths": None,
"cells": {"exclude_flags": []},
"inputs": ["reference_image"],
@@ -211,13 +211,13 @@ VARIANTS: dict[str, dict] = {
# ---- Images ---------------------------------------------------------------
"images.p_h3_image": {
# Pruna's P-H3-Image on MiniMax H3 (R&D L18): one latent frame, 8 forwards, no guidance.
- # PREVIEW since the bench (4-5 Nov 2026) rendered exactly this: text-to-image at the three
- # megapixel tiers (draft 2 MP, standard 4 MP, high 8 MP). Edit, up to 8 reference images,
+ # PREVIEW: the 6 Nov speed bench adds Fast 1.5 MP to Draft 2 / Standard 4 / High 8.
+ # All five Fast prompts rendered under a minute. Edit, up to 8 reference images,
# is second-wave and is NOT declared. Free for everyone (owner, card 296): no ledger row.
"engine": "images", "label": "P-H3-Image", "pick": {},
"status": "preview",
"modes": ["t2i"],
- "qualities": ["draft", "standard", "high"],
+ "qualities": ["fast", "draft", "standard", "high"],
"inputs": [],
"outputs": ["image"],
"options": [],
diff --git a/panel/routes_image.py b/panel/routes_image.py
index 9fd3f2e..97b665f 100644
--- a/panel/routes_image.py
+++ b/panel/routes_image.py
@@ -902,7 +902,7 @@ def post_image_generate(h, path, qs, ctype) -> None:
# Stream mflux stdout into the panel log card so users
# see step-by-step progress while the gen runs.
# tqdm progress bars come through line-buffered.
- if cfg.kind == "flux3":
+ if cfg.kind == "flux3" or (cfg.kind == "ph3image" and cfg.ph3image_warm_service):
P._preflight_image_job(cfg, engine_override=engine_override)
candidates = P.agent_image_engine.generate(
prompt=prompt, n=n, aspect=aspect,
diff --git a/ph3_image_service.py b/ph3_image_service.py
new file mode 100644
index 0000000..4684274
--- /dev/null
+++ b/ph3_image_service.py
@@ -0,0 +1,133 @@
+"""Bounded, evictable P-H3-Image worker. No model or MLX imports in Studio."""
+from __future__ import annotations
+import atexit
+import json
+from pathlib import Path
+import queue
+import subprocess
+import threading
+import time
+import uuid
+
+
+class ResidencyUnavailable(RuntimeError):
+ """The caller may retry staged after the resident process has been reaped."""
+
+
+class ImageWorker:
+ def __init__(self, idle_seconds=60):
+ self.idle_seconds = idle_seconds
+ self._lock = threading.RLock()
+ self._proc = None
+ self._key = None
+ self._events = None
+ self._timer = None
+ self._serial = 0
+
+ def _close_locked(self):
+ self._serial += 1
+ if self._timer:
+ self._timer.cancel()
+ self._timer = None
+ proc, self._proc = self._proc, None
+ self._key = None
+ if proc is None:
+ return
+ if proc.poll() is None:
+ proc.terminate()
+ try:
+ proc.wait(timeout=10)
+ except subprocess.TimeoutExpired:
+ proc.kill()
+ proc.wait(timeout=10)
+ for stream in (proc.stdin, proc.stdout):
+ if stream:
+ stream.close()
+
+ def close(self):
+ with self._lock:
+ self._close_locked()
+
+ def _expire(self, serial):
+ with self._lock:
+ if self._serial == serial:
+ self._close_locked()
+
+ def request(self, command, request, env, *, timeout, on_log=None,
+ register=lambda proc: None, unregister=lambda proc: None, preflight=None):
+ with self._lock:
+ self._serial += 1
+ if self._timer:
+ self._timer.cancel()
+ # A changed interpreter, script, weights or environment must never reuse old state.
+ key = (tuple(command), tuple(sorted(env.items())))
+ reusable = self._proc is not None and self._proc.poll() is None and self._key == key
+ if preflight is not None:
+ try:
+ preflight(reusable)
+ except BaseException:
+ self._close_locked()
+ raise
+ if not reusable:
+ self._close_locked()
+ self._events = queue.Queue()
+ self._proc = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT, text=True, errors='replace', env=env, start_new_session=True)
+ self._key = key
+ proc, events = self._proc, self._events
+ def read():
+ try:
+ for line in proc.stdout:
+ events.put(line.rstrip())
+ finally:
+ events.put(None)
+ threading.Thread(target=read, daemon=True).start()
+ proc = self._proc
+ token = uuid.uuid4().hex
+ started = time.monotonic()
+ registered = False
+ try:
+ register(proc)
+ registered = True
+ proc.stdin.write(json.dumps(dict(request, id=token)) + '\n')
+ proc.stdin.flush()
+ while True:
+ remaining = timeout - (time.monotonic() - started)
+ if remaining <= 0:
+ raise RuntimeError('P-H3-Image timed out')
+ try:
+ line = self._events.get(timeout=min(remaining, .25))
+ except queue.Empty:
+ continue
+ if line is None:
+ raise RuntimeError('P-H3-Image worker stopped before completing the image')
+ if line.startswith('PH3_RESULT '):
+ receipt = json.loads(line[len('PH3_RESULT '):])
+ if receipt.get('id') != token:
+ raise RuntimeError('P-H3-Image returned an unexpected request receipt')
+ if not receipt.get('ok'):
+ raise RuntimeError(receipt.get('error') or 'P-H3-Image failed')
+ if not Path(request['output']).is_file():
+ raise RuntimeError('P-H3-Image returned no image')
+ self._serial += 1
+ self._timer = threading.Timer(self.idle_seconds, self._expire, (self._serial,))
+ self._timer.daemon = True
+ self._timer.start()
+ return receipt['metrics']
+ if on_log:
+ on_log(line)
+ except BaseException:
+ self._close_locked()
+ raise
+ finally:
+ if registered:
+ unregister(proc)
+
+
+WORKER = ImageWorker()
+atexit.register(WORKER.close)
+
+
+def evict():
+ """Call under Studio's GPU gate before another engine loads weights."""
+ WORKER.close()
diff --git a/scripts/pinokio/h3_checkout.sh b/scripts/pinokio/h3_checkout.sh
index ddd74f6..9086b1c 100755
--- a/scripts/pinokio/h3_checkout.sh
+++ b/scripts/pinokio/h3_checkout.sh
@@ -36,8 +36,8 @@
# keeps its H3 step optional: scripts/post_update.sh runs this file through
# `defang`, which turns the FATAL line into a WARN and never ends the Update.
set -u
-H3_PIN_SHA="63893b3f33a62316a8b2065bcfba69ec0cc49aff"
-H3_PIN_REF="phosphene/v5.0-image2"
+H3_PIN_SHA="cd07c3c9dad98fd6c580c859a1b4df0956b3c118"
+H3_PIN_REF="phosphene/v5.0-image3"
H3_LOCAL_BRANCH="phosphene-pinned"
H3_URL="https://github.com/mrbizarro/minimax-h3-mlx.git"
H3_DIR="${1:-}"
diff --git a/webapp/index.html b/webapp/index.html
index eb2c1c3..e87ec2c 100644
--- a/webapp/index.html
+++ b/webapp/index.html
@@ -1162,7 +1162,7 @@
reader announces a placeholder-only textarea as unlabeled. -->
<textarea name="prompt" id="prompt" class="composer-prompt"
oninput="updateLangHint()" aria-label="Describe your shot"
- placeholder="Describe the scene AND the sound — e.g. wizard in a forest clearing, fireflies spiraling up · low whispered chant, ember crackle, distant owl. Audio is generated jointly with video; without sound cues the model outputs near-silent ambient."></textarea>
+ placeholder="Describe the scene and the sound. For example: a wizard in a forest clearing, fireflies spiraling up. Sound: low whispered chant, ember crackle, distant owl. Audio is made together with the video; without sound cues the model makes near-silent ambient."></textarea>
<!-- VC-13: a language hint — LTX itself was trained on English
prompts, and nothing told a non-English typist that. Hidden
@@ -2830,6 +2830,7 @@ The same wizard walks out of frame. Audio: footsteps on leaves."></textarea>
<option value="hidream_quality_inline" hidden>HiDream Quality (12-step + light FBCache, ~9 min / 4-img batch, best detail)</option>
<!-- P-H3-Image (Pruna, on MiniMax H3), port L18. Times measured on an M4 Max 64 GB
(ports/p-h3-image-pruna/bench/RESULT.md). Free (owner, card 296). -->
+ <option value="ph3image_fast_inline">P-H3-Image &mdash; Fast (1.5 MP, ~1 min)</option>
<option value="ph3image_standard_inline">P-H3-Image &mdash; exact text in images (4 MP, ~2.5 min, on MiniMax H3)</option>
<option value="ph3image_draft_inline">P-H3-Image Draft (2 MP, ~1.3 min)</option>
<option value="ph3image_inline">P-H3-Image High (8 MP, ~5 min)</option>
@@ -6666,9 +6667,9 @@ The last line"></textarea>
itself is discarded. That is the one thing on this list the
panel doesn't send and can't stop — turning analytics off is
what stops it, because then no request is made at all.
- Everything the panel would send is also written in plain text to
+ <span data-hide-mac-app>Everything the panel would send is also written in plain text to
<code>state/usage-log.jsonl</code> so you can read it yourself;
- the full schema is in <code>docs/ANALYTICS.md</code>.
+ the full schema is in <code>docs/ANALYTICS.md</code>.</span>
</div>
<div class="spicy-row">
<span class="spicy-state" id="analyticsStateBadge">ON</span>
@@ -6690,8 +6691,8 @@ The last line"></textarea>
back. Pasting your own key here <b>overrides</b> it; clearing
this field falls back to the shipped key rather than switching
sending off, so use the <b>Turn off</b> button above for that.
- Point <code>PHOSPHENE_ANALYTICS_HOST</code> at your own receiver
- to self-host. Full schema: <code>docs/ANALYTICS.md</code>.
+ <span data-hide-mac-app>Point <code>PHOSPHENE_ANALYTICS_HOST</code> at your own receiver
+ to self-host. Full schema: <code>docs/ANALYTICS.md</code>.</span>
</div>
<div class="token-row">
<div class="token-label">
@@ -6832,7 +6833,7 @@ The last line"></textarea>
<button class="ghost-btn" onclick="closeH3InstallCard()">Close</button>
</div>
<div class="models-hint" id="h3InstallBody"></div>
- <div class="models-foot">
+ <div class="models-foot" data-hide-mac-app>
Already have a checkout? Launch the panel with
<code>LTX_H3_ROOT</code> + <code>LTX_H3_MODELS</code> pointing at it —
see <code>docs/H3_ENGINE.md</code>.
diff --git a/webapp/js/boot.js b/webapp/js/boot.js
index b9e225e..0ebbf64 100644
--- a/webapp/js/boot.js
+++ b/webapp/js/boot.js
@@ -22,6 +22,13 @@ window.PHOSPHENE_CAP_TIER = (BOOT.cap_tier || 'q8');
// Pinokio (BOOT.distribution 'pinokio') reads exactly what it always did.
function isMacApp() { return BOOT.distribution === 'mac-app'; }
function distText(pinokio, macApp) { return isMacApp() ? macApp : pinokio; }
+// Developer-only text (environment variables, file paths, docs pages) is marked
+// data-hide-mac-app in the page: the Mac app's person never sees it.
+(function hideForMacApp() {
+ if (!isMacApp()) return;
+ const go = () => document.querySelectorAll('[data-hide-mac-app]').forEach(el => { el.style.display = 'none'; });
+ if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', go); else go();
+})();
// The edition label ('free' / 'pro' from the Mac app, '' under Pinokio). A
// label only: body[data-edition] and this are the hooks, nothing paid.
function phEdition() { return BOOT.edition || ''; }
diff --git a/webapp/js/characters.js b/webapp/js/characters.js
index 2abfa13..8c7d56f 100644
--- a/webapp/js/characters.js
+++ b/webapp/js/characters.js
@@ -454,9 +454,10 @@ function musicInstallRender(el, where) {
const repair = !!music.repairable;
const failed = inst.state === 'failed' && inst.error;
const stopped = inst.state === 'stopped';
- const label = repair ? 'Repair music engine (weights kept)' : `Install music engine (${size})`;
+ const label = repair ? distText('Repair music engine (weights kept)', 'Set up the music engine') : `Install music engine (${size})`;
const lead = repair
- ? 'The YuE2 weights are on disk but the engine needs repair. This takes a couple of minutes and re-downloads nothing.'
+ ? distText('The YuE2 weights are on disk but the engine needs repair. This takes a couple of minutes and re-downloads nothing.',
+ 'The music engine needs a quick setup. It takes a couple of minutes and downloads nothing.')
: 'Compose writes a whole song — vocals and arrangement — from your lyrics and a style. It needs the YuE2 music engine: a one-time ~11 GB download that resumes if interrupted.';
html = `<p class="mi-lead">${lead}</p>
${failed ? `<p class="mi-error">${escapeHtml(inst.error)}</p>` : ''}
@@ -4653,7 +4654,7 @@ function applyExtendPillPrices() {
function updatePromptPlaceholder() {
const prompt = document.getElementById('prompt');
if (!prompt) return;
- const base = 'Describe the scene AND the sound — e.g. wizard in a forest clearing, fireflies spiraling up · low whispered chant, ember crackle, distant owl. Audio is generated jointly with video; without sound cues the model outputs near-silent ambient.';
+ const base = 'Describe the scene and the sound. For example: a wizard in a forest clearing, fireflies spiraling up. Sound: low whispered chant, ember crackle, distant owl. Audio is made together with the video; without sound cues the model makes near-silent ambient.';
const keyframeTwo = 'Describe the full first-to-last transition in one prompt. Include motion, camera, mood, and audio cues; the start/end images anchor the visual endpoints.';
const keyframeMulti = `One prompt controls the whole ${window._kfMode}-keyframe shot; the Beat at(s) controls define segment timing. Write one continuous action with the beats described in order, plus audio cues.`;
if (currentMode === 'keyframe') {
diff --git a/webapp/js/engines.js b/webapp/js/engines.js
index 0cd58da..4934a4b 100644
--- a/webapp/js/engines.js
+++ b/webapp/js/engines.js
@@ -1997,7 +1997,10 @@ function renderEngineSwitch() {
</button>`;
}
const st = engineStatus(e);
- const offer = !e.builtin && !st.announced && st.capable && !st.available;
+ // Mac app, weights on this Mac, runtime being set up by the app itself: not an
+ // offer and not a repair, just a calm "getting ready".
+ const preparing = !e.builtin && !st.announced && st.capable && !st.available && !!st.preparing;
+ const offer = !e.builtin && !st.announced && st.capable && !st.available && !preparing;
// Every image model makes pictures; the form under the picker says what
// each needs (a reference for Reference Edit).
const modeOk = imgSurface || engineServesMode(e, surfaceMode);
@@ -2015,12 +2018,13 @@ function renderEngineSwitch() {
: st.repairable ? 'repair'
: (e.install_size || '').replace(/^~/, '');
badgeClass = ' offer';
- } else if (st.available && !modeOk) { badge = (e.serves_label || '').toLowerCase().replace(' and ', ' · '); }
+ } else if (preparing) { badge = 'getting ready'; }
+ else if (st.available && !modeOk) { badge = (e.serves_label || '').toLowerCase().replace(' and ', ' · '); }
else if (imgSurface && !st.capable) { badge = 'needs ' + (st.ram_floor_gb || '?') + ' GB'; }
else if (e.preview) { badge = 'preview'; }
// Inert = real but unreachable RIGHT NOW. Distinct from needs-install,
// which IS reachable — that click is the install.
- const inert = st.announced || (st.available && !modeOk) || (imgSurface && !st.capable);
+ const inert = st.announced || preparing || (st.available && !modeOk) || (imgSurface && !st.capable);
const cls = 'eng-opt'
+ (e.id === active ? ' active' : '')
+ (offer ? ' needs-install' : '')
@@ -2187,6 +2191,9 @@ function _engineTooltip(e, st, modeOk) {
return name + ' — needs ' + (st.ram_floor_gb || st.min_ram_gb || 36)
+ ' GB unified memory';
}
+ if (!e.builtin && !st.available && st.preparing) {
+ return name + ' is getting ready on this Mac. It turns on by itself when it is ready.';
+ }
if (!e.builtin && !st.available) {
// H3-05: "repairable" also covers missing_q8_dit (every weight present,
// only the local compact build is missing) — a genuinely different fix
@@ -2214,6 +2221,8 @@ function engineSegClick(id) {
if (!e) return;
const st = engineStatus(e);
if (st.announced) return;
+ // Mac app, runtime being set up by the app: nothing to open, nothing to click.
+ if (!e.builtin && st.capable && !st.available && st.preparing) return;
if (!e.builtin && st.capable && !st.available) {
const fn = e.install_card && window[e.install_card];
// 'chip' tells the card this click came from the switcher, where a repeat
diff --git a/webapp/js/health.js b/webapp/js/health.js
index c76a734..c11da67 100644
--- a/webapp/js/health.js
+++ b/webapp/js/health.js
@@ -218,6 +218,12 @@ function renderVersionPill() {
// the app" is the intended behaviour, verbatim). The broadcast is the
// maintainer's channel: BROADCAST.json on public main, fetched by the same
// 30-minute server poll, shown ONCE per message id, dismissed forever.
+// The one Phosphene loading mark, small: the header's own markup (footer mark), cloned.
+// CSS .ph-mark-mini sets the size; Reduce Motion stops it like every other mark.
+window.phosMiniMark = function phosMiniMark() {
+ const src = document.querySelector('header .ph-mark');
+ return '<span class="ph-mark ph-mark-mini" aria-hidden="true">' + (src ? src.innerHTML : '') + '</span>';
+};
window._phModalOpen = false;
window._updModalShownThisLoad = false;
window._bcHandled = Object.create(null);
@@ -825,7 +831,7 @@ async function versionPillClick() {
async function versionDoRefresh() {
const pill = document.getElementById('versionPill');
pill.classList.add('pill-busy');
- pill.innerHTML = '<svg class="ph" aria-hidden="true" style="margin-right:4px;vertical-align:-2px;animation:phSpin 1.2s linear infinite"><use href="#ph-arrow-clockwise-bold"/></svg>checking…';
+ pill.innerHTML = phosMiniMark() + 'checking…';
try {
const r = await fetch('/version/check', { method: 'POST' });
const data = await r.json();
@@ -861,7 +867,7 @@ async function versionDoPull(opts) {
}
const pill = document.getElementById('versionPill');
pill.classList.add('pill-busy');
- pill.innerHTML = '<svg class="ph" aria-hidden="true" style="margin-right:4px;vertical-align:-2px;animation:phSpin 1.2s linear infinite"><use href="#ph-arrow-clockwise-bold"/></svg>pulling…';
+ pill.innerHTML = phosMiniMark() + 'pulling…';
// Tell poll() not to flash the offline banner during this call —
// /version/pull is single-threaded server-side and blocks /status for
// ~30s while git fetch + git pull + remote-check run. Without this
diff --git a/webapp/js/preview.js b/webapp/js/preview.js
index f1e9b5e..db9c05d 100644
--- a/webapp/js/preview.js
+++ b/webapp/js/preview.js
@@ -2053,11 +2053,15 @@ async function refreshModelsModal({ silent = false } = {}) {
? '<svg class="ph" aria-hidden="true"><use href="#ph-check-bold"/></svg>'
: '<svg class="ph" aria-hidden="true"><use href="#ph-x-circle"/></svg>';
const statusText = ready
- ? `Ready · engine picker unlocked · ${escapeHtml(h3.root || '')}`
+ ? distText(`Ready · engine picker unlocked · ${escapeHtml(h3.root || '')}`,
+ 'Ready · engine picker unlocked')
+ : h3.preparing
+ ? 'Getting ready on this Mac'
: distText('Available to install · one click in the Pinokio sidebar',
'Not available in the Mac app yet');
const btn = ready
? `<button class="ghost" disabled>Installed</button>`
+ : h3.preparing ? ''
: `<button onclick="openH3InstallCard()">${distText('How to install', 'About H3')}</button>`;
h3Row = `
<li class="${cls}">
@@ -2078,7 +2082,7 @@ async function refreshModelsModal({ silent = false } = {}) {
const statusText = music.available
? `Ready · Compose unlocked in the Audio tab · ${escapeHtml(music.root || '')}`
: inst.active ? `Installing… ${inst.percent || 1}% · ${escapeHtml(inst.step_label || '')}`
- : music.repairable ? 'Weights on disk · engine needs repair'
+ : music.repairable ? distText('Weights on disk · engine needs repair', 'Weights on disk · needs a quick setup')
: `Available to install · one click here or in Audio → Compose · ~11 GB · needs ${music.min_ram_gb} GB unified memory`;
musicRow = `<li class="${music.available ? 'ready' : 'missing'}">
<span class="icon">♪</span><div class="meta">
diff --git a/webapp/js/queue.js b/webapp/js/queue.js
index 66795d8..474a3aa 100644
--- a/webapp/js/queue.js
+++ b/webapp/js/queue.js
@@ -714,6 +714,9 @@ function setEngine(engine, opts) {
// The lowest lane's floor, not the bf16 one and not a literal 64.
reason = e.label + ' needs '
+ (st.ram_floor_gb || st.min_ram_gb || 36) + ' GB unified memory.';
+ } else if (!st.available && st.preparing) {
+ target = fallback.id;
+ reason = e.label + ' is getting ready on this Mac. Rendering on ' + fallback.label + ' meanwhile.';
} else if (!st.available) {
target = fallback.id;
// Distinguish "you never installed this" from "you DID install this and
@@ -902,10 +905,10 @@ function _syncEnginePromptTools() {
+ 'his mouth settles closed. Click Structure or + Line above to '
+ 'insert the skeleton.\n\noverall_soundscape: ambience, sound '
+ 'effects.\n\nnon_diegetic_music: N/A or a description.'
- : 'Describe the scene AND the sound — e.g. wizard in a forest '
- + 'clearing, fireflies spiraling up · low whispered chant, ember '
- + 'crackle, distant owl. Audio is generated jointly with video; '
- + 'without sound cues the model outputs near-silent ambient.';
+ : 'Describe the scene and the sound. For example: a wizard in a forest '
+ + 'clearing, fireflies spiraling up. Sound: low whispered chant, ember '
+ + 'crackle, distant owl. Audio is made together with the video; '
+ + 'without sound cues the model makes near-silent ambient.';
}
if (eng === 'h3' && typeof h3SyncPromptHelper === 'function') {
try { h3SyncPromptHelper(); } catch (e) {}
@@ -955,6 +958,7 @@ function updateH3Availability(s) {
// Install→repair→install flips the pill's copy and the models
// card even when `available` itself hasn't moved yet.
|| (next.repairable !== H3.repairable)
+ || (next.preparing !== H3.preparing)
|| (next.reason !== H3.reason)
// Turbo's release adapter may arrive from inside the panel, so
// this turns the dashed pill live as soon as it lands.
@@ -1081,7 +1085,11 @@ function openH3InstallCard(source) {
nothing.`
: `<b>Hailuo H3 is installed — it just needs repairing.</b> Your weights
(~75 GB) are still on disk and are <em>not</em> re-downloaded.`;
- const intro = H3.repairable ? `
+ const intro = (isMacApp() && (H3.repairable || H3.preparing)) ? `
+ <p style="margin:0 0 10px">
+ <b>Hailuo H3 is getting ready on this Mac.</b> Phosphene sets it up by
+ itself, so there is nothing for you to do. LTX keeps working meanwhile.
+ </p>` : H3.repairable ? `
<p style="margin:0 0 10px">
${fixBlurb}
</p>
@@ -1097,7 +1105,7 @@ function openH3InstallCard(source) {
place of the install entry). The step is idempotent — it skips every
weight already on disk. The panel picks the engine back up within a
couple of seconds, no restart.`,
- `Repairing or building Hailuo H3 isn\u2019t available in the Mac app yet. LTX keeps working.`)}
+ `Hailuo H3 is getting ready on this Mac. LTX keeps working.`)}
</p>` : `
<p style="margin:0 0 10px">
<b>Hailuo H3 is Phosphene's second video engine</b>, a peer of LTX
@@ -1137,7 +1145,7 @@ function openH3InstallCard(source) {
// noise the other 99% of the time. Printing it under a two-sentence pitch
// made the offer read like an error report. Kept verbatim, folded shut.
body.innerHTML = intro + `
- ${missing.length ? `<details class="h3-diag">
+ ${missing.length && !isMacApp() ? `<details class="h3-diag">
<summary>Details for troubleshooting</summary>
<p>Currently missing: ${escapeHtml(missing.join('; '))}</p>
</details>` : ''}`;
@@ -1146,7 +1154,8 @@ function openH3InstallCard(source) {
// nothing downloads. Say what this click actually costs.
const title = document.getElementById('h3InstallTitle');
if (title) {
- title.textContent = needsBuildOnly ? 'Build the compact engine · ~5 min, no download'
+ title.textContent = (isMacApp() && (H3.repairable || H3.preparing)) ? 'Hailuo H3'
+ : needsBuildOnly ? 'Build the compact engine · ~5 min, no download'
: H3.repairable ? 'Repair Hailuo H3 · no download'
: 'Hailuo H3 · 75 GB';
}
@@ -1190,7 +1199,7 @@ function _h3NudgeEngineOffer() {
// first draft, and it clipped exactly where the instruction lived.
// H3-39: same "· 75 GB" default the modal title had, wrong whenever this is
// a build-only or repair nudge — nothing downloads in either case.
- const nudgeMsg = isMacApp() ? 'Hailuo H3 · not available in the Mac app yet.'
+ const nudgeMsg = isMacApp() ? (H3.preparing ? 'Hailuo H3 · getting ready on this Mac.' : 'Hailuo H3 · not available in the Mac app yet.')
: (H3.reason === 'missing_q8_dit')
? 'Hailuo H3 · build the compact engine, no download — from the Pinokio sidebar.'
: H3.repairable
diff --git a/webapp/js/settings.js b/webapp/js/settings.js
index 47fdbf0..60c14c2 100644
--- a/webapp/js/settings.js
+++ b/webapp/js/settings.js
@@ -239,6 +239,15 @@ function updateModelsCard(s) {
//
// Gated on `repairable`, so a user who never installed H3 is never nagged.
const h3s = s.h3 || {};
+ // ----- Mac app: Hailuo H3 is never a repair job for the person -------------
+ // The app sets H3 up by itself when its weights are on this Mac (bootstrap.sh
+ // h3), so a Mac with weights and no runtime yet (`preparing`), or one that is
+ // a build away on a smaller Mac, shows no card at all. Nothing to click.
+ if (isMacApp() && (h3s.preparing || h3s.needs_q8_dit)) {
+ card.style.display = 'none';
+ setActions('');
+ return;
+ }
// ----- 46-60 GB Mac whose reduced-RAM engine was never built -------------
// Its own branch because the repair copy below is wrong here: nothing is
// missing or broken, the machine simply needs the Q8 engine that
diff --git a/webapp/js/stage.js b/webapp/js/stage.js
index 630d647..f521c1e 100644
--- a/webapp/js/stage.js
+++ b/webapp/js/stage.js
@@ -309,6 +309,10 @@ function imgStudioApplyMemoryFit() {
let moved = false;
Array.from(sel.options).forEach(opt => {
const info = _IMG_ENGINE_STATUS[opt.value];
+ if (info && info.version_label) {
+ opt.textContent = info.version_label;
+ delete opt.dataset.ramTagged;
+ }
if (!info || info.fits_mac !== false) return;
if (!opt.dataset.ramTagged) {
opt.dataset.ramTagged = '1';
diff --git a/webapp/js/storyboard.js b/webapp/js/storyboard.js
index 1ecd6d4..44c0a11 100644
--- a/webapp/js/storyboard.js
+++ b/webapp/js/storyboard.js
@@ -1632,7 +1632,7 @@ function sbShotCard(s, r, errs) {
<button type="button" class="sb-err-fix sb-still-redo" data-act="restill"
title="${userStill ? 'Render a new take from this photo (new seed) — your photo is kept' : 'Make a new still and render this shot from it'}">${userStill ? 'Re-render (new seed)' : 'New still'}</button>
</div>` : stillPending ? `
- <div class="sb-still is-pending"><span class="sb-still-spin" aria-hidden="true"></span><span class="sb-still-tag">making the still…</span></div>`
+ <div class="sb-still is-pending">${window.phosMiniMark ? window.phosMiniMark() : ''}<span class="sb-still-tag">making the still…</span></div>`
: (s.still_error ? `<div class="sb-still sb-still-failed" title="${escapeHtml(s.still_error)}"><span class="sb-still-tag">${awaitingApproval ? 'the still could not be made — held until you choose' : 'no still — rendered unanchored'}</span>
<button type="button" class="sb-err-fix sb-still-redo" data-act="restill" title="Try the still again">Try again</button>${awaitingApproval ? `
<button type="button" class="sb-err-fix sb-still-approve" data-act="approve-still" title="Render the video without a still to start from">Render without a still</button>` : ''}</div>` : '');
diff --git a/webapp/style/panel.css b/webapp/style/panel.css
index c1a9b27..e18ac82 100644
--- a/webapp/style/panel.css
+++ b/webapp/style/panel.css
@@ -10663,11 +10663,15 @@
@keyframes fm-glow { from { transform: scale(0.85); opacity: 0.85; } to { transform: scale(1.15); opacity: 1; } }
@keyframes fm-hue { from { filter: hue-rotate(-14deg); } to { filter: hue-rotate(18deg) saturate(1.15); } }
- /* Header uses the same motion at half speed. */
- body > header .fm-spin { animation-duration: calc(var(--t) * 2); }
- body > header .fm-morph { animation-duration: calc(var(--b) * 2); animation-delay: calc(var(--bd) * 2); }
- body > header .fm-core { animation-duration: 12s; }
- body > header .foot-mark { animation-duration: 96s; }
+ /* One logo motion everywhere (5.0.3): the header, the stage and every loading mark run the
+ footer's clock exactly. The header used to run at half speed; that is gone.
+ Small loading marks (.ph-mark-mini) keep the same shape, colours, breathing, hue and glow,
+ but turn faster, because a 14 px mark on the footer's 70-230 s clock would look frozen. */
+ .ph-mark-mini { display: inline-block; width: 1.5em; height: 1.5em; vertical-align: -0.35em; margin-right: 6px; flex: none; position: relative; }
+ .ph-mark-mini .foot-mark { display: block; width: 100%; height: 100%; overflow: visible; }
+ .ph-mark-mini .fm-spin { animation-duration: calc(var(--t) / 12); }
+ .ph-mark-mini .fm-morph { animation-duration: calc(var(--b) / 4); }
+ .ph-mark-mini .fm-core { animation-duration: 1.5s; }
@media (prefers-reduced-motion: reduce) {
.ph-mark .foot-mark, .ph-mark g, .ph-mark .fm-core { animation: none !important; }
}
@@ -11432,8 +11436,6 @@
/* For buttons that previously held a single unicode glyph
(×, ↗, ↻, etc.). Make the SVG inherit the button's flex centering. */
button > .ph, a > .ph { display: block; }
- /* Spinner keyframe for refresh icons used in "checking…" pills. */
- @keyframes phSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
/* === ENGINE TINT ===========================================
Last in the sheet so it wins, and DELIBERATELY NARROW: only the
@@ -11623,8 +11625,6 @@
.sb-still.is-pending { padding: 10px 8px; display: flex; align-items: center; gap: 8px; }
.sb-still.is-pending .sb-still-tag { position: static; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-bright, var(--accent)); }
-.sb-still-spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--accent); animation: sbStillSpin 1s linear infinite; }
-@keyframes sbStillSpin { to { transform: rotate(360deg); } }
.sb-still-redo { position: absolute; right: 6px; top: 6px; }
/* FILM-46: "Stills first" approve step. The Approve button takes the
top-right corner New still normally has; New still moves down a row so
@@ -13457,6 +13457,9 @@ button.primary:hover::before, #genBtn:hover::before, #genForm .batch-queue-btn:h
/* Pro is an optional visit, never a gate on the free studio. */
.pro-entry { flex-shrink: 0; }
+/* the header Pro button for Free users wears the same violet tag as .pro-mark (owner, 7 Nov: purple everywhere) */
+.pro-entry { color: #b69cff; background: rgba(139,92,246,0.16); border: 1px solid rgba(139,92,246,0.5); font-weight: 700; letter-spacing: 0.12em; }
+.pro-entry:hover { background: rgba(139,92,246,0.26); color: #cbb8ff; }
.pro-entry[hidden] { display: none; }
.models-card.pro-card { width: min(820px, calc(100vw - 32px)); max-width: 820px; padding: 24px; background: var(--bg, #0a0a0b); }
.pro-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--muted, #b4b4bb); font-size: 13px; }