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
feat(install): install_qwen.js + Qwen-Edit-2509 entries in panel + Pinokio menu
mrbizarroc28e64e305cc
diff --git a/install_qwen.js b/install_qwen.jsnew file mode 100644index 0000000..b80c59e--- /dev/null+++ b/install_qwen.js@@ -0,0 +1,80 @@+// Optional installer for Qwen-Image-Edit-2509 (multi-reference image gen).+//+// What this gives the user:+// - Compose a character + a place / character + product / character ++// character into a single still, in seconds, on Apple Silicon.+// - Powers the agent's `generate_shot_images(refs=[...])` flow for+// cross-shot identity locking — no LoRA training required.+// - The new "Image" tab in the panel uses this to drive manual+// still generation feeding the library.+//+// Backed by:+// - filipstrand/mflux (Apache 2.0) — `mflux-generate-qwen-edit` CLI+// - Qwen/Qwen-Image-Edit-2509 weights (Apache 2.0, Alibaba Tongyi Lab)+//+// Disk + time:+// pip step: ~30 s, ~150 MB.+// First weight download is lazy — happens on first generation, lands+// in ~/.cache/huggingface (~22-34 GB depending on quantization). The+// user picks the quant in Settings → Image generation. We deliberately+// do NOT pre-pull weights here so this install stays under a minute;+// the first agent generation takes the longer hit and the panel+// surfaces a "downloading model…" status during it.+//+// Idempotent:+// pip install -U is a no-op when mflux is already at >=0.17.5.+// Re-running this script is safe.+//+// Survives Pinokio Reset:+// The mflux package is in `ltx-2-mlx/env/` which Reset wipes; user+// re-runs install_qwen.js after Reset to re-install. Weights in+// ~/.cache/huggingface are OUTSIDE the install dir and survive Reset+// automatically — the second install is just the ~30 s pip step.+module.exports = {+ run: [+ {+ method: "notify",+ params: {+ html: [+ "<b>Installing Qwen-Image-Edit-2509 (multi-reference image gen).</b>",+ "<br>Apache 2.0 license. Powers character + place keyframe composition.",+ "<br>This step installs the <code>mflux</code> Python package (~150 MB).",+ "<br>Model weights (~22-34 GB) download lazily on first use to <code>~/.cache/huggingface</code>."+ ].join("")+ }+ },+ {+ method: "shell.run",+ params: {+ // -U upgrades if already installed at older version. The `>=0.17.5`+ // pin is the minimum where `mflux-generate-qwen-edit` ships with+ // the Edit-2509 multi-image fixes (vision encoder save bug+ // resolved in 0.17.5).+ message: "./ltx-2-mlx/env/bin/pip install -U 'mflux>=0.17.5'"+ }+ },+ {+ method: "shell.run",+ params: {+ // Sanity check: confirm the per-family CLI made it onto PATH.+ // Failure here means the pip step did not place the binary —+ // most often a stale cache. The exit-code-only check (no print)+ // matches the v2.0.5 install.js convention to avoid shell+ // rewriters mangling decorative output.+ message: "./ltx-2-mlx/env/bin/mflux-generate-qwen-edit --help > /dev/null"+ }+ },+ {+ method: "notify",+ params: {+ html: [+ "<b>Qwen-Image-Edit-2509 installed.</b>",+ "<br>Open the panel → Settings → Image generation → pick",+ "<br><code>Qwen-Image-Edit-2509 (multi-ref)</code>.",+ "<br>The new <b>Image</b> tab in the panel composes character + place stills",+ "<br>that drop straight into the library for the agent to use as keyframes."+ ].join("")+ }+ }+ ]+}diff --git a/mlx_ltx_panel.py b/mlx_ltx_panel.pyindex c43f21f..2299869 100644--- a/mlx_ltx_panel.py+++ b/mlx_ltx_panel.py@@ -4735,10 +4735,22 @@ class Handler(BaseHTTPRequestHandler):if parsed.path == "/agent/image/config":cfg = _load_agent_image_config()ok, msg = agent_image_engine.health_check(cfg)+ # Per-family install status — exposes which mflux-generate-*+ # binaries are present so the browser can show install hints+ # next to options the user hasn't installed yet (e.g.+ # Qwen-Image-Edit-2509). Probing all families on every config+ # fetch is cheap (a few stat() calls).+ family_status = {}+ for fam in agent_image_engine.MFLUX_FAMILY_BIN.keys():+ probe_cfg = agent_image_engine.ImageEngineConfig(+ kind="mflux", mflux_family=fam,+ )+ family_status[fam] = bool(agent_image_engine._resolve_mflux_bin(probe_cfg))self._json({"image_engine": cfg.to_public_dict(),"ok": ok,"message": msg,+ "family_status": family_status,})return@@ -12490,8 +12502,11 @@ HTML = r"""<!doctype html><div class="field" id="agentMfluxModelField" style="display:none"><label>mflux model</label><select id="agentMfluxModel" onchange="agentMfluxModelChanged()">- <optgroup label="FLUX.2 (Apache 2.0 · 4-step) — 2026 default">- <option value="Runpod/FLUX.2-klein-4B-mflux-4bit" selected>FLUX.2 [klein] 4B — 4-bit, 4 steps · ~4.3 GB · recommended</option>+ <optgroup label="Qwen-Image-Edit-2509 (Apache 2.0 · multi-reference) — character + place composition">+ <option value="Qwen/Qwen-Image-Edit-2509">Qwen-Image-Edit-2509 — 1-3 ref images + prompt → composed still · ~22-34 GB lazy download (Q4 / Q8 picked via the quant slider below)</option>+ </optgroup>+ <optgroup label="FLUX.2 (Apache 2.0 · 4-step) — fast text-to-image default">+ <option value="Runpod/FLUX.2-klein-4B-mflux-4bit" selected>FLUX.2 [klein] 4B — 4-bit, 4 steps · ~4.3 GB · recommended for plain T2I anchors</option></optgroup><optgroup label="Z-Image (Apache 2.0 · Tongyi/Alibaba)"><option value="filipstrand/Z-Image-Turbo-mflux-4bit">Z-Image-Turbo — 4-bit, 9 steps · ~5.9 GB · Compact-tier default</option>@@ -12503,6 +12518,9 @@ HTML = r"""<!doctype html></optgroup><option value="__custom__">Custom HF id / local path…</option></select>+ <div id="agentQwenInstallHint" class="field-help" style="display:none;margin-top:6px;padding:8px;background:rgba(207,150,34,0.08);border:1px solid rgba(207,150,34,0.4);border-radius:6px;color:var(--text);font-size:12px;line-height:1.4">+ <b>Qwen-Image-Edit-2509 needs a one-click install</b> — open Pinokio's launcher menu and click <b>"Install Qwen-Image-Edit (multi-ref keyframes)"</b>. ~30 s for the package; weights (~22-34 GB) download lazily on first use.+ </div></div><div class="field" id="agentMfluxCustomField" style="display:none"><label>Custom model (HF repo id or local path)</label>@@ -18088,6 +18106,18 @@ function agentMfluxModelChanged() {document.getElementById('agentMfluxCustomField').style.display = isCustom ? '' : 'none';document.getElementById('agentMfluxBaseField').style.display = isCustom ? '' : 'none';+ // Show the Qwen install hint when the user picks a Qwen-Edit option+ // AND `mflux-generate-qwen-edit` isn't on PATH yet. family_status comes+ // from /agent/image/config (cached in window.AGENT.imageConfig). The+ // hint is silent for installed families and for non-Qwen picks.+ const hint = document.getElementById('agentQwenInstallHint');+ if (hint) {+ const isQwenEdit = /qwen-image-edit|qwen_image_edit|qwen-edit/i.test(v);+ const fs = (window.AGENT.imageConfig || {}).family_status || {};+ const installed = fs.qwen_edit === true;+ hint.style.display = (isQwenEdit && !installed) ? '' : 'none';+ }+// Per-family default step count — mirrors agent/image_engine.py// MFLUX_FAMILY_DEFAULTS. The user can override; we only auto-fill// when they haven't manually edited the field this session@@ -18097,7 +18127,8 @@ function agentMfluxModelChanged() {// Family-aware step picks (must stay in sync with image_engine.py// MFLUX_FAMILY_DEFAULTS — flagged at the source).let steps = null;- if (/flux\.?2.*klein/i.test(v) || /flux2-klein/i.test(v)) steps = 4;+ if (/qwen-image-edit|qwen_image_edit|qwen-edit/i.test(v)) steps = 30;+ else if (/flux\.?2.*klein/i.test(v) || /flux2-klein/i.test(v)) steps = 4;else if (/z-image-turbo|z_image_turbo/i.test(v)) steps = 9;else if (/^schnell$/i.test(v)) steps = 4;else if (/^(krea-dev|dev)$/i.test(v)) steps = 25;diff --git a/pinokio.js b/pinokio.jsindex f776cac..b0ccea6 100644--- a/pinokio.js+++ b/pinokio.js@@ -90,6 +90,14 @@ module.exports = {const sharp_ready =info.exists("ltx-2-mlx/env/lib/python3.11/site-packages/pipersr") ||info.exists("ltx-2-mlx/env/lib/python3.11/site-packages/pipersr-1.0.0.dist-info")+ // Qwen-Image-Edit-2509 readiness — the mflux package on PATH is the+ // canonical signal that the user opted into multi-reference image+ // generation. Weights live lazily in ~/.cache/huggingface (outside+ // install dir, so they survive Reset). Probing for the per-family CLI+ // covers the case where mflux was upgraded but the new+ // `mflux-generate-qwen-edit` binary didn't land (mflux <0.17.5).+ const qwen_ready =+ info.exists("ltx-2-mlx/env/bin/mflux-generate-qwen-edit")// User-content folders persist across Reset (which only removes the venv).// Keep their shortcuts visible whenever they exist on disk so users can@@ -105,6 +113,7 @@ module.exports = {reset: info.running("reset.js"),q8download: info.running("download_q8.js"),sharp: info.running("install_sharp.js"),+ qwen: info.running("install_qwen.js"),}// Running states first — show what's in progress, hide everything else.@@ -113,6 +122,7 @@ module.exports = {if (running.reset) return [{ default: true, icon: "fa-solid fa-eraser", text: "Resetting", href: "reset.js" }]if (running.q8download) return [{ default: true, icon: "fa-solid fa-download", text: "Downloading Q8 (~37 GB)", href: "download_q8.js" }]if (running.sharp) return [{ default: true, icon: "fa-solid fa-wand-magic-sparkles", text: "Installing Sharp upscaler", href: "install_sharp.js" }]+ if (running.qwen) return [{ default: true, icon: "fa-solid fa-images", text: "Installing Qwen-Image-Edit (multi-ref)", href: "install_qwen.js" }]// No env at all → fresh install path. Recovery shortcuts to user content// folders if a previous install left files behind.@@ -166,6 +176,9 @@ module.exports = {if (!sharp_ready) {baseMenu.push({ icon: "fa-solid fa-wand-magic-sparkles", text: "Install Sharp upscaler (PiperSR, optional)", href: "install_sharp.js" })}+ if (!qwen_ready) {+ baseMenu.push({ icon: "fa-solid fa-images", text: "Install Qwen-Image-Edit (multi-ref keyframes, optional)", href: "install_qwen.js" })+ }baseMenu.push({ icon: "fa-solid fa-rotate", text: "Update", href: "update.js" },{ icon: "fa-regular fa-circle-xmark", text: "Reset", href: "reset.js" },