Free, open-source AI video generator for Mac. Run LTX-2.5 and MiniMax H3 (Hailuo) locally on Apple Silicon: text-to-video and image-to-video with sound, lip-sync, character LoRA training, songs from lyrics (YuE2) and image editing (Qwen-Image-Edit). One-click install via Pinokio. Offline: no cloud, no API key, no NVIDIA GPU.
Python ai-filmmakingai-videoai-video-generatorapple-siliconhailuoimage-to-videolip-synclocal-ailora-trainingltx-2ltx-2-5ltx-videomacosminimax-h3mlxmusic-generationoffline-aipinokiotext-to-videovideo-generation
release(v4.10.4): the LoRA browser searches Hugging Face like CivitAI — a name, an author or a repo; no source named
mrbizarro17de6edb85f0
diff --git a/README.md b/README.mdindex d968a71..cf37089 100644--- a/README.md+++ b/README.md@@ -19,7 +19,7 @@</p>-> **Current release: v4.10.3.** The LoRA browser has a second source: **Playtime-AI on Hugging Face**, the org that carries the Hailuo H3 character LoRAs CivitAI no longer does — each card plays the author's own example clip, Install works as before, no API key. Includes 4.10.2 (Macs with 24 GB or less stream the video model from disk) and 4.10.1 (continuity for one-takes). Full notes on the [releases page](https://github.com/mrbizarro/Phosphene/releases).+> **Current release: v4.10.4.** The LoRA browser searches **Hugging Face** too, the way it searches CivitAI: a name, an author (`author:someone`) or an `owner/repo`, for Hailuo H3 or LTX; each card plays the repo's own example when it has one, and Install works as before. No API key. Includes 4.10.2 (Macs with 24 GB or less stream the video model from disk) and 4.10.1 (continuity for one-takes). Full notes on the [releases page](https://github.com/mrbizarro/Phosphene/releases).## Overviewdiff --git a/VERSION b/VERSIONindex 8540cb1..4513d23 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-4.10.3+4.10.4diff --git a/docs/API.md b/docs/API.mdindex f8d47e9..96d1a91 100644--- a/docs/API.md+++ b/docs/API.md@@ -251,11 +251,11 @@ Callers should surface `weak` **before** a render is spent finding out, and shou### `GET /hf/loras`-A Hugging Face org's LoRAs as a browsable source beside CivitAI. `?source=playtime&lane=h3|ltx&q=<name filter>&refresh=1`.-The org's repos are listed through the public HF API, kept by lane from the repo name (`Minimax_H3-…` → h3, `LTX-2.3-…` → ltx),-and each repo's largest `.safetensors` plus its example clip become one item in the same shape the CivitAI grid renders+Hugging Face as a browsable source beside CivitAI. `?lane=h3|ltx&q=<a name, author:someone, or owner/repo>&refresh=1`.+Phosphene names no org: the query is a search (empty = the lane's default search term), an author listing, or one repo;+results are kept by lane from the repo name and tags, and each repo's largest `.safetensors` plus its example clip become one item in the same shape the CivitAI grid renders(`name`, `creator`, `likes`, `size_kb`, `preview_url` / `preview_type`, `download_url`, `filename`, `base_model`, `hf_url`, `source: "huggingface"`).-Cached ten minutes. Sources: `playtime` (Playtime-AI).+Cached ten minutes per lane and query.### `POST /hf/loras/download`diff --git a/docs/STATE.md b/docs/STATE.mdindex 7a99800..05d6148 100644--- a/docs/STATE.md+++ b/docs/STATE.md@@ -45,10 +45,12 @@> +101), keeping the steadier clip and hiding the other; the planner brief> states the light once and forbids a beat that implies another hour.> **Same day, a second LoRA source.** The LoRA browser has a source row:-> CivitAI, or **Playtime-AI · Hugging Face** — the org that carries the H3-> character LoRAs CivitAI no longer does, one repo each with the weights and-> an example clip. `hf_lora_catalog` lists the org through the public API,-> keeps a lane by repo name, and each card plays the author's own clip;+> CivitAI, or **Hugging Face**, searched the same way — a name, an author+> (`author:someone`) or an `owner/repo`. Phosphene names no org and endorses+> nothing (the owner's call: the H3 character LoRAs live in third-party+> repos now, and listing one by name would read as ours). `hf_lora_catalog`+> searches the public API, keeps a lane by repo name and tags, and each card+> plays the repo's own clip when it has one;> Install goes through `_hf_lora_download` into the lane's directory with> the same sidecar and layout probe as a CivitAI install. 22 H3 characters> at the time of writing. `test_hf_loras` pins lane detection, names, thediff --git a/mlx_ltx_panel.py b/mlx_ltx_panel.pyindex 65391c7..183cd7e 100644--- a/mlx_ltx_panel.py+++ b/mlx_ltx_panel.py@@ -6573,38 +6573,36 @@ def _civitai_search(query: str = "", nsfw: bool = False,# ----------------------------------------------------------------------------# HUGGING FACE LoRA SOURCES — an org's repos as a browsable catalog+# HUGGING FACE — a LoRA browser beside the CivitAI one# ----------------------------------------------------------------------------# CivitAI no longer carries the character LoRAs people want for H3; the-# Playtime-AI org on Hugging Face does, one repo per LoRA with the weights, an-# example clip and a two-line card. This lists an org's repos through the-# public HF API, keeps the ones for a lane by name, and installs one the way-# a CivitAI download does — same directory, same sidecar, same layout probe —-# so the picker cannot tell where it came from.-HF_LORA_SOURCES: dict[str, dict] = {- "playtime": {"author": "Playtime-AI", "label": "Playtime-AI · Hugging Face",- "url": "https://huggingface.co/Playtime-AI"},-}+# Phosphene names no org and endorses nothing: the user searches Hugging Face+# the way they search CivitAI — a name, an author (`author:someone`), or an+# `owner/repo` — and the panel shows the repos that carry a LoRA for the lane,+# with the repo's own example clip when it has one. Installing one lands the+# file where a CivitAI download lands, with the same sidecar and layout probe.HF_LORA_CATALOG_TTL = 600_hf_lora_catalog_cache: dict[str, tuple[float, list]] = {}-_HF_H3_RE = re.compile(r"minima[xc][_ -]?h3", re.I)-_HF_LTX_RE = re.compile(r"ltx[_ -]?2\.?[35]", re.I)+_HF_H3_RE = re.compile(r"minima[xc][_ -]?h3|hailuo[_ -]?h3", re.I)+_HF_LTX_RE = re.compile(r"ltx[_ -]?2\.?[35]|ltx[_ -]?video|ltxv", re.I)+HF_LORA_DEFAULT_QUERY = {"h3": "MiniMax H3 LoRA", "ltx": "LTX-2.3 LoRA"}-def hf_lora_lane_of_repo(repo_id: str) -> str | None:- """Which lane a repo's LoRA is for, from its name: 'h3', 'ltx', or None- (an image LoRA, a showcase repo — not ours to list)."""+def hf_lora_lane_of_repo(repo_id: str, tags=None) -> str | None:+ """Which lane a repo's LoRA is for, from its name (and tags when the+ listing carries them): 'h3', 'ltx', or None (an image LoRA, a showcase —+ not ours to list)."""tail = (repo_id or "").split("/")[-1]- if _HF_H3_RE.search(tail):+ tagtxt = " ".join(str(t) for t in (tags or []))+ if _HF_H3_RE.search(tail) or _HF_H3_RE.search(tagtxt):return "h3"- if _HF_LTX_RE.search(tail):+ if _HF_LTX_RE.search(tail) or _HF_LTX_RE.search(tagtxt):return "ltx"return Nonedef hf_lora_pretty_name(repo_id: str) -> str:tail = (repo_id or "").split("/")[-1]- tail = re.sub(r"^(minima[xc][_ -]?h3|ltx[_ -]?2\.?[35])([_ -]?(dev(_and_sulphur)?|sulphur))?[_ -]*", "", tail, flags=re.I)+ tail = re.sub(r"^(minima[xc][_ -]?h3|hailuo[_ -]?h3|ltx[_ -]?2\.?[35]|ltxv?)([_ -]?(dev(_and_sulphur)?|sulphur|lora))?[_ -]*", "", tail, flags=re.I)return tail.replace("_", " ").replace("-", " — ").strip() or repo_id@@ -6619,18 +6617,38 @@ def _hf_api_get(path: str, timeout: float = 20.0) -> object:return json.loads(resp.read().decode("utf-8", "replace"))-def hf_lora_catalog(source: str = "playtime", lane: str = "h3", force: bool = False) -> list[dict]:- """Every LoRA the org publishes for `lane`, in the shape the CivitAI grid- already renders. Cached ten minutes; the per-repo file listings are- fetched in parallel."""- src = HF_LORA_SOURCES.get(source) or HF_LORA_SOURCES["playtime"]- key = f"{source}:{lane}"+def hf_lora_query_params(lane: str, q: str) -> tuple[str, str | None]:+ """The HF listing call for what the user typed: an `owner/repo` is fetched+ directly, `author:name` (or a huggingface.co/name URL) lists that author,+ anything else is a search; empty means the lane's own default search."""+ q = (q or "").strip()+ m = re.match(r"^(?:https?://huggingface\.co/)?([\w.-]+)/([\w.-]+)/?$", q)+ if m and not q.lower().startswith("author:"):+ return ("repo", f"{m.group(1)}/{m.group(2)}")+ m = re.match(r"^(?:author:|https?://huggingface\.co/)([\w.-]+)/?$", q, re.I)+ if m:+ return ("author", m.group(1))+ return ("search", q or HF_LORA_DEFAULT_QUERY.get(lane, "LoRA"))+++def hf_lora_catalog(lane: str = "h3", q: str = "", force: bool = False) -> list[dict]:+ """Repos on Hugging Face that carry a LoRA for `lane`, in the shape the+ CivitAI grid renders. Cached ten minutes per (lane, query); the per-repo+ file listings are fetched in parallel."""+ kind, value = hf_lora_query_params(lane, q)+ key = f"{lane}:{kind}:{value}"now = time.time()hit = _hf_lora_catalog_cache.get(key)if hit and not force and now - hit[0] < HF_LORA_CATALOG_TTL:return hit[1]- repos = _hf_api_get(f"/api/models?author={urllib.parse.quote(src['author'])}&limit=200&sort=lastModified&direction=-1")- wanted = [m for m in (repos or []) if isinstance(m, dict) and hf_lora_lane_of_repo(m.get("id", "")) == lane]+ if kind == "repo":+ repos = [{"id": value}]+ elif kind == "author":+ repos = _hf_api_get(f"/api/models?author={urllib.parse.quote(value)}&limit=200&sort=likes&direction=-1")+ else:+ repos = _hf_api_get(f"/api/models?search={urllib.parse.quote(value)}&limit=60&sort=likes&direction=-1")+ wanted = [m for m in (repos or []) if isinstance(m, dict) and m.get("id")+ and (kind == "repo" or hf_lora_lane_of_repo(m["id"], m.get("tags")) == lane)]import concurrent.futures as _cfdef one(m):rid = m["id"]@@ -6647,11 +6665,12 @@ def hf_lora_catalog(source: str = "playtime", lane: str = "h3", force: bool = Faif prev is None:prev = next((s for s in sib if str(s.get("rfilename", "")).lower().endswith((".png", ".jpg", ".jpeg", ".webp", ".gif"))), None)base = "https://huggingface.co/" + rid + "/resolve/main/"+ owner = rid.split("/")[0]return {"id": rid, "source": "huggingface", "name": hf_lora_pretty_name(rid),- "creator": src["author"], "likes": int(m.get("likes") or 0),- "downloads": int(m.get("downloads") or 0),- "updated": str(m.get("lastModified") or "")[:10],+ "creator": owner, "likes": int(info.get("likes") or m.get("likes") or 0),+ "downloads": int(info.get("downloads") or m.get("downloads") or 0),+ "updated": str(info.get("lastModified") or m.get("lastModified") or "")[:10],"size_kb": int(int(w.get("size") or 0) / 1024),"filename": w["rfilename"],"download_url": base + urllib.parse.quote(w["rfilename"]),@@ -6666,8 +6685,7 @@ def hf_lora_catalog(source: str = "playtime", lane: str = "h3", force: bool = Fafor it in ex.map(one, wanted):if it:items.append(it)- items.sort(key=lambda x: (-x["likes"], x["updated"]), reverse=False)- items.sort(key=lambda x: x["likes"], reverse=True)+ items.sort(key=lambda x: (x["likes"], x["updated"]), reverse=True)_hf_lora_catalog_cache[key] = (now, items)return itemsdiff --git a/panel/routes_loras.py b/panel/routes_loras.pyindex ca2f006..74fe759 100644--- a/panel/routes_loras.py+++ b/panel/routes_loras.py@@ -509,24 +509,21 @@ def post_loras_rename(h, path, qs, ctype) -> None:@get("/hf/loras")def get_hf_loras(h, parsed) -> None:- """A Hugging Face org's LoRAs for one lane, in the CivitAI grid's shape.- `?source=playtime&lane=h3|ltx&q=<name filter>&refresh=1`."""+ """LoRAs on Hugging Face for one lane, in the CivitAI grid's shape.+ `?lane=h3|ltx&q=<a name, author:someone, or owner/repo>&refresh=1`."""qs = P.parse_qs(parsed.query)- source = (qs.get("source", ["playtime"])[0] or "playtime").strip().lower()lane = (qs.get("lane", ["h3"])[0] or "h3").strip().lower()- q = (qs.get("q", [""])[0] or "").strip().lower()- if source not in P.HF_LORA_SOURCES or lane not in ("h3", "ltx"):- h._json({"ok": False, "error": "unknown source or lane", "items": []}, 400)+ q = (qs.get("q", [""])[0] or "").strip()+ if lane not in ("h3", "ltx"):+ h._json({"ok": False, "error": "unknown lane", "items": []}, 400)returntry:- items = P.hf_lora_catalog(source, lane, force=qs.get("refresh", ["0"])[0] == "1")+ items = P.hf_lora_catalog(lane, q, force=qs.get("refresh", ["0"])[0] == "1")except Exception as exc: # noqa: BLE001h._json({"ok": False, "error": f"Hugging Face could not be reached: {exc}", "items": []}, 502)return- if q:- items = [i for i in items if q in i["name"].lower() or q in i["id"].lower()]- src = P.HF_LORA_SOURCES[source]- h._json({"ok": True, "source": source, "label": src["label"], "url": src["url"],+ kind, value = P.hf_lora_query_params(lane, q)+ h._json({"ok": True, "label": "Hugging Face", "query": {"kind": kind, "value": value},"lane": lane, "items": items, "has_more": False})diff --git a/test_hf_loras.py b/test_hf_loras.pyindex 18a86fa..900effa 100644--- a/test_hf_loras.py+++ b/test_hf_loras.py@@ -19,9 +19,17 @@ def test_pretty_names():assert p.hf_lora_pretty_name("Playtime-AI/Minimax_H3-Megan_Fox") == "Megan Fox"+def test_query_kinds():+ assert p.hf_lora_query_params("h3", "") == ("search", "MiniMax H3 LoRA")+ assert p.hf_lora_query_params("h3", "megan") == ("search", "megan")+ assert p.hf_lora_query_params("h3", "author:Someone") == ("author", "Someone")+ assert p.hf_lora_query_params("h3", "https://huggingface.co/Someone") == ("author", "Someone")+ assert p.hf_lora_query_params("h3", "Someone/Minimax_H3-Thing") == ("repo", "Someone/Minimax_H3-Thing")++def test_catalog_lists_the_lane_with_previews(monkeypatch):def fake_get(path, timeout=20.0):- if path.startswith("/api/models?author="):+ if path.startswith("/api/models?author=") or path.startswith("/api/models?search="):return [{"id": "Playtime-AI/Minimax_H3-Megan_Fox", "likes": 37, "downloads": 0, "lastModified": "2026-08-29T00:00:00"},{"id": "Playtime-AI/LTX-2.3-Ted", "likes": 7},{"id": "Playtime-AI/Krea_2-Emma_Watson", "likes": 6},@@ -34,7 +42,7 @@ def test_catalog_lists_the_lane_with_previews(monkeypatch):return {"siblings": []}monkeypatch.setattr(p, "_hf_api_get", fake_get)p._hf_lora_catalog_cache.clear()- items = p.hf_lora_catalog("playtime", "h3", force=True)+ items = p.hf_lora_catalog("h3", "author:Playtime-AI", force=True)assert [i["name"] for i in items] == ["Megan Fox"] # showcase has no weights; LTX/Krea are other lanesit = items[0]assert it["source"] == "huggingface" and it["lane"] == "h3" and it["base_model"] == "MiniMax H3"diff --git a/webapp/index.html b/webapp/index.htmlindex db15420..0abc0c5 100644--- a/webapp/index.html+++ b/webapp/index.html@@ -4185,12 +4185,12 @@<div class="civitai-family-row" id="civitaiFamilyRow" style="display:none;margin: 4px 0 8px; display:flex; gap:6px; flex-wrap:wrap;"></div>- <!-- WHERE THE LoRAs COME FROM. CivitAI, or an org on Hugging Face that- publishes character LoRAs with example clips (Playtime-AI carries the- H3 characters CivitAI no longer does). Video context only. -->+ <!-- WHERE THE LoRAs COME FROM. CivitAI, or Hugging Face searched the same+ way — a name, an author, or an owner/repo. Phosphene names no org and+ endorses nothing; what shows is what matches. Video context only. --><div class="civitai-family-row" id="civitaiSourceRow" style="display:none; margin: 4px 0 8px; gap:6px; flex-wrap:wrap;"><button type="button" class="pill-btn active" data-civitai-source="civitai" onclick="civitaiSetSource('civitai')">CivitAI</button>- <button type="button" class="pill-btn" data-civitai-source="playtime" onclick="civitaiSetSource('playtime')" title="Character LoRAs with example clips, from the Playtime-AI org on Hugging Face">Playtime-AI · Hugging Face</button>+ <button type="button" class="pill-btn" data-civitai-source="huggingface" onclick="civitaiSetSource('huggingface')" title="Search Hugging Face for LoRAs — a name, an author (author:someone) or an owner/repo">Hugging Face</button></div><div class="civitai-search-bar"><input type="text" id="civitaiQuery" placeholder="Search by name, style, creator…"diff --git a/webapp/js/preview.js b/webapp/js/preview.jsindex 7530747..457bb70 100644--- a/webapp/js/preview.js+++ b/webapp/js/preview.js@@ -1376,17 +1376,17 @@ function closeCivitaiModal() {let _civitaiSource = 'civitai';let _civitaiRerun = false; // a source or family change landed mid-searchfunction civitaiSetSource(src) {- _civitaiSource = (src === 'playtime') ? 'playtime' : 'civitai';+ _civitaiSource = (src === 'huggingface') ? 'huggingface' : 'civitai';document.querySelectorAll('#civitaiSourceRow [data-civitai-source]').forEach(b =>b.classList.toggle('active', b.dataset.civitaiSource === _civitaiSource));const q = document.getElementById('civitaiQuery');- if (q) q.placeholder = _civitaiSource === 'playtime' ? 'Filter by name…' : 'Search by name, style, creator…';+ if (q) q.placeholder = _civitaiSource === 'huggingface' ? 'Search Hugging Face — a name, author:someone, or owner/repo' : 'Search by name, style, creator…';// The heading and the CivitAI key banner belong to CivitAI; Hugging Face// needs neither.const title = document.getElementById('civitaiModalTitle');const banner = document.getElementById('civitaiAuthBanner');- if (_civitaiSource === 'playtime') {- if (title) title.textContent = `Playtime-AI on Hugging Face — ${_civitaiFamily === 'h3' ? 'Hailuo H3' : 'LTX'} character LoRAs`;+ if (_civitaiSource === 'huggingface') {+ if (title) title.textContent = `Browse Hugging Face for ${_civitaiFamily === 'h3' ? 'Hailuo H3' : 'LTX'} LoRAs`;if (banner) banner.style.display = 'none';} else {if (title) title.textContent = `Browse CivitAI for ${_civitaiFamily === 'h3' ? 'Hailuo H3' : 'LTX 2.3'} LoRAs`;@@ -1406,7 +1406,6 @@ function civitaiSourceRowSync() {// paging), filtered by the query on the server.async function _hfLoraSearch(grid, status, loadMore) {const params = new URLSearchParams();- params.set('source', _civitaiSource);params.set('lane', _civitaiFamily === 'h3' ? 'h3' : 'ltx');const q = document.getElementById('civitaiQuery').value.trim();if (q) params.set('q', q);@@ -1421,9 +1420,9 @@ async function _hfLoraSearch(grid, status, loadMore) {renderCivitaiGrid(data.items, false);loadMore.style.display = 'none';if ((data.items || []).length === 0) {- grid.innerHTML = `<div class="hint">Nothing from ${escapeHtml(data.label || 'this source')} for ${_civitaiFamily === 'h3' ? 'Hailuo H3' : 'LTX'}${q ? ` matching "${escapeHtml(q)}"` : ''}.</div>`;+ grid.innerHTML = `<div class="hint">Nothing on Hugging Face for ${_civitaiFamily === 'h3' ? 'Hailuo H3' : 'LTX'}${q ? ` matching "${escapeHtml(q)}"` : ''}. Try a name, <code>author:someone</code>, or <code>owner/repo</code>.</div>`;} else {- status.textContent = `${data.items.length} LoRA${data.items.length === 1 ? '' : 's'} from ${data.label} — each card plays the author's own example.`;+ status.textContent = `${data.items.length} LoRA${data.items.length === 1 ? '' : 's'} on Hugging Face — a card plays the repo's own example when it has one. Read the repo before you install; Phosphene lists what matches, nothing more.`;status.className = 'civitai-status-line';}}