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.

v4.10.6 — Browse CivitAI search works again

mrbizarroade66e2eefd9
diff --git a/README.md b/README.md
index f18734b..c63c1a8 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
</p>
-> **Current release: v4.10.5.** **LoRAs stack on Hailuo H3**: pick a character LoRA and keep Turbo on, or combine several LoRAs, each with its own strength (the Update brings the engine change with it). LoRAs in the kohya trainer format install and render now instead of being refused. The LoRA browser has one compact toolbar with a **Characters / Styles / Motion / Speed** filter, searches Hugging Face deeper, and no longer asks for a CivitAI key on the Hugging Face source. The panel no longer opens with the last clip already playing. Full notes on the [releases page](https://github.com/mrbizarro/Phosphene/releases).
+> **Current release: v4.10.6.** **Browse CivitAI search works again**: typing a word in the LoRA browser used to come back empty for every engine (CivitAI ignores the engine filter on text searches — the panel now filters the results itself), the search bar looks like a search bar, and the occasional "HTTP 503" from CivitAI is retried instead of ending the search. Full notes on the [releases page](https://github.com/mrbizarro/Phosphene/releases).
## Overview
diff --git a/VERSION b/VERSION
index 40f38aa..38801fb 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.10.5
+4.10.6
diff --git a/docs/STATE.md b/docs/STATE.md
index 676bfdd..f113124 100644
--- a/docs/STATE.md
+++ b/docs/STATE.md
@@ -1,5 +1,19 @@
# Phosphene — project state, history, open work
+> **🩹 2026-09-06 — v4.10.6 ships: Browse CivitAI search.** Any word typed
+> into the LoRA browser returned nothing ("turbo" → 0 while "Minimax H3
+> Turbo Loras" was on page one un-queried): CivitAI's text search ignores
+> `baseModels` and answers an empty page when both are sent. Typed searches
+> now drop the server-side base filter, hint the query with the engine's
+> word ("minimax turbo" ranks all-H3), and filter base models on the
+> results while paging; "All" runs one hinted search per engine and merges
+> ("anime" on Video: 0 → 24). CivitAI's intermittent 502/503/504 is retried
+> ×3 with back-off and the message says what to do. The search bar has a
+> magnifier, a placeholder that names CivitAI, and a Search button.
+> `test_spicy_contract` green; verified live against civitai.com. Promoted
+> by cherry-pick onto origin/main (dev carries the unreleased Upscale ×2
+> headline).
+
> **🚀 2026-09-06 — v4.10.5 ships.** H3 LoRA stacking (engine `codex/h3-engine-v2`
> at 21e8824 = live-preview merged: repeatable `--lora`, the qkv-permute fix),
> kohya conversion, the LoRA browser toolbar + kind filter + deeper search +
diff --git a/mlx_ltx_panel.py b/mlx_ltx_panel.py
index 1631450..82fcd39 100644
--- a/mlx_ltx_panel.py
+++ b/mlx_ltx_panel.py
@@ -6380,15 +6380,42 @@ def _civitai_request(path: str, params: dict | None = None,
api_key = _active_civitai_key()
if api_key:
req.add_header("Authorization", f"Bearer {api_key}")
- try:
- # Use the auth-stripping opener: the base host is hardcoded civitai.com
- # so the initial request is safe, but this guards against a redirect
- # response steering the Bearer token off-domain.
- with _civitai_opener().open(req, timeout=timeout) as resp:
- body = resp.read().decode("utf-8", "replace")
- return json.loads(body)
- except Exception as exc:
- raise RuntimeError(f"{type(exc).__name__}: {exc}") from exc
+ # CivitAI's API throws the occasional 502/503/504 on a perfectly good
+ # request (owner hit "HTTP error 503" mid-search). Three attempts with a
+ # short back-off turn that into a pause instead of a dead search, and
+ # the message a user finally sees says what to do, not a status code.
+ import urllib.error
+ last: Exception | None = None
+ for attempt in range(3):
+ try:
+ with _civitai_opener().open(req, timeout=timeout) as resp:
+ body = resp.read().decode("utf-8", "replace")
+ return json.loads(body)
+ except urllib.error.HTTPError as exc:
+ last = exc
+ if exc.code in (500, 502, 503, 504, 429) and attempt < 2:
+ time.sleep(1.5 * (attempt + 1))
+ continue
+ if exc.code in (500, 502, 503, 504):
+ raise RuntimeError("CivitAI is busy right now (it answered "
+ f"{exc.code}). Try again in a few seconds.") from exc
+ if exc.code == 429:
+ raise RuntimeError("CivitAI is rate-limiting this Mac — wait a minute "
+ "and search again.") from exc
+ if exc.code in (401, 403):
+ raise RuntimeError("CivitAI refused the request (401/403) — check the "
+ "CivitAI API key in Settings.") from exc
+ raise RuntimeError(f"CivitAI answered HTTP {exc.code}.") from exc
+ except (urllib.error.URLError, TimeoutError, OSError) as exc:
+ last = exc
+ if attempt < 2:
+ time.sleep(1.5 * (attempt + 1))
+ continue
+ raise RuntimeError("Could not reach civitai.com — check the connection "
+ "and try again.") from exc
+ except Exception as exc: # noqa: BLE001
+ raise RuntimeError(f"{type(exc).__name__}: {exc}") from exc
+ raise RuntimeError(f"{type(last).__name__}: {last}")
# Sub-families for the image context. Each entry maps a UI family-pill id
@@ -6494,16 +6521,54 @@ def _civitai_search(query: str = "", nsfw: bool = False,
"baseModels": base_models_filter,
"limit": limit,
"sort": "Most Downloaded",
- # nsfw=True lets the API include NSFW results; the user's CivitAI
- # account-level filter (if any) is unaffected. We surface the
- # boolean on each item so the front end can render a warning.
"nsfw": "true" if nsfw else "false",
}
- if query.strip():
- params["query"] = query.strip()
- if cursor:
- params["cursor"] = cursor
- raw = _civitai_request("/models", params=params)
+ q = query.strip()
+ if q:
+ # CivitAI's text search (`query`) is a different backend from the
+ # browse listing and it does NOT honour `baseModels`: the two
+ # together return an empty page for every word ("turbo" → 0 while
+ # "Minimax H3 Turbo Loras" sits on page one of the un-queried list).
+ # So a typed search drops the server-side base filter, nudges the
+ # search with the engine's own word (the backend ranks "minimax
+ # turbo" all-H3), and the base-model filter is applied HERE on the
+ # results, paging until the page is full or the well runs dry.
+ _hint_words = {"h3": "minimax", "ltx": "ltx", "qwen": "qwen",
+ "hidream": "hidream"}
+ # One engine → one hinted search. "All" → one hinted search per
+ # engine in the context, merged (a bare "anime" search fills its
+ # pages with SDXL LoRAs and the base filter leaves nothing).
+ _hints = ([_hint_words.get(fam, "")] if fam
+ else [_hint_words.get(k, "") for k in (_fam_map or {}).keys()] or [""])
+ params.pop("baseModels", None)
+ params["limit"] = 50
+ _want = {bm.lower() for bm in base_models_filter}
+ raw_items: list[dict] = []
+ _seen: set = set()
+ raw = {}
+ for _hint in _hints:
+ _p = dict(params)
+ _p["query"] = (f"{_hint} {q}" if _hint and _hint not in q.lower() else q)
+ if cursor:
+ _p["cursor"] = cursor
+ for _page in range(4):
+ raw = _civitai_request("/models", params=_p)
+ for m in (raw.get("items") or []):
+ _bm = str(((m.get("modelVersions") or [{}])[0]).get("baseModel") or "").lower()
+ if _bm in _want and m.get("id") not in _seen:
+ _seen.add(m.get("id"))
+ raw_items.append(m)
+ _next = (raw.get("metadata") or {}).get("nextCursor")
+ if len(raw_items) >= limit or not _next:
+ break
+ _p["cursor"] = _next
+ if len(raw_items) >= limit:
+ break
+ raw = {**raw, "items": raw_items[:limit]}
+ else:
+ if cursor:
+ params["cursor"] = cursor
+ raw = _civitai_request("/models", params=params)
items = []
for m in (raw.get("items") or []):
versions = m.get("modelVersions") or []
diff --git a/panel/routes_loras.py b/panel/routes_loras.py
index 74fe759..27f3ab0 100644
--- a/panel/routes_loras.py
+++ b/panel/routes_loras.py
@@ -279,7 +279,7 @@ def get_civitai_search(h, parsed) -> None:
results["available_families"] = list(_fams.keys())
h._json(results)
except Exception as exc:
- h._json({"error": f"civitai search failed: {exc}",
+ h._json({"error": f"CivitAI search failed — {exc}",
"items": []}, 502)
diff --git a/webapp/index.html b/webapp/index.html
index abfcb09..560bbe5 100644
--- a/webapp/index.html
+++ b/webapp/index.html
@@ -4204,10 +4204,19 @@
<button type="button" class="pill-btn" data-civitai-kind="other" onclick="civitaiSetKind('other')">Other</button>
<label class="toggle-pill" title="Only repos that ship an example clip or image"><input type="checkbox" id="civitaiWithExample" onchange="civitaiSetKind()"><span class="toggle-dot"></span><span>With example</span></label>
</div>
- <div class="civitai-search-bar">
- <input type="text" id="civitaiQuery" placeholder="Search by name, style, creator…"
+ <!-- A search bar that reads as one: magnifier, a placeholder that says
+ where it searches, and a Search button — the bare input was mistaken
+ for a filter box. -->
+ <div class="civitai-search-bar" role="search">
+ <svg class="civitai-search-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
+ <circle cx="7" cy="7" r="4.5" stroke="currentColor" stroke-width="1.6"/>
+ <path d="M10.5 10.5 L14 14" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/>
+ </svg>
+ <input type="search" id="civitaiQuery" placeholder="Search CivitAI — a name, a style, a creator… then Enter"
+ aria-label="Search CivitAI"
oninput="if(this._t) clearTimeout(this._t); this._t = setTimeout(civitaiSearch, 350)"
onkeydown="if(event.key==='Enter'){ event.preventDefault(); civitaiSearch(); }">
+ <button type="button" class="pill-btn" onclick="civitaiSearch()" title="Search CivitAI">Search</button>
</div>
<div class="civitai-grid" id="civitaiGrid">
<div class="hint">Loading…</div>
diff --git a/webapp/js/preview.js b/webapp/js/preview.js
index fefea12..fc34afc 100644
--- a/webapp/js/preview.js
+++ b/webapp/js/preview.js
@@ -1507,7 +1507,7 @@ async function civitaiSearch() {
if (data.has_more) loadMore.style.display = '';
if ((data.items || []).length === 0) {
const meta = _civitaiContextMeta(_civitaiContext, _civitaiFamily);
- grid.innerHTML = `<div class="hint">${meta.empty} "${escapeHtml(q || '')}"${civitaiNsfwRequested() ? '' : ' (try Show NSFW for more)'}.</div>`;
+ grid.innerHTML = `<div class="hint">${meta.empty} "${escapeHtml(q || '')}"${civitaiNsfwRequested() ? '' : ' (try Show NSFW for more)'}. Try one shorter word — CivitAI matches whole words in the title and tags — or switch the engine pill above.</div>`;
}
} catch (e) {
status.textContent = 'Network error: ' + (e.message || e);
diff --git a/webapp/style/panel.css b/webapp/style/panel.css
index 0a41e17..8da2e06 100644
--- a/webapp/style/panel.css
+++ b/webapp/style/panel.css
@@ -8444,7 +8444,11 @@
.civitai-search-bar {
display: flex; gap: 8px; margin-bottom: 12px; align-items: center;
}
- .civitai-search-bar input[type="text"] { flex: 1; }
+ .civitai-search-bar { position: relative; }
+ .civitai-search-bar input[type="text"],
+ .civitai-search-bar input[type="search"] { flex: 1; padding-left: 32px; min-height: 36px; }
+ .civitai-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
+ color: var(--dim, #7a8194); pointer-events: none; }
.civitai-grid {
display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 12px; margin-top: 10px;