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.

fix(loras/picker): read currentMode lexically, not via window.

mrbizarroa43855e3259a
diff --git a/mlx_ltx_panel.py b/mlx_ltx_panel.py
index 849ef94..8bf455b 100644
--- a/mlx_ltx_panel.py
+++ b/mlx_ltx_panel.py
@@ -18148,7 +18148,18 @@ let _knownUserLoras = []; // last list_user_loras() snapshot, for the picker
// show everything" — the back-compat path when we can't determine
// the active engine.
function _currentLoraModeFilter() {
- const mode = (window.currentMode || document.getElementById('mode')?.value || 't2v');
+ // `currentMode` is a `let` at the top of this <script> block (line ~15016),
+ // sharing the same IIFE scope as setMode() and renderLorasList(). It is
+ // NOT a property of `window` — `let`/`const` at the script's top level
+ // are not auto-attached to globalThis in modern browsers. Reading
+ // `window.currentMode` was always undefined, falling through to the
+ // hidden #mode input which the image branch of setMode deliberately
+ // doesn't update (to avoid an accidental form submit firing a video
+ // render with stale fields). Net effect: the picker filter always
+ // saw 't2v' even after the user clicked Studio. Read currentMode
+ // directly via lexical capture so the mode-aware filter actually
+ // works.
+ const mode = (currentMode || document.getElementById('mode')?.value || 't2v');
if (mode !== 'image') {
// All video modes share the LTX lane.
return 'video';