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.4): updates that survive a bad connection, check-for-updates inside the Studio, signed messages, a smaller Mac app, a first-clip card for new users only

mrbizarroab462efe2acc
diff --git a/README.md b/README.md
index 0e6d025..5104e2e 100644
--- a/README.md
+++ b/README.md
@@ -3,9 +3,9 @@
**Run LTX-2.5 and MiniMax H3 (Hailuo) on your Apple Silicon Mac. Text-to-video and image-to-video with sound, speech, lip-sync, songs and image editing. A native Mac app, offline: no cloud, no API key, no NVIDIA GPU.**
<p align="center">
- <a href="https://phosphene.video/?utm_source=github&amp;utm_medium=readme&amp;utm_campaign=repo&amp;utm_content=top"><img src="assets/logo-readme.png" alt="Phosphene" width="360"></a>
+ <a href="https://phosphene.video/?utm_source=github&amp;utm_medium=readme&amp;utm_campaign=home&amp;utm_content=logo"><img src="assets/logo-readme.png" alt="Phosphene" width="360"></a>
</p>
-<h3 align="center"><a href="https://phosphene.video/?utm_source=github&amp;utm_medium=readme&amp;utm_campaign=repo&amp;utm_content=top">Visit Phosphene official site →</a> · <a href="https://phosphene.video/download/?utm_source=github&amp;utm_medium=readme&amp;utm_campaign=repo&amp;utm_content=download">Download for Mac</a></h3>
+<h3 align="center"><a href="https://phosphene.video/?utm_source=github&amp;utm_medium=readme&amp;utm_campaign=home&amp;utm_content=header">Visit Phosphene official site →</a> · <a href="https://phosphene.video/download/?utm_source=github&amp;utm_medium=readme&amp;utm_campaign=download&amp;utm_content=header">Download for Mac</a></h3>
<p align="center">
<img src="assets/readme/low_tide_sleeper.webp" alt="The low-tide sleeper: a giant stone sleeper on a black-sand beach, an AI video made locally on a Mac with Phosphene and MiniMax H3" width="100%">
@@ -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.3.** Made by Mr Bizarro.
+**Current release: v5.0.4.** Made by Mr Bizarro.
## Why Phosphene
@@ -147,7 +147,7 @@ MiniMax H3 (about 75 GB) and Music Studio (about 11 GB) are optional.
On an M4 Max with 64 GB, a 5-second LTX-2.5 clip at High takes about 6 minutes,
a 5-second MiniMax H3 clip on Draft + Fast about 5 minutes, and a 3-minute song about 3 minutes.
Smaller Macs take longer: across Phosphene users, a 5-second LTX-2.5 clip at Balanced (480p) took a median 10m40s on a 16 GB M4.
-Phosphene estimates the time before you press Generate. **Bench** measures your own Mac and compares it with other Macs; see the [benchmarks](https://phosphene.video/benchmarks/?utm_source=github&utm_medium=readme&utm_campaign=repo&utm_content=bench).
+Phosphene estimates the time before you press Generate. **Bench** measures your own Mac and compares it with other Macs; see the [benchmarks](https://phosphene.video/benchmarks/?utm_source=github&utm_medium=readme&utm_campaign=benchmarks&utm_content=bench).
<p align="center">
<img src="assets/readme/lantern_fjord.webp" alt="A man in a rowing boat among floating lanterns in a fjord, made with MiniMax H3 on a Mac" width="100%">
@@ -156,7 +156,7 @@ Phosphene estimates the time before you press Generate. **Bench** measures your
## Install: the Mac app, or one click with Pinokio
-**Mac app (recommended):** [download Phosphene for Mac](https://phosphene.video/download/?utm_source=github&utm_medium=readme&utm_campaign=repo&utm_content=install), open it and pick your models.
+**Mac app (recommended):** [download Phosphene for Mac](https://phosphene.video/download/?utm_source=github&utm_medium=readme&utm_campaign=install&utm_content=mac-app), open it and pick your models.
It can reuse models your Pinokio install already downloaded.
**Pinokio:** Phosphene also installs with one click through Pinokio (pinokio.computer), a free app launcher:
@@ -167,7 +167,7 @@ It can reuse models your Pinokio install already downloaded.
4. Press **Start**, then open the app.
To update, press **Update** in Pinokio, then restart Phosphene.
-The [docs](https://phosphene.video/docs/?utm_source=github&utm_medium=readme&utm_campaign=repo&utm_content=docs) have the step-by-step install, troubleshooting and every feature in detail.
+The [docs](https://phosphene.video/docs/?utm_source=github&utm_medium=readme&utm_campaign=docs&utm_content=install-section) have the step-by-step install, troubleshooting and every feature in detail.
To install by hand instead, follow the [manual install](docs/MANUAL_INSTALL.md).
Linux on Apple Silicon (`docs/LINUX.md`) is maintained by @joshuaswarren on a best-effort basis.
@@ -176,7 +176,7 @@ Linux on Apple Silicon (`docs/LINUX.md`) is maintained by @joshuaswarren on a be
Phosphene is open source and stays free. **Pro** is optional, for people who use it every day:
**Faster Flex Turbo** for quicker renders, new features first, and priority support.
Everything available today stays free, Phosphene stays open source under MIT, and new model ports reach everyone free.
-Prices and what is on sale now: [phosphene.video/pricing](https://phosphene.video/pricing/?utm_source=github&utm_medium=readme&utm_campaign=repo&utm_content=pro).
+Prices and what is on sale now: [phosphene.video/pricing](https://phosphene.video/pricing/?utm_source=github&utm_medium=readme&utm_campaign=pricing&utm_content=pro-section).
## FAQ
diff --git a/VERSION b/VERSION
index 50e2274..2d6c0bc 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-5.0.3
+5.0.4
diff --git a/app_notice.py b/app_notice.py
new file mode 100644
index 0000000..480099b
--- /dev/null
+++ b/app_notice.py
@@ -0,0 +1,137 @@
+"""Signed notice for Pinokio installs ("Notify everyone", 5.0.4).
+
+The Mac app reads the same file natively (app/Sources/SignedNotice.swift). Here is the Pinokio side: the
+studio fetches https://phosphene.video/app/notice.json and notice.json.sig every 10 minutes and at start,
+checks the Ed25519 signature (the Sparkle key, the public half below; verify-only code from pro_token) and
+serves the one verified notice at GET /notice. TEXT THAT IS NOT SIGNED IS NEVER SERVED. The page shows each
+notice id once (dismissal is remembered in the browser). min_version / max_version are compared with this
+studio's own version; expires_at is honoured.
+
+ {"id":"n-20261107-1","text":"...","action":"update","link":"https://phosphene.video/...",
+ "min_version":"5.0.0","max_version":"5.0.3","expires_at":"2026-11-14T00:00:00Z"}
+"""
+from __future__ import annotations
+
+import base64
+import datetime
+import json
+import os
+import re
+import threading
+import time
+import urllib.request
+
+import pro_token
+
+# SUPublicEDKey of the Mac app (app/Support/Info.plist): the Sparkle EdDSA public key.
+SPARKLE_PUBLIC_KEY_B64 = "hukjR4xWNJ/YsAv03YecfKeDenK4Voh6pr7244sB8Zo="
+NOTICE_URL = "https://phosphene.video/app/notice.json"
+MAX_BYTES = 4096
+INTERVAL_SEC = 600
+
+_lock = threading.Lock()
+_current: dict | None = None
+_last = "not checked"
+
+
+def _parts(v):
+ p = str(v).split(".")
+ if not 1 <= len(p) <= 4 or not all(x.isdigit() for x in p):
+ return None
+ return [int(x) for x in p]
+
+
+def _cmp(a, b):
+ n = max(len(a), len(b))
+ a, b = a + [0] * (n - len(a)), b + [0] * (n - len(b))
+ return (a > b) - (a < b)
+
+
+def accept(body: bytes, sig_text: bytes, version: str, public_b64: str = SPARKLE_PUBLIC_KEY_B64, now: float | None = None):
+ """The notice dict for this studio, or None (bad signature, malformed, outside the window, expired)."""
+ try:
+ if len(body) > MAX_BYTES:
+ return None
+ sig = base64.b64decode(sig_text.strip(), validate=True)
+ if not pro_token.ed25519_verify(base64.b64decode(public_b64), body, sig):
+ return None
+ o = json.loads(body)
+ if not isinstance(o, dict):
+ return None
+ nid, text = o.get("id"), o.get("text")
+ if not (isinstance(nid, str) and re.fullmatch(r"[A-Za-z0-9._-]{1,64}", nid)):
+ return None
+ if not (isinstance(text, str) and 1 <= len(text.strip()) <= 400) or re.search(r"[\x00-\x1f\x7f]", text):
+ return None
+ app = _parts(version)
+ if app is None:
+ return None
+ if "min_version" in o:
+ lo = _parts(o["min_version"])
+ if lo is None or _cmp(app, lo) < 0:
+ return None
+ if "max_version" in o:
+ hi = _parts(o["max_version"])
+ if hi is None or _cmp(app, hi) > 0:
+ return None
+ if "expires_at" in o:
+ try:
+ exp = datetime.datetime.fromisoformat(str(o["expires_at"]).replace("Z", "+00:00")).timestamp()
+ except ValueError:
+ return None
+ if (now if now is not None else time.time()) >= exp:
+ return None
+ action = o.get("action", "update")
+ if action not in ("update", "link", "none"):
+ return None
+ link = o.get("link")
+ if link is not None:
+ m = re.fullmatch(r"https://([a-z0-9.-]+)(/\S*)?", str(link))
+ if not m or not (m.group(1) == "phosphene.video" or m.group(1).endswith(".phosphene.video") or m.group(1) == "github.com"):
+ return None
+ if action == "link" and not link:
+ action = "none"
+ return {"id": nid, "text": text.strip(), "action": action, "link": link}
+ except Exception:
+ return None
+
+
+def current() -> dict | None:
+ with _lock:
+ return dict(_current) if _current else None
+
+
+def last_outcome() -> str:
+ with _lock:
+ return _last
+
+
+def refresh(version: str, url: str | None = None) -> None:
+ global _current, _last
+ url = url or os.environ.get("PHOSPHENE_NOTICE_URL") or NOTICE_URL
+
+ def get(u, limit):
+ req = urllib.request.Request(u, headers={"User-Agent": f"PhospheneStudio/{version}"})
+ with urllib.request.urlopen(req, timeout=8) as r:
+ return r.read(limit + 1)
+
+ try:
+ body, sig = get(url, MAX_BYTES), get(url + ".sig", 1024)
+ except Exception:
+ with _lock:
+ _last = "no notice file"
+ return
+ n = accept(body, sig, version)
+ with _lock:
+ _current = n
+ _last = f"shown {n['id']}" if n else "rejected (unsigned, outside the version window, or expired)"
+
+
+def loop(version_fn) -> None:
+ time.sleep(8)
+ while True:
+ try:
+ refresh(version_fn())
+ except Exception:
+ pass
+ time.sleep(INTERVAL_SEC)
diff --git a/docs/CHANGELOG_4.19.19.md b/docs/CHANGELOG_4.19.19.md
index ce60741..e97aa44 100644
--- a/docs/CHANGELOG_4.19.19.md
+++ b/docs/CHANGELOG_4.19.19.md
@@ -7,7 +7,7 @@
- **Real sizes, not upscales.** Standard is 4 megapixels (about 2.5 minutes on an M4 Max), High is 8 megapixels (about 5 minutes), Draft is 2 megapixels (about 1.3 minutes). Each is one image straight out of the model.
- **Honest limits.** Hands and tiny background faces can still go wrong, and it does not take reference images yet.
-Examples and how-to: https://phosphene.video/docs/images/#p-h3-image
+Examples and how-to: https://phosphene.video/docs/images/?utm_source=github&utm_medium=release&utm_campaign=release-body&utm_content=changelog#p-h3-image
It uses the Hailuo H3 files you already have, so after you press Update the picker shows up once the Hailuo H3 runner has updated too (Update does this on its own). Credit: P-H3-Image by Pruna AI, based on MiniMax-H3 by MiniMax (MiniMax H3 Community License); text encoder based on Qwen3-VL-4B (Apache-2.0). Powered by MiniMax H3.
diff --git a/docs/CHANGELOG_5.0.0.md b/docs/CHANGELOG_5.0.0.md
index 93a926c..edef19e 100644
--- a/docs/CHANGELOG_5.0.0.md
+++ b/docs/CHANGELOG_5.0.0.md
@@ -4,7 +4,7 @@
## Free
-- **Two ways to run it.** Pinokio (press Update, then restart Phosphene) and, new, a native Mac app that needs no Pinokio and can reuse models you already downloaded: [phosphene.video/download](https://phosphene.video/download/).
+- **Two ways to run it.** Pinokio (press Update, then restart Phosphene) and, new, a native Mac app that needs no Pinokio and can reuse models you already downloaded: [phosphene.video/download](https://phosphene.video/download/?utm_source=github&utm_medium=release&utm_campaign=release-body&utm_content=changelog).
- **A redesigned panel.** One calmer layout, the Model picker is the first row on every surface, and the options change with the model you pick.
- **Speech and lip-sync.** Type a line, get a spoken voice, then lip-sync a face to it.
- **FLUX 3 Klein** by Black Forest Labs: pictures from text and edits with reference pictures, free (it arrived in 4.19.14 and is part of 5.0 too).
diff --git a/docs/CHANGELOG_5.0.4.md b/docs/CHANGELOG_5.0.4.md
new file mode 100644
index 0000000..31edc21
--- /dev/null
+++ b/docs/CHANGELOG_5.0.4.md
@@ -0,0 +1,20 @@
+# Phosphene 5.0.4
+
+**Updates that arrive, a Studio that checks them for you, and a message line from us to you.** Nothing that was free was taken away.
+
+## Mac app
+
+- **Updates survive a bad connection.** A slow or dropping route no longer loses the download: Phosphene carries on where it stopped, retries by itself, and if it truly cannot finish it says so and offers **Try again**. It never just disappears.
+- **Updates are found within 10 minutes** and at every launch.
+- **"Check for updates" in the Studio works.** The button and the version label in the Studio header start the app's own updater.
+- **Your Pro licence stays put.** If an older licence record was left in the Keychain, Phosphene now uses the one you activated last and removes the stale one.
+- **A much smaller download.** The app is about 11 MB instead of 80 MB: the video tools are slimmer, and the Python manager is fetched once during first-run setup.
+- **A short message from us, once.** A signed notice can reach every copy of Phosphene (a macOS notification and a banner with Update now). Only messages signed by us are ever shown.
+- Setup list: songs from 16 GB; training a character (lighter settings) from 24 GB.
+
+## Studio
+
+- **Make your first clip** shows only to people who have never rendered, with three new starter scenes: a fog whale in an empty city, a piano on a frozen lake, the lighthouse keeper and the moon.
+- **Remote Control in the left bar:** Free users see a quiet outlined "Pro" beside the name, with the tooltip "Remote Control is part of Pro". Pro users see nothing.
+- Links to phosphene.video from the Studio carry anonymous tags that show which page or button brought a visit.
+- Pinokio: the same signed messages appear as a banner in the Studio.
diff --git a/mlx_ltx_panel.py b/mlx_ltx_panel.py
index 0e7c523..1960502 100644
--- a/mlx_ltx_panel.py
+++ b/mlx_ltx_panel.py
@@ -90,7 +90,9 @@ import model_licences
# Pinokio or the Phosphene Mac app (PHOSPHENE_DISTRIBUTION / _EDITION). Every
# user-facing sentence that names Pinokio picks its Mac-app variant through
# distribution.say(); unset (Pinokio) keeps every sentence as it was.
+import app_notice
import distribution as _dist
+import site_links as _site_links # UTM tags on links to phosphene.video
import agent_discovery
# Remote Control (Pro): the Mac side of the iPhone app lives in the PRIVATE Pro tree and ships
# inside the Pro pack as pro_remote.py. This studio only offers the left-menu page and the
@@ -2055,6 +2057,19 @@ def _sync_hf_token_to_env() -> None:
os.environ["HUGGING_FACE_HUB_TOKEN"] = tok
+def _has_rendered_before() -> bool:
+ """True when the outputs folder already holds a clip. The "Make your first clip" card is for
+ people who have never rendered; the analytics flag alone is unset with analytics off, so an
+ install with hundreds of videos was greeted as new (5.0.4)."""
+ try:
+ for p in OUTPUT.iterdir():
+ if p.suffix.lower() in (".mp4", ".mov", ".webm") and p.is_file():
+ return True
+ except OSError:
+ pass
+ return False
+
+
def get_settings_public() -> dict:
"""Settings shape safe to expose via GET /settings. Tokens are never
returned — only booleans indicating whether each is configured. This
@@ -49952,6 +49967,8 @@ def page(theme: str = "") -> str:
# The page picks its Mac-app wording and defers updates to the app
# from these; Pinokio reads {"distribution": "pinokio", "edition": ""}.
"distribution": _dist.distribution(), "edition": _dist.edition(),
+ # {source: app, medium: mac-app | pinokio} for siteLink() in boot.js.
+ "site_utm": _site_links.utm_base(),
"presets": PRESETS, "aspects": aspect_presets_for_this_mac(),
"default_image": str(REFERENCE),
"default_audio": str(AUDIO_DEFAULT),
@@ -50040,7 +50057,7 @@ def page(theme: str = "") -> str:
# analytics_first_render_reported already tracks (set once, on the
# first render_completed), so the first-run card reuses that flag
# rather than adding a second one that could drift from it.
- "first_run": not bool(get_settings().get("analytics_first_render_reported")),
+ "first_run": not (bool(get_settings().get("analytics_first_render_reported")) or _has_rendered_before()),
})
# Profile badge — only visible in the dev panel. Lets Mr Bizarro tell at a
# glance which install he's looking at when both panels are open.
@@ -50237,6 +50254,7 @@ if __name__ == "__main__":
threading.Thread(target=worker_loop, daemon=True).start()
if VERSION_CHECK_ENABLED and not _dist.is_mac_app():
threading.Thread(target=version_check_loop, daemon=True).start()
+ threading.Thread(target=app_notice.loop, args=(running_version,), daemon=True).start()
else:
# The Mac app updates the studio itself: no GitHub poll, ever.
_detect_local_install_state()
diff --git a/panel/routes_meta.py b/panel/routes_meta.py
index 47cedae..d209fa2 100644
--- a/panel/routes_meta.py
+++ b/panel/routes_meta.py
@@ -271,6 +271,13 @@ def get_version(h, parsed) -> None:
h._json(P.get_version_state())
+@get("/notice")
+def get_notice(h, parsed) -> None:
+ # The one signed "notify everyone" notice for this studio (app_notice.py); {"notice": null} when
+ # none. Under the Mac app the app itself shows notices natively, so the page ignores this there.
+ h._json({"notice": None if P._dist.is_mac_app() else P.app_notice.current()})
+
+
@get("/models")
def get_models(h, parsed) -> None:
# Per-repo status snapshot for the Models modal in the UI.
diff --git a/pinokio.json b/pinokio.json
index 845739e..9f563b4 100644
--- a/pinokio.json
+++ b/pinokio.json
@@ -8,7 +8,7 @@
"links": [
{
"title": "Website",
- "value": "https://phosphene.video"
+ "value": "https://phosphene.video/?utm_source=app&utm_medium=pinokio&utm_campaign=website&utm_content=pinokio-menu"
},
{
"title": "X / Twitter",
diff --git a/site_links.py b/site_links.py
new file mode 100644
index 0000000..46b11ab
--- /dev/null
+++ b/site_links.py
@@ -0,0 +1,115 @@
+"""The ONE place a link from Phosphene to phosphene.video gets its UTM tags.
+
+Why: every visit, download and sale on the website should say where it came
+from, without knowing who the person is. A link from the Studio carries
+
+ utm_source=app
+ utm_medium=mac-app | pinokio (from distribution.py: where this runs)
+ utm_campaign=<purpose> (one of CAMPAIGNS)
+ utm_content=<placement> (optional: settings, banner, pro-modal ...)
+
+and NOTHING else: no install id, no email, no version, no licence. The tags say
+which button was pressed in which kind of install, never by whom.
+
+Code that builds a link calls site_link() here. The browser page has the same
+function (siteLink in webapp/js/boot.js), fed from BOOT.site_utm, which comes
+from utm_base() below; test_site_links.py checks the two campaign lists match.
+
+GitHub (README, release notes) uses a different source and medium
+(utm_source=github, utm_medium=readme|release); github_link() builds those for
+the tests and for anyone writing a template. Machine-to-machine URLs (licence
+API, update feed, relay, reports, bench schema id) are NEVER tagged: they are
+not links a person follows.
+"""
+from __future__ import annotations
+
+import re
+from urllib.parse import parse_qsl, urlencode, urlsplit, urlunsplit
+
+import distribution
+
+SITE = "https://phosphene.video"
+SITE_HOST = "phosphene.video"
+
+SOURCE_APP = "app"
+SOURCE_GITHUB = "github"
+MEDIUM_MAC_APP = distribution.MAC_APP # "mac-app"
+MEDIUM_PINOKIO = distribution.PINOKIO # "pinokio"
+MEDIUM_README = "readme"
+MEDIUM_RELEASE = "release"
+
+#: The purposes the owner listed, then the few short specific ones the Studio
+#: needs. Lower-case words and hyphens only. A new link either fits one of
+#: these or adds a new short name HERE and in webapp/js/boot.js (the test
+#: fails until both lists agree).
+CAMPAIGNS = (
+ # the agreed list
+ "get-pro", "upgrade", "pricing", "docs", "download", "support",
+ "whats-new", "remote", "changelog", "star",
+ # specific short names
+ "home", "website", "benchmarks", "acceptable-use", "privacy",
+ # GitHub only (readme / release templates)
+ "install", "release-body",
+)
+
+_NAME_RE = re.compile(r"^[a-z0-9]+(?:-[a-z0-9]+)*$")
+UTM_KEYS = ("utm_source", "utm_medium", "utm_campaign", "utm_content")
+
+
+def medium(env=None) -> str:
+ """'mac-app' inside the Mac app, 'pinokio' everywhere else."""
+ return MEDIUM_MAC_APP if distribution.is_mac_app(env) else MEDIUM_PINOKIO
+
+
+def utm_base(env=None) -> dict:
+ """What the page needs to tag its own links (served as BOOT.site_utm)."""
+ return {"source": SOURCE_APP, "medium": medium(env)}
+
+
+def _check(name: str, what: str) -> str:
+ if not isinstance(name, str) or not _NAME_RE.match(name):
+ raise ValueError(f"{what} must be lower-case words joined by hyphens: {name!r}")
+ return name
+
+
+def tag_url(url: str, source: str, medium_: str, campaign: str, content: str | None = None) -> str:
+ """Add the four UTM tags to `url`, MERGING with any query it already has:
+ an existing utm_* tag is replaced (never doubled), every other parameter
+ and the #fragment are kept. Only phosphene.video links may be tagged."""
+ _check(source, "utm_source")
+ _check(medium_, "utm_medium")
+ _check(campaign, "utm_campaign")
+ if campaign not in CAMPAIGNS:
+ raise ValueError(f"unknown utm_campaign {campaign!r}; add it to site_links.CAMPAIGNS")
+ if content is not None:
+ _check(content, "utm_content")
+ parts = urlsplit(url)
+ host = (parts.hostname or "").lower()
+ if parts.scheme != "https" or host not in (SITE_HOST, "www." + SITE_HOST):
+ raise ValueError(f"only https://{SITE_HOST} links are tagged: {url!r}")
+ keep = [(k, v) for k, v in parse_qsl(parts.query, keep_blank_values=True) if k not in UTM_KEYS]
+ tags = [("utm_source", source), ("utm_medium", medium_), ("utm_campaign", campaign)]
+ if content:
+ tags.append(("utm_content", content))
+ query = urlencode(keep + tags)
+ return urlunsplit((parts.scheme, parts.netloc, parts.path or "/", query, parts.fragment))
+
+
+def site_link(path: str, campaign: str, content: str | None = None, env=None) -> str:
+ """A tagged link from the Studio to the website.
+ site_link("/pricing/", "get-pro", "pro-modal") ->
+ https://phosphene.video/pricing/?utm_source=app&utm_medium=pinokio&utm_campaign=get-pro&utm_content=pro-modal
+ `path` may carry its own query and #fragment; both are kept."""
+ if not path.startswith("/"):
+ raise ValueError(f"path must start with '/': {path!r}")
+ return tag_url(SITE + path, SOURCE_APP, medium(env), campaign, content)
+
+
+def github_link(path: str, medium_: str, campaign: str, content: str | None = None) -> str:
+ """A tagged link from the README (medium 'readme') or a GitHub release
+ body (medium 'release') to the website."""
+ if medium_ not in (MEDIUM_README, MEDIUM_RELEASE):
+ raise ValueError(f"GitHub links use utm_medium readme or release, not {medium_!r}")
+ if not path.startswith("/"):
+ raise ValueError(f"path must start with '/': {path!r}")
+ return tag_url(SITE + path, SOURCE_GITHUB, medium_, campaign, content)
diff --git a/webapp/index.html b/webapp/index.html
index e87ec2c..a5cf24b 100644
--- a/webapp/index.html
+++ b/webapp/index.html
@@ -354,7 +354,7 @@
<button data-workflow="train" role="tab" aria-selected="false"><svg class="ph wf-icon" aria-hidden="true"><use href="#ph-user-plus"/></svg>Train Character</button>
<!-- Remote Control: drive this Mac from the iPhone app. The page is Studio UI; the
working parts are Pro-only and come from the Pro pack (see panel/routes_remote.py). -->
- <button data-workflow="remote" role="tab" aria-selected="false"><svg class="ph wf-icon" aria-hidden="true"><use href="#ph-remote"/></svg>Remote Control<span class="new-badge">NEW</span><span class="rail-pro" title="Remote Control is part of Phosphene Pro">Pro</span></button>
+ <button data-workflow="remote" role="tab" aria-selected="false"><svg class="ph wf-icon" aria-hidden="true"><use href="#ph-remote"/></svg>Remote Control<span class="new-badge">NEW</span><span class="rail-pro" title="Remote Control is part of Pro">Pro</span></button>
</nav>
<div class="rail-foot">
<!-- DOCS. The manual gets a door of its own beside the gear, with a WORD on
@@ -406,9 +406,9 @@
</ul>
<p class="rm-pro-note">Pro supports the open-source project.</p>
<div class="rm-pro-actions">
- <a class="rm-btn primary" href="https://phosphene.video/pricing/" target="_blank" rel="noopener">See Phosphene Pro</a>
+ <a class="rm-btn primary" href="https://phosphene.video/pricing/" data-utm-campaign="get-pro" data-utm-content="remote-panel" target="_blank" rel="noopener">See Phosphene Pro</a>
<a class="rm-btn" href="https://apps.apple.com/app/id6827562294" target="_blank" rel="noopener">Get the iPhone app</a>
- <a class="rm-btn" href="https://phosphene.video/remote/" target="_blank" rel="noopener">How Remote Control works</a>
+ <a class="rm-btn" href="https://phosphene.video/remote/" data-utm-campaign="remote" data-utm-content="remote-panel" target="_blank" rel="noopener">How Remote Control works</a>
</div>
</div>
<div class="rm-pro-phone" aria-hidden="true">
@@ -666,9 +666,9 @@
<div class="ttl">Make your first clip</div>
<div class="sub">One click renders a starter clip at Balanced, the size this Mac handles best<span id="firstRunEta"></span>.</div>
<div class="first-run-prompts" id="firstRunPrompts">
- <button type="button" class="first-run-prompt-btn" onclick="useFirstRunPrompt(this)" data-first-run-prompt="A lit candle on a windowsill at night, flame flickering gently · soft crackle, quiet room tone">A candle flickering at night</button>
- <button type="button" class="first-run-prompt-btn" onclick="useFirstRunPrompt(this)" data-first-run-prompt="Rain falling on a café window, blurred city lights beyond the glass · steady rain, distant traffic hum">Rain on a café window</button>
- <button type="button" class="first-run-prompt-btn" onclick="useFirstRunPrompt(this)" data-first-run-prompt="A cat stretching on a sunlit wooden floor, dust motes drifting in the light · quiet purring, a floorboard creak">A cat stretching in sunlight</button>
+ <button type="button" class="first-run-prompt-btn" onclick="useFirstRunPrompt(this)" data-first-run-prompt="A whale made of morning fog drifts slowly through an empty city street at dawn, brushing past streetlights that flicker as it passes. Camera follows at walking height. Sound: a deep distant whale song, soft wind, a streetlight buzzing.">A fog whale in an empty city</button>
+ <button type="button" class="first-run-prompt-btn" onclick="useFirstRunPrompt(this)" data-first-run-prompt="A grand piano sits alone on a frozen lake under a pink sky. Its keys press themselves and tiny snow avalanches fall from the lid with each note. Slow push-in. Sound: a slow, simple piano melody, ice creaking.">A piano on a frozen lake</button>
+ <button type="button" class="first-run-prompt-btn" onclick="useFirstRunPrompt(this)" data-first-run-prompt="An old lighthouse keeper opens his door and the ocean outside is perfectly still, like glass, reflecting a giant moon close to the horizon. He steps onto the water. Sound: his boots tapping on the surface, a low hum.">The lighthouse keeper and the moon</button>
</div>
<a href="#" class="first-run-sample-link" onclick="downloadSampleCharacter(); return false;">Or get the sample character (Bizarro) →</a>
</div>
@@ -3718,7 +3718,7 @@ The same wizard walks out of frame. Audio: footsteps on leaves."></textarea>
<b>Auto</b> — once the plan lands, every shot renders on its own, the cut is made (on the beat when there is a track) and the film is assembled. You can still stop it or re-cut afterwards.<br>
<b>Start each shot from a still</b> — an image of the first frame is made first (seconds), from the character's sheet when the shot has one, and the clip starts from it. The composition is decided on the image, not discovered after minutes of video. A still that fails is written on the card and the shot renders without one. LTX shots only.<br>
<b>Long shots</b> — a shot over 5 seconds is normally shortened to fit one pass. With this on, it renders as a chain of 5-second passes, each continuing the last. Slower, and it needs the Q8 pack. LTX shots only.<br>
- The planner writes the beats by the rules in <a href="https://phosphene.video/docs/prompting/" target="_blank" rel="noopener" onclick="openExternal(this.href); return false;">Writing for Phosphene</a>; the same page can be copied into your own assistant if you write by hand.
+ The planner writes the beats by the rules in <a href="https://phosphene.video/docs/prompting/" data-utm-campaign="docs" data-utm-content="one-shot-planner" target="_blank" rel="noopener" onclick="openExternal(this.href); return false;">Writing for Phosphene</a>; the same page can be copied into your own assistant if you write by hand.
</div>
<div class="form-action-footer">
<div class="sb-ramline" id="sbRamLine">
@@ -3809,7 +3809,7 @@ The same wizard walks out of frame. Audio: footsteps on leaves."></textarea>
beat that wraps or a box that scrolls can never put a stamp
beside the wrong line (the reviewer's first finding). -->
<div class="os-beat-rows" id="osBeats" role="group" aria-label="Beats, one per five seconds"></div>
- <div class="hint os-beats-note">A blank row holds that moment. Enter moves to the next row; paste a whole list and it fills the rows. <a href="https://phosphene.video/docs/prompting/" target="_blank" rel="noopener" onclick="openExternal(this.href); return false;">How to write the beats</a>.</div>
+ <div class="hint os-beats-note">A blank row holds that moment. Enter moves to the next row; paste a whole list and it fills the rows. <a href="https://phosphene.video/docs/prompting/" data-utm-campaign="docs" data-utm-content="one-shot-beats" target="_blank" rel="noopener" onclick="openExternal(this.href); return false;">How to write the beats</a>.</div>
</div>
<div class="os-block">
<div class="qs-label h3-axis-label"><span class="qs-name">Camera</span><span class="qs-meta">optional · one move for the whole shot, its direction and speed — every part continues it</span></div>
@@ -3911,7 +3911,7 @@ The same wizard walks out of frame. Audio: footsteps on leaves."></textarea>
<label class="speech-consent" id="speechConsentRow" hidden>
<input type="checkbox" id="speechConsent" onchange="speechFormChanged()">
<span>This is my voice, or I have the speaker's permission to use it.
- <a href="https://phosphene.video/acceptable-use/" target="_blank" rel="noopener">No impersonation.</a></span>
+ <a href="https://phosphene.video/acceptable-use/" data-utm-campaign="acceptable-use" data-utm-content="speech-consent" target="_blank" rel="noopener">No impersonation.</a></span>
</label>
<div class="hint" id="speechCloneHint" hidden>The voice follows the clip's mood and your punctuation. Try ! ? or … to shape the delivery.</div>
<div class="range-strip">
@@ -6900,7 +6900,7 @@ The last line"></textarea>
</div>
<p class="pro-licence-note">One Mac per licence. Phosphene checks it once a day while you are online and keeps working for two weeks without internet.</p>
</section>
- <div class="pro-bottom"><a class="pro-waitlist" href="https://phosphene.video/pricing/" target="_blank" rel="noopener">Get Pro <span aria-hidden="true">↗</span></a><p>Hardship licences are available on request.<br><a href="mailto:[email protected]">Get in touch</a>.</p></div>
+ <div class="pro-bottom"><a class="pro-waitlist" href="https://phosphene.video/pricing/" data-utm-campaign="get-pro" data-utm-content="pro-modal" target="_blank" rel="noopener">Get Pro <span aria-hidden="true">↗</span></a><p>Hardship licences are available on request.<br><a href="mailto:[email protected]">Get in touch</a>.</p></div>
</div>
</div>
@@ -6950,7 +6950,7 @@ The last line"></textarea>
<div class="star-card-actions">
<button type="button" id="starCardStar" class="star-card-primary" onclick="starCardStar()"><svg viewBox="0 0 16 16" width="15" height="15" aria-hidden="true"><path d="M8 1.2l2.1 4.3 4.7.7-3.4 3.3.8 4.7L8 12l-4.2 2.2.8-4.7L1.2 6.2l4.7-.7z" fill="currentColor"/></svg><span class="star-card-label">Star on GitHub</span><span class="star-card-count" id="starCardCount" hidden></span></button>
</div>
- <a class="star-card-quiet" href="https://phosphene.video/pricing/" onclick="starCardAnswer('waitlist'); return false;">Or join the Pro waitlist <span aria-hidden="true">↗</span></a>
+ <a class="star-card-quiet" href="https://phosphene.video/pricing/" data-utm-campaign="get-pro" data-utm-content="star-card" onclick="starCardAnswer('waitlist'); return false;">Or join the Pro waitlist <span aria-hidden="true">↗</span></a>
<canvas class="star-card-burst" id="starCardBurst" aria-hidden="true"></canvas>
</aside>
<!-- STAR_CARD_END -->
diff --git a/webapp/js/boot.js b/webapp/js/boot.js
index 0ebbf64..1254f09 100644
--- a/webapp/js/boot.js
+++ b/webapp/js/boot.js
@@ -22,6 +22,53 @@ 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; }
+// LINKS TO THE WEBSITE carry anonymous UTM tags (site_links.py is the Python
+// twin; test_site_links.py keeps the two campaign lists identical). The ONLY
+// place a phosphene.video link gets its tags: siteLink(path, campaign, content).
+// BOOT.site_utm = {source: 'app', medium: 'mac-app' | 'pinokio'} comes from the
+// server. Nothing else goes into the link: no install id, no version, no email.
+const SITE_ORIGIN = 'https://phosphene.video';
+const SITE_CAMPAIGNS = [
+ 'get-pro', 'upgrade', 'pricing', 'docs', 'download', 'support',
+ 'whats-new', 'remote', 'changelog', 'star',
+ 'home', 'website', 'benchmarks', 'acceptable-use', 'privacy',
+ 'install', 'release-body',
+];
+const SITE_NAME_RE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
+// Merge into any query already on the url: an old utm_* is replaced, never
+// doubled; other parameters and the #fragment stay.
+function siteLink(path, campaign, content) {
+ if (!SITE_CAMPAIGNS.includes(campaign)) throw new Error('unknown utm_campaign ' + campaign);
+ if (content != null && !SITE_NAME_RE.test(content)) throw new Error('bad utm_content ' + content);
+ const base = (typeof BOOT !== 'undefined' && BOOT.site_utm) || {source: 'app', medium: 'pinokio'};
+ const u = new URL(String(path).startsWith('http') ? path : SITE_ORIGIN + path);
+ if (u.protocol !== 'https:' || (u.hostname !== 'phosphene.video' && u.hostname !== 'www.phosphene.video')) {
+ throw new Error('only phosphene.video links are tagged');
+ }
+ ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content'].forEach(k => u.searchParams.delete(k));
+ u.searchParams.set('utm_source', base.source);
+ u.searchParams.set('utm_medium', base.medium);
+ u.searchParams.set('utm_campaign', campaign);
+ if (content) u.searchParams.set('utm_content', content);
+ return u.toString();
+}
+// Anchors in the markup say WHAT they are, never how they are tagged:
+// <a href="https://phosphene.video/pricing/" data-utm-campaign="get-pro" data-utm-content="pro-modal">
+// The plain href is the fallback; this gives it its tags on load and again on
+// the click (before any onclick="openExternal(this.href)" reads it).
+function siteLinkApply(a) {
+ const campaign = a.dataset.utmCampaign;
+ if (!campaign) return;
+ try { a.href = siteLink(a.getAttribute('href'), campaign, a.dataset.utmContent || null); } catch (_) {}
+}
+(function wireSiteLinks() {
+ const go = () => document.querySelectorAll('a[data-utm-campaign]').forEach(siteLinkApply);
+ if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', go); else go();
+ document.addEventListener('click', (e) => {
+ const a = e.target && e.target.closest ? e.target.closest('a[data-utm-campaign]') : null;
+ if (a) siteLinkApply(a);
+ }, true);
+})();
// 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() {
@@ -1020,5 +1067,5 @@ Object.assign(globalThis, {
outputsLoadAll, outputsCacheMutated, _updateMainFilterChips, _maybeAutoLoadAllForEmptyFilter, setMainOutputsFilter,
updateModelCredit, toggleAvoidRow, syncAvoidRowFromValue, ingredientsServed,
_paintControlGenNote, defaultRemixMode, setMode, _portalLoraPicker,
- isMacApp, distText, phEdition,
+ isMacApp, distText, phEdition, siteLink,
});
diff --git a/webapp/js/docs.js b/webapp/js/docs.js
index 7c21881..085ed22 100644
--- a/webapp/js/docs.js
+++ b/webapp/js/docs.js
@@ -439,7 +439,8 @@ function docsSiteUrl(section, anchor) {
}
function openDocs(section, anchor) {
- const url = docsSiteUrl(section, anchor);
+ const u = docsSiteUrl(section, anchor);
+ const url = typeof siteLink === 'function' ? siteLink(u, 'docs', 'docs-button') : u;
if (typeof openExternal === 'function') openExternal(url);
else { try { window.open(url, '_blank', 'noopener'); } catch (e) {} }
return false;
diff --git a/webapp/js/health.js b/webapp/js/health.js
index c11da67..a73a7fa 100644
--- a/webapp/js/health.js
+++ b/webapp/js/health.js
@@ -727,17 +727,20 @@ async function panelRestart() {
return false;
}
-// The pill's click inside the Mac app: never a git pull. Name the build (for a
-// bug report) and point at the app's own updater.
+// The pill's click inside the Mac app: never a git pull. It starts the app's real updater (the
+// native bridge, "checkUpdate" -> Updater.checkForUpdates) and still copies the build name for a bug report.
+function _macCheckForUpdates() {
+ try { window.webkit.messageHandlers.phosphene.postMessage({ type: 'checkUpdate' }); return true; }
+ catch (e) { return false; }
+}
async function _appVersionPillClick() {
const s = _versionState || {};
- const debug = `Phosphene ${s.local_version || '?'} · mac-app`
- + (phEdition() ? ` · ${phEdition()}` : '')
- + ` · ${s.local_short || 'sha?'}`;
- let copied = false;
- try { await navigator.clipboard.writeText(debug); copied = true; } catch (e) {}
- phosToast((copied ? `Copied "${debug}". ` : `${debug}. `)
- + 'To update, use Phosphene \u2192 Check for Updates\u2026', 'info');
+ const debug = `Phosphene ${s.local_version || '?'} \u00b7 mac-app`
+ + (phEdition() ? ` \u00b7 ${phEdition()}` : '')
+ + ` \u00b7 ${s.local_short || 'sha?'}`;
+ try { await navigator.clipboard.writeText(debug); } catch (e) {}
+ if (_macCheckForUpdates()) phosToast('Checking for updates\u2026', 'info');
+ else phosToast(`${debug}. To update, use Phosphene \u2192 Check for Updates\u2026`, 'info');
}
async function versionPillClick() {
@@ -847,7 +850,8 @@ async function versionDoRefresh() {
async function versionDoPull(opts) {
opts = opts || {};
if (isMacApp()) { // the server refuses it too (409 app_updates)
- phosToast('To update Phosphene, use Phosphene \u2192 Check for Updates\u2026', 'info');
+ if (_macCheckForUpdates()) phosToast('Checking for updates\u2026', 'info');
+ else phosToast('To update Phosphene, use Phosphene \u2192 Check for Updates\u2026', 'info');
return;
}
const s = _versionState || {};
@@ -1230,7 +1234,7 @@ function starCardAnswer(action) {
if (typeof openExternal === 'function') openExternal(STAR_CARD_URL);
else window.open(STAR_CARD_URL, '_blank', 'noopener');
} else if (action === 'waitlist') {
- const url = 'https://phosphene.video/pricing/';
+ const url = siteLink('/pricing/', 'get-pro', 'star-card');
if (typeof openExternal === 'function') openExternal(url);
else window.open(url, '_blank', 'noopener');
} else {
@@ -1331,3 +1335,41 @@ document.addEventListener('keydown', (e) => {
if (el && el.contains(document.activeElement)) starCardAnswer('not_now');
});
Object.assign(globalThis, { starCardPoll, starCardAnswer, starCardStar });
+
+
+// ---- "Notify everyone": one signed notice from the maintainer (Pinokio only; the Mac app shows its own) ----
+// The server (app_notice.py) only serves a notice whose Ed25519 signature checks, inside its version window.
+// Each notice id shows once; Dismiss (or the action) remembers it in this browser.
+async function noticeRefresh() {
+ if (isMacApp()) return;
+ let n = null;
+ try { const r = await fetch('/notice', { cache: 'no-store' }); n = (await r.json()).notice; } catch (e) { return; }
+ const old = document.getElementById('phosNotice');
+ if (!n || !n.id) { if (old) old.remove(); return; }
+ let seen = [];
+ try { seen = JSON.parse(localStorage.getItem('phos_notice_seen') || '[]'); } catch (e) {}
+ if (seen.indexOf(n.id) >= 0 || old) return;
+ const remember = () => { try { seen.push(n.id); localStorage.setItem('phos_notice_seen', JSON.stringify(seen.slice(-50))); } catch (e) {} };
+ const bar = document.createElement('div');
+ bar.id = 'phosNotice'; bar.setAttribute('role', 'status');
+ bar.style.cssText = 'position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:9999;max-width:640px;display:flex;gap:12px;align-items:center;'
+ + 'padding:10px 14px;border-radius:10px;background:#1b1f2e;color:#e8ebf5;border:1px solid #394060;box-shadow:0 8px 28px rgba(0,0,0,.45);font:13px/1.4 system-ui,sans-serif';
+ const t = document.createElement('span'); t.textContent = n.text; t.style.flex = '1';
+ bar.appendChild(t);
+ if (n.action === 'update' || (n.action === 'link' && n.link)) {
+ const b = document.createElement('button');
+ b.textContent = n.action === 'update' ? 'Update now' : 'Read more';
+ b.style.cssText = 'padding:5px 10px;border-radius:7px;border:0;background:#8b5cf6;color:#fff;cursor:pointer';
+ b.onclick = () => { remember(); bar.remove();
+ if (n.action === 'link') window.open(n.link, '_blank', 'noopener'); else versionPillClick(); };
+ bar.appendChild(b);
+ }
+ const x = document.createElement('button');
+ x.textContent = '\u2715'; x.title = 'Dismiss'; x.setAttribute('aria-label', 'Dismiss');
+ x.style.cssText = 'border:0;background:transparent;color:#9aa3b8;cursor:pointer;font-size:14px';
+ x.onclick = () => { remember(); bar.remove(); };
+ bar.appendChild(x);
+ document.body.appendChild(bar);
+}
+setTimeout(noticeRefresh, 12000);
+setInterval(noticeRefresh, 600000);
diff --git a/webapp/style/panel.css b/webapp/style/panel.css
index e18ac82..2daf36e 100644
--- a/webapp/style/panel.css
+++ b/webapp/style/panel.css
@@ -15219,10 +15219,12 @@ html[data-pro]:not([data-pro=""]) #proModal .pro-bottom { display: none; }
Pro member never sees it flash), and takes the place of the NEW dot. */
.workflow-tabs .rail-pro { display: none; }
html[data-pro=""] .tool-rail .workflow-tabs .rail-pro {
- display: inline-flex; align-items: center; position: absolute; top: 3px; right: 2px;
- padding: 0 3px; font: 700 13px/15px var(--ph-font-mono, ui-monospace, monospace); letter-spacing: .06em;
- color: #b69cff; background: rgba(139, 92, 246, .16); border: 1px solid rgba(139, 92, 246, .5);
- border-radius: 4px; pointer-events: none;
+ /* 5.0.4 (owner, 7 Nov): quiet outlined hint beside the label, never over the icon and never the
+ filled purple Pro tag that sits beside the logo. A Pro member sees nothing here. */
+ display: inline-flex; align-items: center; position: static; margin-left: 6px;
+ padding: 0 4px; font: 600 11px/14px var(--ph-font-mono, ui-monospace, monospace); letter-spacing: .05em;
+ color: #9aa3b8; background: transparent; border: 1px solid rgba(154, 163, 184, .45);
+ border-radius: 4px; pointer-events: auto; cursor: default;
}
html[data-pro=""] .tool-rail .workflow-tabs button[data-workflow="remote"] .new-badge { display: none; }
.rm-pro-wait .rm-wait-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }