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(v4.10.8): LTX Upscale — any clip at 2x with LTX-2.5 pixels; the +ltx25.7 engine

mrbizarro3a68ce6c1eb4
diff --git a/CLAUDE.md b/CLAUDE.md
index 2dd820f..f6cdc74 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -255,7 +255,7 @@ These are not arbitrary — every pin is a paid lesson:
| `mlx==0.31.1` | mlx 0.31.2 introduced a numerical regression that attenuates LTX 2.3 vocoder output by ~22 dB. Verified: same model + same prompt + same seed → -42 dB peak on 0.31.2 vs -9 dB peak on 0.31.1. **2026-08-28 — 0.32.1 / 0.32.2 measured and held back, on MEMORY, not audio.** The audio blocker is 0.31.2-specific and gone by 0.32 (isolated vocoder delta **0.000001 dB**; five renders per arm: max_volume -1.7 vs -1.8 dB, -9.2 vs -9.3 LUFS, no time shift — claimed 22 dB, measured 0.1). Speed is real too: Q8 1024×576 121f **139.8 s → 133.6 s (-4.5%)**, all in DiT load + VAE decode. What holds it back: 0.31.1's peak footprint tracks the WORKLOAD, 0.32.x's tracks the MACHINE — it takes ~95% of the ceiling MLX derives from RAM (`0.95 * hw.memsize`, identical formula on both), so it scales down with the Mac but never stops filling it. `/usr/bin/time -l` peak, same prompt/seed/dims, MLX memory+cache limits set to each Mac's derived value: Q4 768×432 — 16 GB **17.41 → 20.35** (0.32.2: 19.35), 32 GB **25.66 → 33.18** (97% of physical), 64 GB **25.53 → 54.28**; Q8 1024×576 — 48 GB **39.49 → 49.95** (97% of physical). On the 64 GB box the Q4 render moved system pressure **58% → 84%** with +1.5 GB swap, the Q8 one hit **87%** — past the 82% at which `plan_memory_policy()` forces the streamed decode (~30 s on a 5 s clip, more than the 4.5% the move earns). **Ruled out:** Metal residency sets (new in 0.32) — `MLX_RESIDENCY_SET_MAX_PCT=0` reproduces the footprint to within 300 KB over three runs. The growth is allocator **cache**, so an explicit `mx.set_cache_limit()` is the prerequisite — **shipped, on this pin, ahead of any version move**: `mlx_warm_helper.py` now caps the cache at **one eighth of physical RAM** (floor 2 GiB, ceiling 8 GiB), applied at helper start and re-asserted before every render because the pipelines drop it to 0 on paths we do not take. On 0.31.1 that is Q4 768x432 121f **25.53 -> 16.50 GB for 71.45 -> 68.84 s** and Q8 1024x576 at the 48 GiB tier **39.49 -> 25.39 GB for 139.84 -> 138.71 s**, both sha256-identical to the uncapped render. **And the pin cannot move alone** — see `scripts/check_post_update.js`. **2026-08-28, second pass: the cap shipped and the move was REFUSED AGAIN.** With the policy applied to both versions, 0.32.1's peak as a share of physical RAM is 16 GiB **101% → 116%**, 32 GiB 75% → 68%, 48 GiB Q8 **77% → 82%**, 64 GiB **37% → 41%** — three of four tiers worse than 0.31.1 uses today, and the Comfortable 48 GiB tier lands ON the 82% line `plan_memory_policy()` treats as pressured. The cap cannot reach it because the excess is not cache: at an identical cap, 0.32.1's **active** memory is +12.0 GB on Q4 and +29.2 GB on Q8. Cache **0** does get it under (Q8@48 GiB 32.25 GB, Q4@16 GiB 17.04 GB) and erases the entire speed win at the same time. There is no cache setting where 0.32.1 beats 0.31.1+policy on both axes, so mflux stays at 0.18.0 too. |
| `mlx-lm==0.31.1` `mlx-metal==0.31.1` | Same release line, kept consistent with mlx. |
| `huggingface-hub>=1.0` | `hf` CLI replaced `huggingface-cli`; older Pinokio bundles ship < 1.0. |
-| `ltx-2-mlx` PINNED to the FORK TAG **`v0.14.19+ltx25.6`** (`mrbizarro/ltx-2-mlx`, commit `0b74258` on `release/ltx25.6` = v0.14.19 `1192051` + the LTX-2.5 port + the schedule/sampler/live-preview work + the i2v anchor re-pin on BOTH loops) | **The pin is a TAG and it lives in `scripts/pinokio/ltx_checkout.sh`**, which is the ONE checkout implementation both lanes call (install.js dispatches it; scripts/post_update.sh calls it). It was a bare SHA through v3.8.3 and was reachable only by luck — a force-push would have stranded every install with an un-fetchable pin and a dead Update button. `check_ltx_pin.js` is the gate. The packages report **`0.14.19+ltx25.6`**; `_LTX_EXPECTED_VERSION` in mlx_warm_helper.py must equal that string or every render logs VERSION SKEW — move the two together. This pin is what lets **LTX-2.5 render through the panel**, and on **dev/beta** 2.5 is the registry DEFAULT (2.3 stays installed, selectable via `LTX_MODEL_VERSION=ltx23`). **v3.8.x did NOT register `ltx25` at all** and shipped 2.3 as the only generation, because the 2.5 weight packs were not publicly downloadable when it was cut — a fresh install would have booted into a generation it could not fetch. They are published now, and **v4.0.0 closes that divergence**: 2.5 is the registered default everywhere. If you ever need to curate a release back to a single generation, it is one `MODEL_VERSIONS` dict plus its three `required_files.json` rows (watch the `kind: "base"` trap: any base row is mandatory for an install to read complete, in the panel *and* in `pinokio.js`). The **pin diverged for the same reason**: v3.8.x shipped `871694d` / `0.14.19+ltx25.1`, one commit behind, because `e6be9d6` (the 2.5 sampler + stage-2 schedule, below) had no 2.3 regression evidence behind it at cut time. It does now — a 2.3 sha256-identity pair across the change — so the next release should choose the pin deliberately rather than inherit either. The base tag v0.14.19 landed 2026-08-11 (a catch-up from v0.14.8, itself a 2026-06-01 catch-up from v0.14.0). **STAY PINNED** — this is NOT "main HEAD", and not upstream's tip either. The v0.14.8 bump had pulled dgrauet's native `_pre_denoise_flush` (the Metal-watchdog fix for the I2V "mosaic" on memory-pressured Macs, #17), budget-aware VAE decode tiling and first-class `frame_rate`, which cut us from 7 runtime patches to 1 (codec-only). The v0.14.19 bump keeps that shape and adds: checkpoint-read `av_ca_timestep_scale_multiplier` (0.14.11 — **audio/dialogue weighting changes on every render**, toward upstream parity, plus `LTXModelConfig.from_checkpoint_dir()`), `frame_rate` forwarded at the A2V/lipdub call sites and no more shortest-stream mux truncation (0.14.15), quantized transformers at any `group_size` (0.14.16), and GPU-watchdog explanation + DiT-freed-before-VAE-decode + a Gemma cache-limit fix (0.14.19). **The `+ltx25.2` bump (2026-08-12) is the first one that changes what a 2.5 render computes**, and only a 2.5 render: (a) the **euler-ancestral sampler is finally REACHED** — it had been implemented with 48 tests and zero callers, so every prior 2.5 render silently used the 2.3 Euler step, against upstream's own `ANCESTRAL_SAMPLER_SINCE_VERSION = (2, 5)` and all three official ComfyUI 2.5 templates; keyframe/flf2v deliberately stays on Euler because the flf2v template pins eta to 0. (b) **stage 2's first sigma is now the vendor's 0.85**, read from `video_ltx2_5_t2v.json` node 395, where we had been using 2.3's 0.909375 — a refine pass starting at the wrong noise level. Both are version-keyed off the checkpoint's own `model_version`, and 2.3 output is proven **sha256-identical** before and after. **No model re-download**: 0.14.13+ prefers a versioned `transformer-distilled-*.safetensors` and falls back to the unversioned name, and update.js trims the `-1.1` variants, so file resolution is identical to v0.14.8. Bumping the pin further is a deliberate, tested operation — read the release notes, bump `_LTX_EXPECTED_VERSION` in mlx_warm_helper.py, smoke-test the matrix on dev, then bump BOTH install.js and update.js in one commit. **The `+ltx25.4` bump (2026-08-14, v4.0.2) is the i2v anchor.** The conditioning item was always built correctly — `frame_idx=0`, `strength=1.0`, `mask_value=0`, a hard latent replace — and both loops forced those tokens back into the model's **x0 estimate** every step. Under Euler that was sufficient by arithmetic accident: velocity `(x - x0)/sigma` is exactly 0 at a pinned token, so the step returns it unchanged. The **euler-ancestral** step 2.5 selects has no such property: it rescales every token by `alpha_next/alpha_down` and adds fresh Gaussian noise, unmasked. Measured on the real 2.5 schedule the anchor is **halved and buried under noise 0.86x its own scale after step 1**, so every forward from step 2 on saw garbage where the image should be and the composition was decided without it; the terminal step stamped the image back in, which is why the delivered frame 0 always matched while the clip was a different shot. The fix re-composites the **sample** against `clean_latent`/`denoise_mask` after the ancestral step at all three sites, guarded by the existing uniform-mask flags — the other half of what ComfyUI's 2.5 i2v graph does. Proven, not argued: **t2v at a fixed seed is sha256-identical** before and after (`fbf09533583c423ab9ad3c0a437aee3484f15c0c5cceb2b1fc4ecc6d59071abb`), and frame-vs-input normalised cross-correlation at seed 424242 moves **0.0934 -> 0.7878** (frame 36) and **0.0902 -> 0.7187** (frame 72) while frame 0 holds at ~0.975. Every Euler lane — 2.3 i2v, keyframe/flf2v with its deliberate `eta=0`, a2v, extend, restore, ic_lora, lipdub — never reaches the branch. **The `+ltx25.5` bump (2026-08-15, v4.0.7) closes that on res_2s too**, which is the lane 2.5's HQ tiers run: the owner reported a reference image producing a high-quality clip of something else on High / High-720p. `res2s_denoise_loop` takes `repin_masked_sample` (default False = the old bytes) and `ti2vid_two_stages_hq` resolves it **per generation**, so 2.5 anchors i2v for real while 2.3 is byte-identical BY CONSTRUCTION — the reason this was deferred in +ltx25.4 is answered by construction rather than by measurement. `denoise_loop` takes the same flag defaulting True, so passing False deliberately restores the drift: that is **Inspire**, shipped as an explicit i2v mode (`loose_reference` through `generate_two_stage`/`generate_and_save` on both pipelines, forwarded only when true). `tests/test_repin_masked_sample.py` pins all four directions. The historic `dcd639e (0.1.0)` detour broke the Extend `cfg_scale` API; do not revisit. |
+| `ltx-2-mlx` PINNED to the FORK TAG **`v0.14.19+ltx25.7`** (`mrbizarro/ltx-2-mlx` = v0.14.19 `1192051` + the LTX-2.5 port + the schedule/sampler/live-preview work + the i2v anchor re-pin on BOTH loops + `+ltx25.7`: IC-LoRA `source_video=`, the seam Upscale ×2 renders through — the tag's own history is in `scripts/pinokio/ltx_checkout.sh`) | **The pin is a TAG and it lives in `scripts/pinokio/ltx_checkout.sh`**, which is the ONE checkout implementation both lanes call (install.js dispatches it; scripts/post_update.sh calls it). It was a bare SHA through v3.8.3 and was reachable only by luck — a force-push would have stranded every install with an un-fetchable pin and a dead Update button. `check_ltx_pin.js` is the gate. The packages report **`0.14.19+ltx25.7`**; `_LTX_EXPECTED_VERSION` in mlx_warm_helper.py must equal that string or every render logs VERSION SKEW — move the two together. This pin is what lets **LTX-2.5 render through the panel**, and on **dev/beta** 2.5 is the registry DEFAULT (2.3 stays installed, selectable via `LTX_MODEL_VERSION=ltx23`). **v3.8.x did NOT register `ltx25` at all** and shipped 2.3 as the only generation, because the 2.5 weight packs were not publicly downloadable when it was cut — a fresh install would have booted into a generation it could not fetch. They are published now, and **v4.0.0 closes that divergence**: 2.5 is the registered default everywhere. If you ever need to curate a release back to a single generation, it is one `MODEL_VERSIONS` dict plus its three `required_files.json` rows (watch the `kind: "base"` trap: any base row is mandatory for an install to read complete, in the panel *and* in `pinokio.js`). The **pin diverged for the same reason**: v3.8.x shipped `871694d` / `0.14.19+ltx25.1`, one commit behind, because `e6be9d6` (the 2.5 sampler + stage-2 schedule, below) had no 2.3 regression evidence behind it at cut time. It does now — a 2.3 sha256-identity pair across the change — so the next release should choose the pin deliberately rather than inherit either. The base tag v0.14.19 landed 2026-08-11 (a catch-up from v0.14.8, itself a 2026-06-01 catch-up from v0.14.0). **STAY PINNED** — this is NOT "main HEAD", and not upstream's tip either. The v0.14.8 bump had pulled dgrauet's native `_pre_denoise_flush` (the Metal-watchdog fix for the I2V "mosaic" on memory-pressured Macs, #17), budget-aware VAE decode tiling and first-class `frame_rate`, which cut us from 7 runtime patches to 1 (codec-only). The v0.14.19 bump keeps that shape and adds: checkpoint-read `av_ca_timestep_scale_multiplier` (0.14.11 — **audio/dialogue weighting changes on every render**, toward upstream parity, plus `LTXModelConfig.from_checkpoint_dir()`), `frame_rate` forwarded at the A2V/lipdub call sites and no more shortest-stream mux truncation (0.14.15), quantized transformers at any `group_size` (0.14.16), and GPU-watchdog explanation + DiT-freed-before-VAE-decode + a Gemma cache-limit fix (0.14.19). **The `+ltx25.2` bump (2026-08-12) is the first one that changes what a 2.5 render computes**, and only a 2.5 render: (a) the **euler-ancestral sampler is finally REACHED** — it had been implemented with 48 tests and zero callers, so every prior 2.5 render silently used the 2.3 Euler step, against upstream's own `ANCESTRAL_SAMPLER_SINCE_VERSION = (2, 5)` and all three official ComfyUI 2.5 templates; keyframe/flf2v deliberately stays on Euler because the flf2v template pins eta to 0. (b) **stage 2's first sigma is now the vendor's 0.85**, read from `video_ltx2_5_t2v.json` node 395, where we had been using 2.3's 0.909375 — a refine pass starting at the wrong noise level. Both are version-keyed off the checkpoint's own `model_version`, and 2.3 output is proven **sha256-identical** before and after. **No model re-download**: 0.14.13+ prefers a versioned `transformer-distilled-*.safetensors` and falls back to the unversioned name, and update.js trims the `-1.1` variants, so file resolution is identical to v0.14.8. Bumping the pin further is a deliberate, tested operation — read the release notes, bump `_LTX_EXPECTED_VERSION` in mlx_warm_helper.py, smoke-test the matrix on dev, then bump BOTH install.js and update.js in one commit. **The `+ltx25.4` bump (2026-08-14, v4.0.2) is the i2v anchor.** The conditioning item was always built correctly — `frame_idx=0`, `strength=1.0`, `mask_value=0`, a hard latent replace — and both loops forced those tokens back into the model's **x0 estimate** every step. Under Euler that was sufficient by arithmetic accident: velocity `(x - x0)/sigma` is exactly 0 at a pinned token, so the step returns it unchanged. The **euler-ancestral** step 2.5 selects has no such property: it rescales every token by `alpha_next/alpha_down` and adds fresh Gaussian noise, unmasked. Measured on the real 2.5 schedule the anchor is **halved and buried under noise 0.86x its own scale after step 1**, so every forward from step 2 on saw garbage where the image should be and the composition was decided without it; the terminal step stamped the image back in, which is why the delivered frame 0 always matched while the clip was a different shot. The fix re-composites the **sample** against `clean_latent`/`denoise_mask` after the ancestral step at all three sites, guarded by the existing uniform-mask flags — the other half of what ComfyUI's 2.5 i2v graph does. Proven, not argued: **t2v at a fixed seed is sha256-identical** before and after (`fbf09533583c423ab9ad3c0a437aee3484f15c0c5cceb2b1fc4ecc6d59071abb`), and frame-vs-input normalised cross-correlation at seed 424242 moves **0.0934 -> 0.7878** (frame 36) and **0.0902 -> 0.7187** (frame 72) while frame 0 holds at ~0.975. Every Euler lane — 2.3 i2v, keyframe/flf2v with its deliberate `eta=0`, a2v, extend, restore, ic_lora, lipdub — never reaches the branch. **The `+ltx25.5` bump (2026-08-15, v4.0.7) closes that on res_2s too**, which is the lane 2.5's HQ tiers run: the owner reported a reference image producing a high-quality clip of something else on High / High-720p. `res2s_denoise_loop` takes `repin_masked_sample` (default False = the old bytes) and `ti2vid_two_stages_hq` resolves it **per generation**, so 2.5 anchors i2v for real while 2.3 is byte-identical BY CONSTRUCTION — the reason this was deferred in +ltx25.4 is answered by construction rather than by measurement. `denoise_loop` takes the same flag defaulting True, so passing False deliberately restores the drift: that is **Inspire**, shipped as an explicit i2v mode (`loose_reference` through `generate_two_stage`/`generate_and_save` on both pipelines, forwarded only when true). `tests/test_repin_masked_sample.py` pins all four directions. The historic `dcd639e (0.1.0)` detour broke the Extend `cfg_scale` API; do not revisit. |
| `hatchling<1.32` (build-time only, `pip-build-constraints.txt`) | Not a runtime dep — the **wheel build backend** for the three vendored `ltx-*` packages. All three declare `readme = "../../README.md"`, which hatchling 1.32.0 turned into a hard error, so both installer paths died at `metadata-generation-failed` on *every* pinned tag from the day 1.32 shipped. **Both are now `uv pip install --build-constraints ../pip-build-constraints.txt`** — install.js always was, update.js as of the v3.8.0 port-back. **NOT `PIP_CONSTRAINT=`**: modern pip spawns its build-dependency sub-install with `_PIP_IN_BUILD_IGNORE_CONSTRAINTS=1` and drops the env constraint on purpose, so that spelling silently resolved hatchling 1.32.0 and failed anyway (proven on pip 26.1/26.2.1, relative and absolute paths). pip's `--build-constraint` flag would work but does not exist on older pips, and Update runs on venvs seeded years apart. Remove only when a pinned upstream tag stops pointing `readme` outside the package dir. |
When changing a version, document the test that proved the new pin is OK.
diff --git a/README.md b/README.md
index d261a91..f162de0 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
</p>
-> **Current release: v4.10.7.** **Extend renders again** (every Extend render since 4.10.2 stopped before it started; fixed). **One take is where the lengths are**: the 30 s to 2 min continuous-shot control sits under Quality and Length now instead of inside Customize. The stats page gets all-time totals and a growth chart. Includes 4.10.6 (Browse CivitAI search works again) and 4.10.5 (LoRAs stack on Hailuo H3). Full notes on the [releases page](https://github.com/mrbizarro/Phosphene/releases).
+> **Current release: v4.10.8.** **LTX Upscale**: any finished clip, an H3 draft above all, re-rendered at twice its size by the LTX-2.5 Pixel Spatial Upscaler with real generated detail, keeping its sound — a button on every video card, a Remix mode, and an **LTX ×2** option in the H3 form that queues the upscale behind the draft in one click. Presets Faithful (face and lips stay), Quick and Re-imagine. Also in this line: Extend renders again (broken since 4.10.2), One take sits under Quality and Length, LoRAs stack on Hailuo H3, Browse CivitAI search works again. Full notes on the [releases page](https://github.com/mrbizarro/Phosphene/releases).
## Overview
diff --git a/VERSION b/VERSION
index f90ee14..195e81e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-4.10.7
+4.10.8
diff --git a/docs/ANALYTICS.md b/docs/ANALYTICS.md
index b56708f..21a14ca 100644
--- a/docs/ANALYTICS.md
+++ b/docs/ANALYTICS.md
@@ -173,7 +173,7 @@ including image and training jobs.
| Field | Type | Example | Notes |
|---|---|---|---|
| `engine` | string | `"ltx"` | `ltx` or `h3` |
-| `mode` | string | `"i2v"` | `t2v`, `i2v`, `extend`, `keyframe`, `a2v`, `restore`, `ingredients`, `control`, `image`, `train` |
+| `mode` | string | `"i2v"` | `t2v`, `i2v`, `extend`, `keyframe`, `a2v`, `restore`, `ingredients`, `control`, `upscale`, `image`, `train` |
| `tier` | string | `"standard"` | LTX quality (`quick`/`balanced`/`standard`/`high`) or the H3 composite cell (`standard_5s`, `high_10s`, …) |
| `duration_bucket` | string | `"5-15m"` | Legacy 5-value bucket, kept one more release for dashboard continuity, then removed in favour of `wall_sec_bucket` |
| `wall_sec_bucket` | int | `480` | The lower edge of a log-spaced ladder (`15, 30, 45, 60, 90, 120, 180, 240, 300, 420, 600, 900, 1200, 1800, 2400, 3600, 5400`). Sharp enough to see a performance regression, far too coarse to be a timing fingerprint. Absent when the wall clock is unknown |
@@ -197,7 +197,7 @@ including image and training jobs.
| `character_used` | bool | `true` | A cast character drove this render |
| `audio_mode` | string | `"joint"` | `joint` / `none` (external audio replaces the generated track) / `a2v_dub` / `h3_native` |
| `first_render` | bool | `true` | Present once per install, on its first successful render ever — the activation funnel without a join |
-| `source` | string | `"storyboard"` | v4.9.7 — which surface queued the job. **Closed vocabulary**: `form`, `batch`, `storyboard`, `characters`, `image_studio`, `retry`, `api`, `unknown`. Makes "how much of the rendering is Storyboard" a one-click breakdown |
+| `source` | string | `"storyboard"` | v4.9.7 — which surface queued the job. **Closed vocabulary**: `form`, `batch`, `storyboard`, `characters`, `image_studio`, `retry`, `api`, `chain` (an Upscale ×2 queued automatically behind an H3 draft), `unknown`. Makes "how much of the rendering is Storyboard" a one-click breakdown |
### `render_failed`
diff --git a/docs/STATE.md b/docs/STATE.md
index 228a491..b1bc35b 100644
--- a/docs/STATE.md
+++ b/docs/STATE.md
@@ -1,15 +1,12 @@
# Phosphene — project state, history, open work
-> **🚀 2026-09-06 — v4.10.7 ships (cherry-picked onto main; dev still carries
-> the unreleased Upscale ×2).** Extend fixed — every Extend render on
-> 4.10.2–4.10.6 died at construction ("RetakePipeline.__init__() got an
-> unexpected keyword argument 'low_ram_streaming'"; `_construct_pipeline`
-> builds each pipeline with the kwargs its class accepts,
-> `test_pipeline_construct_kwargs.py`). One take moved out of Customize to a
-> third strip under Quality / Length (`#takeAxes`, ids unchanged). /stats:
-> Total renders + Total installs (all-time) and a Growth chart
-> (`test_stats_growth.py`); first fleet read 19,443 renders / 1,315 installs
-> since 2026-08-09.
+> **🚀 2026-09-06 — v4.10.8 ships (dev promoted whole; main = dev tree).**
+> Upscale ×2 / LTX Upscale goes public: the card button, Remix → Upscale ×2,
+> and LTX ×2 in the H3 form (chain), presets Faithful (3 refine steps from
+> the clip) / Quick (2) / Re-imagine (4 from noise); engine tag
+> `v0.14.19+ltx25.7`, adapter `ic_upscale_x2` (0.33 GB) fetched by Update
+> from the weights-ltx25-v1 mirror. Also carries v4.10.7 (Extend fix, One
+> take strip, stats totals + growth), v4.10.6 and v4.10.5.
> **🩹 2026-09-06 — v4.10.6 ships: Browse CivitAI search.** Any word typed
> into the LoRA browser returned nothing ("turbo" → 0 while "Minimax H3
@@ -25,6 +22,66 @@
> by cherry-pick onto origin/main (dev carries the unreleased Upscale ×2
> headline).
+> **🔍 2026-09-06 — Upscale ×2 with LTX-2.5 (on dev, HEADLINE — waits for
+> owner USE before public).** "H3 mind, LTX pixels": a finished clip (an H3
+> draft above all) goes through the LTX-2.5 Pixel Spatial Upscaler IC-LoRA
+> and comes out at twice the size with generated detail and its own sound.
+> Three doors: the **Upscale ×2** button on every video card, **Remix →
+> Upscale ×2** for any clip, and **LTX ×2** in the H3 form's Upscale row —
+> which queues the ×2 behind the draft by itself (one Generate click; job
+> `source=chain`). Presets, not a slider: **Faithful** (face and lips stay,
+> 1 refine step), **Balanced** (2 steps), **Re-imagine** (the adapter's own
+> 4-step re-render from noise — sharpest, faces drift). Measured on M4 Max,
+> 640×384 5 s draft → 1280×768: draft 4:19 + Faithful 2:17 = **6:36**;
+> Balanced 3:44; Re-imagine 6:35 (8 steps looked identical to 4). The
+> per-step cost is attention-bound: Q4 is no faster than Q8 (≈87–92 s/step
+> at that canvas), so speed came from starting at the clip's own latent
+> (fork `v0.14.19+ltx25.7`: `ICLoraPipeline.generate(source_video=…)` —
+> Stage 1 skipped, VAE encode → pack's spatial ×2 latent upsampler →
+> control-aware refine of N tail steps with the adapter + the clip as
+> reference). Fused Q4 destroys the adapter (fork measures ~150 % delta
+> loss) → helper `lora_mode="unfused"` on the IC lane, routed for Q4; Q8
+> fused == unfused by eye. **Bug found on the way:** the helper built
+> ICLoraPipeline without `gemma_model_id`, so every IC lane (Colorize,
+> Ingredients, Control) on a 2.5 checkpoint encoded prompts with Gemma 3
+> from the HF cache; now `GEMMA_PATH`. Adapter: gated on HF (owner clicked
+> the license; token account has access), 327,322,640 B, sha256
+> `984851b7…283c1d`, `reference_downscale_factor=2`; `required_files.json`
+> `ic_upscale_x2` with a mirror block on `weights-ltx25-v1` — **asset not
+> published yet** (`publish_pack_release.py --repo-key ic_upscale_x2`, owner
+> call); until then the mode refuses by name (`pack_missing`) and
+> `ltx25_weights.sh` fetches it best-effort. Frames snap DOWN to 1+8k (an
+> H3 72 f clip → 65 f, ≤0.3 s trimmed; audio muxed `-shortest`), fps from
+> the source. `_h3_export_notes` carries the LTX ×2 sentence per canvas.
+> Gates `--fast` green; `test_control_discoverability` counts 6
+> `ltx_floor_canvas(` call sites now. Analytics: mode `upscale`, source
+> `chain` (docs/ANALYTICS.md).
+
+> **📈 2026-09-06 — /stats gets totals and growth (on dev).** Two new tiles,
+> **Total renders** (completed, all installs, since the first day the fleet
+> pinged) and **Total installs**, plus a Growth chart: cumulative installs by
+> first-boot day against renders per day (30 d), weekly actives in the
+> caption. Fleet queries `total_renders`, `total_installs`, `installs_by_day`,
+> `renders_by_day`, `active_by_week` (no window on the totals); the local
+> aggregator produces the same shape. First fleet read: **19,443 renders,
+> 1,315 installs since 2026-08-09**, weekly actives 298 → 552 over four full
+> weeks. Also: the "Renders this week" tile was a 14-day count wearing a 7-day
+> label (the `outcomes` query is 14 DAY); it now says 14d. `test_stats_growth.py`.
+
+> **🩹 2026-09-06 — Extend has been dead since 4.10.2 (on dev, hotfix
+> candidate).** The fleet read after v4.10.5 showed 35 `render_failed` on
+> 4.10.4 from one install, all "RetakePipeline.__init__() got an unexpected
+> keyword argument 'low_ram_streaming'": the low-RAM streaming change passed
+> the kwarg to every pipeline and the vendored RetakePipeline (Extend) has its
+> own __init__ without it, so EVERY Extend render on 4.10.2–4.10.5 fails at
+> construction, on every Mac. Fix: `_construct_pipeline` builds each pipeline
+> with the kwargs its class accepts (same introspection as generate kwargs),
+> logging what it dropped; `test_pipeline_construct_kwargs.py`. Rest of the
+> read: 4.10.4 is the most-booted version a day after release (42 installs
+> today), H3 12 ok / 1 failed on 4.10.x, refusals only `image_ram`; the big
+> 7-day error counts ("model incomplete, missing 9 files" 176, "Missing 262
+> parameters" 121) are ONE 4.9.3 install each, not a release defect.
+
> **🚀 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/install.js b/install.js
index 05213cf..7ad33b9 100644
--- a/install.js
+++ b/install.js
@@ -180,7 +180,7 @@ module.exports = {
// LAUNCHER SCRIPT. Both lanes now call the one implementation in
// `scripts/pinokio/ltx_checkout.sh`, which holds the literal:
//
- // v0.14.19+ltx25.6 on mrbizarro/ltx-2-mlx
+ // v0.14.19+ltx25.7 on mrbizarro/ltx-2-mlx
//
// Two reasons, both structural. (1) A SHA on a branch is not a pin:
// v3.8.x fetched `feat/ltx-2.5` and checked out a SHA that the branch
diff --git a/mlx_ltx_panel.py b/mlx_ltx_panel.py
index 750a9eb..363649d 100644
--- a/mlx_ltx_panel.py
+++ b/mlx_ltx_panel.py
@@ -1471,6 +1471,22 @@ CURATED_LORAS: dict[str, dict] = {
"is_hdr_toggle": False,
"is_restore_lora": True, # hide from the LoRA picker (mode-driven)
},
+ "upscale_x2": {
+ "id": "upscale_x2",
+ "name": "Pixel Spatial Upscaler ×2 (LTX-2.5)",
+ "description": "Lightricks' LTX-2.5 IC-LoRA that re-renders a finished "
+ "clip at twice the size, inventing real detail instead of "
+ "interpolating pixels. Drives the Upscale ×2 mode; takes "
+ "the source clip on the IC reference channel. Gated on "
+ "HF (license click) — mirrored on the Phosphene release.",
+ "repo_id": "Lightricks/LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler",
+ "local_path": str(LORAS_DIR / "ic" / "ltx-2.5-22b-ic-lora-pixel-spatial-upscaler-x2-1.0.safetensors"),
+ "default_strength": 1.0,
+ "trigger_words": [],
+ "is_curated": True,
+ "is_hdr_toggle": False,
+ "is_restore_lora": True, # hide from the LoRA picker (mode-driven)
+ },
# Ingredients — the FLAGSHIP multi-reference IC-LoRA. 2-8 reference images
# (a face + a prop + a location) are tiled into ONE "reference sheet", the
# sheet is repeated to N frames as the IC video_conditioning, and the model
@@ -9508,7 +9524,10 @@ def ltx_tiers_payload() -> dict:
# crop, no distortion. The `wide_5s` tier renders 1024×576, which IS 16:9, and
# compute_upscale_plan takes the pure-scale path for it: 1.25× to 720p, 1.875×
# to 1080p, no pad filter at all.
-H3_UPSCALE_MODES = ("off", "fit_720p", "fit_1080p")
+# "ltx_x2" is not an ffmpeg pass: the draft ships native and an Upscale ×2
+# job (LTX-2.5 Pixel Spatial Upscaler) is queued behind it — "H3 mind, LTX
+# pixels" as one Generate click. compute_upscale_plan returns None for it.
+H3_UPSCALE_MODES = ("off", "fit_720p", "fit_1080p", "ltx_x2")
H3_UPSCALE_DEFAULT = "fit_720p"
# ORIENTATION — H3's canvases are all landscape, which left vertical social
# formats unreachable on this engine (owner-reported 2026-08-15). Portrait is
@@ -11422,12 +11441,26 @@ def _h3_export_notes(w: int, h: int) -> dict[str, str]:
Export row can never disagree with the ffmpeg command that runs. Memoised
per canvas because /status polls this on a timer; the plan does no I/O, the
cache is just politeness."""
- key = (int(w), int(h))
+ _adapter_ok = Path(CURATED_LORAS["upscale_x2"]["local_path"]).exists()
+ key = (int(w), int(h), _adapter_ok)
hit = _H3_EXPORT_NOTES.get(key)
if hit is not None:
return hit
out: dict[str, str] = {}
for mode in H3_UPSCALE_MODES:
+ if mode == "ltx_x2":
+ try:
+ _cap = int(tier_max_dim("i2v") or 0)
+ except Exception: # noqa: BLE001
+ _cap = 0
+ _sc = min(2.0, _cap / float(max(w, h))) if _cap else 2.0
+ _tw, _th = ltx_floor_canvas(int(w * _sc), int(h * _sc))
+ out[mode] = (f"LTX ×2: after the draft, an Upscale ×2 job is queued that re-renders "
+ f"it at {_tw}×{_th} with LTX-2.5 generated detail and keeps the sound. "
+ "Faithful preset: about the draft's time again."
+ + ("" if _adapter_ok else
+ " Needs the 0.3 GB Upscale adapter first — Settings → Models."))
+ continue
plan = compute_upscale_plan(w, h, mode)
if not plan:
out[mode] = "" # "off" — the native file ships untouched
@@ -12589,7 +12622,7 @@ def _analytics_wall_sec_bucket(seconds):
_ANALYTICS_SOURCES = ("form", "batch", "storyboard", "characters",
- "image_studio", "retry", "api", "unknown")
+ "image_studio", "retry", "api", "chain", "unknown")
def _analytics_source(p: dict, job: dict | None = None) -> str:
@@ -13716,6 +13749,57 @@ def _probe_video_dims(path: str) -> tuple[int, int]:
return 0, 0
+def _probe_video_frames(path: str) -> int:
+ """Frame count of a video via ffprobe (0 when unknown)."""
+ try:
+ out = subprocess.run(
+ [str(FFPROBE), "-v", "error", "-select_streams", "v:0",
+ "-count_packets", "-show_entries", "stream=nb_read_packets",
+ "-of", "csv=p=0", path],
+ capture_output=True, text=True, timeout=30,
+ ).stdout.strip()
+ return int(out.splitlines()[0]) if out else 0
+ except Exception:
+ return 0
+
+
+def _video_has_audio(path: str) -> bool:
+ try:
+ out = subprocess.run(
+ [str(FFPROBE), "-v", "error", "-select_streams", "a:0",
+ "-show_entries", "stream=codec_type", "-of", "csv=p=0", path],
+ capture_output=True, text=True, timeout=10,
+ ).stdout.strip()
+ return "audio" in out
+ except Exception:
+ return False
+
+
+def _mux_audio_from(video_path: Path, audio_source: str) -> bool:
+ """Copy the source clip's audio track onto `video_path` (video stream
+ untouched). The whole point of the H3 → LTX ×2 lane: H3 wrote the
+ dialogue and the sound; the upscaler must not throw them away."""
+ if not _video_has_audio(audio_source):
+ return False
+ tmp = video_path.with_name(video_path.stem + ".mux.mp4")
+ try:
+ r = subprocess.run(
+ [str(FFMPEG), "-y", "-loglevel", "error",
+ "-i", str(video_path), "-i", str(audio_source),
+ "-map", "0:v:0", "-map", "1:a:0", "-c:v", "copy", "-c:a", "aac",
+ "-b:a", "192k", "-shortest", "-movflags", "+faststart", str(tmp)],
+ capture_output=True, text=True, timeout=300)
+ if r.returncode != 0 or not tmp.is_file():
+ push(f"Upscale: audio mux failed ({(r.stderr or '')[-160:].strip()}); clip kept silent")
+ tmp.unlink(missing_ok=True)
+ return False
+ tmp.replace(video_path)
+ return True
+ except Exception as exc: # noqa: BLE001
+ push(f"Upscale: audio mux failed ({exc}); clip kept silent")
+ return False
+
+
def _native_render_for(src: Path) -> Path:
"""The un-exported render behind `src`, when there is one.
@@ -15349,7 +15433,7 @@ def compute_upscale_plan(w: int, h: int, mode: str | None,
avoid double-upscaling and to plan a downscale-only pass for the
fit_720p target on a model-upscaled source."""
mode = (mode or "off").strip().lower()
- if mode in ("", "off", "native"):
+ if mode in ("", "off", "native", "ltx_x2"):
return None
# Effective dims of the file the helper actually wrote. The model-based
# upscale (Sharper) doubles them inside the helper before VAE decode.
@@ -20122,7 +20206,7 @@ def _clamp_stage_steps_to_tables(job: dict) -> None:
except Exception: # noqa: BLE001
pass
if not hq and p.get("mode") not in ("extend", "keyframe", "restore",
- "ingredients", "control"):
+ "ingredients", "control", "upscale"):
try:
_s1, _ = resolve_distilled_schedule(
mv, preset=(p.get("schedule_preset") or None))
@@ -20839,6 +20923,14 @@ def make_job(form: dict[str, list[str]] | dict[str, str], *,
# be in this allowlist or the path silently no-ops on /queue/add
# (the known make_job allowlist trap — see CLAUDE.md).
"restore_video_path": f("restore_video_path", ""),
+ # Upscale ×2 (v4.11): the finished clip to re-render at twice the
+ # size, and how tightly LTX must keep its shot. Same allowlist trap.
+ "upscale_source_path": f("upscale_source_path", ""),
+ "keep_shot": f("keep_shot", ""),
+ "upscale_quant": f("upscale_quant", ""),
+ "upscale_steps": f("upscale_steps", ""),
+ "upscale_lora_mode": f("upscale_lora_mode", ""),
+ "upscale_start": f("upscale_start", ""),
# ingredients (multi-reference) mode — JSON list of 2-8 uploaded
# image paths + the action description. SAME allowlist trap: both
# MUST be here or they silently no-op on /queue/add (the panel UI
@@ -22688,6 +22780,35 @@ def _h3_clip_is_complete(path: Path, started_at: float) -> bool:
return False
+def _chain_upscale_after_h3(job: dict, p: dict, native_path: Path) -> None:
+ """Queue the Upscale ×2 job for a draft whose form asked for "LTX ×2".
+
+ Same door as /queue/add (make_job), so every allowlist and refusal
+ applies; the preset (keep_shot) and seed travel from the draft's form.
+ The draft stays in the gallery — the ×2 lands beside it as its own card."""
+ try:
+ form = {
+ "mode": "upscale",
+ "engine": "ltx",
+ "upscale_source_path": str(native_path),
+ "keep_shot": str(p.get("keep_shot") or "1.0"),
+ "seed": str(p.get("seed") if p.get("seed") not in (None, "") else "-1"),
+ "prompt": "",
+ "label": f"{p.get('label') or native_path.stem} · LTX ×2",
+ }
+ nxt = make_job(form)
+ nxt["params"]["source"] = "chain"
+ nxt["params"]["chained_from"] = job.get("id")
+ with QUEUE_COND:
+ STATE["queue"].append(nxt)
+ QUEUE_COND.notify_all()
+ persist_queue()
+ push(f"[h3] LTX ×2 queued behind the draft → job {nxt['id']}")
+ except Exception as exc: # noqa: BLE001
+ push(f"[h3] could not queue the LTX ×2 pass: {exc} — the draft is in "
+ "the gallery; use its Upscale ×2 button.")
+
+
def run_h3_job_inner(job: dict) -> None:
"""Render one job on the Hailuo H3 engine (optional subprocess pack).
@@ -23577,6 +23698,8 @@ def run_h3_job_inner(job: dict) -> None:
job["output_path"] = str(final_target)
p["elapsed_seconds"] = elapsed
push(f"[h3] done in {elapsed}s → {final_target.name}")
+ if h3_upscale_mode == "ltx_x2":
+ _chain_upscale_after_h3(job, p, native_path)
if p.get("open_when_done"):
subprocess.run(["open", str(final_target)], check=False)
@@ -23848,7 +23971,7 @@ def run_job_inner(job: dict) -> None:
quality = p.get("quality", "standard")
if p.get("accel") not in ("off", "boost", "turbo"):
p["accel"] = "off"
- if ltx_quality_uses_hq(quality) or mode in ("extend", "keyframe", "a2v", "restore", "ingredients", "control"):
+ if ltx_quality_uses_hq(quality) or mode in ("extend", "keyframe", "a2v", "restore", "ingredients", "control", "upscale"):
p["accel"] = "off"
# RETIRED CONTROL, FORCED OFF (fleet bug, 15 events / 4 installs). The
# Boost/Turbo row lost its UI in v4.0.5, but the hidden #accel input
@@ -23874,7 +23997,7 @@ def run_job_inner(job: dict) -> None:
# - extend / keyframe use stage1_steps + stage2_steps via two-stage path
# - every HQ-pipeline quality uses two-stage HQ with its own schedule
# - a2v uses A2VidPipelineTwoStage's stage1/stage2 walks
- if mode not in ("extend", "keyframe", "a2v", "restore", "ingredients", "control") and not ltx_quality_uses_hq(quality) and int(p.get("steps", 8)) < 8:
+ if mode not in ("extend", "keyframe", "a2v", "restore", "ingredients", "control", "upscale") and not ltx_quality_uses_hq(quality) and int(p.get("steps", 8)) < 8:
raise RuntimeError(
f"steps={p.get('steps')} is below the 8-step minimum for the Q4 distilled "
"schedule. Fewer steps truncates the sigma walk and leaves >70% noise in "
@@ -24301,6 +24424,161 @@ def run_job_inner(job: dict) -> None:
subprocess.run(["open", str(final_out)], check=False)
return
+ if mode == "upscale":
+ # Upscale ×2 (v4.11): "H3 mind, LTX 2.5 pixels." Any finished clip is
+ # the IC reference; LTX-2.5's Pixel Spatial Upscaler re-renders it at
+ # twice the size in ONE pass at the target resolution, then the
+ # source's own audio is muxed back. `keep_shot` is the reference's
+ # attention strength: 1.0 keeps the shot (LTX only paints detail),
+ # lower lets it re-imagine — the owner's eye decides the default.
+ src = p.get("upscale_source_path") or p.get("restore_video_path") or ""
+ if not src or not Path(src).exists():
+ raise RuntimeError(
+ f"source clip for Upscale ×2 not found: {src!r}. Pick a finished "
+ "clip in the Outputs gallery (or paste a path).")
+ source = Path(src)
+ adapter = CURATED_LORAS["upscale_x2"]
+ adapter_path = adapter.get("local_path") or ""
+ if not (adapter_path and Path(adapter_path).exists()):
+ raise RenderRefused(
+ "pack_missing",
+ "Upscale ×2 needs the LTX-2.5 Pixel Spatial Upscaler adapter, which "
+ "isn't downloaded on this Mac yet. Open Settings → Models and "
+ "download it, then render again.")
+ sw, sh = _probe_video_dims(src)
+ if not (sw and sh):
+ raise RuntimeError(f"could not read the size of {source.name}")
+ src_frames = _probe_video_frames(src)
+ # The clip's own frame rate (H3 renders at 24, LTX at 24/25): the
+ # reference loader takes the first N frames, so the output must tick
+ # at the same rate for the carried-over soundtrack to stay in sync.
+ src_fps = float(FPS)
+ try:
+ _r = subprocess.run(
+ [str(FFPROBE), "-v", "error", "-select_streams", "v:0",
+ "-show_entries", "stream=r_frame_rate", "-of", "csv=p=0", src],
+ capture_output=True, text=True, timeout=30).stdout.strip()
+ _n, _d = _r.split("/") if "/" in _r else (_r, "1")
+ if float(_d) > 0 and 1.0 <= float(_n) / float(_d) <= 120.0:
+ src_fps = round(float(_n) / float(_d), 3)
+ except Exception: # noqa: BLE001
+ pass
+ cap = int(tier_max_dim("i2v") or 0) or max(sw, sh) * 2
+ scale = min(2.0, cap / float(max(sw, sh)))
+ if scale < 1.25:
+ raise RenderRefused(
+ "hardware_tier",
+ f"Upscale ×2 can't go above {cap}px on the {SYSTEM_CAPS['label']} "
+ f"tier, and {source.name} is already {sw}×{sh}. Use a smaller "
+ "source clip.")
+ up_w, up_h = ltx_floor_canvas(int(sw * scale), int(sh * scale))
+ # LTX's grid is 1+8k frames and the IC reference loader rounds the
+ # source DOWN to that grid, so the target must match it exactly or
+ # the last latent frame renders unconditioned. A 72-frame H3 clip
+ # becomes 65 frames (0.3 s trimmed at the tail); the soundtrack is
+ # trimmed to match at mux time.
+ frames = int(p.get("frames") or 0) or src_frames or 49
+ frames = min(frames, src_frames or frames)
+ frames = max(9, 1 + 8 * ((frames - 1) // 8))
+ try:
+ keep = float(p.get("keep_shot") or 1.0)
+ except (TypeError, ValueError):
+ keep = 1.0
+ keep = max(0.3, min(1.0, keep))
+ prompt = (p.get("prompt") or "").strip()
+ if not prompt:
+ # The source's own prompt is the best description of the shot.
+ try:
+ _sc = json.loads(Path(str(source) + ".json").read_text(encoding="utf-8"))
+ prompt = str(((_sc.get("params") or {}).get("prompt")) or "").strip()
+ except Exception: # noqa: BLE001
+ prompt = ""
+ if not prompt:
+ prompt = "The same shot, sharper and more detailed."
+ quant = "q8" if (SYSTEM_CAPS.get("allows_q8") and not hq_surface_missing()) else "q4"
+ if p.get("upscale_quant") in ("q4", "q8"): # experiment override
+ quant = str(p["upscale_quant"])
+ # Where the render starts. "source" (default): the clip's own latent,
+ # upsampled ×2, refined for a few steps — identity and motion are the
+ # clip's, the adapter adds detail, and the wall time is those few
+ # full-res steps. "noise": the adapter's reference-only recipe, a full
+ # re-render at 2× (sharper invention, faces drift, ~2× slower).
+ # Presets (keep_shot), set by the owner's eye on 2026-09-06:
+ # Faithful 1.0 → 3 refine steps from the clip's own latent (the
+ # sharpness of the from-noise examples, face stays hers; 5:26 for 5 s
+ # on M4 Max — 1 step was "kind of blurry", 2 steps in between);
+ # Quick 0.8 → 2 steps (3:44, a touch softer); Re-imagine 0.4 → the
+ # adapter's own recipe, a 4-step render from noise (6:35, sharpest,
+ # faces drift).
+ if p.get("upscale_start") in ("noise", "source"):
+ start_from = str(p["upscale_start"])
+ else:
+ start_from = "noise" if keep < 0.5 else "source"
+ refine_steps = 3 if keep >= 0.95 else 2
+ if p.get("upscale_steps") and start_from == "source":
+ refine_steps = max(1, min(7, int(p["upscale_steps"])))
+ up_model_dir = ltx_model_dir(quant)
+ ltx_pack_preflight(quant, "Upscale ×2")
+ out_name = f"{source.stem}_x2_{stamp}.mp4"
+ final_out = OUTPUT / out_name
+ job["raw_path"] = str(final_out)
+ job_spec = {
+ "action": "generate_restore",
+ "id": job["id"],
+ "params": {
+ "model_dir": up_model_dir,
+ "prompt": prompt,
+ "negative_prompt": p.get("negative_prompt", ""),
+ "output_path": str(final_out),
+ "height": up_h,
+ "width": up_w,
+ "frames": frames,
+ "frame_rate": src_fps,
+ "seed": p["seed"],
+ "video_conditioning": [[src, keep]],
+ "conditioning_attention_strength": keep,
+ "single_stage": start_from == "noise",
+ "source_video": src if start_from == "source" else "",
+ "refine_steps": refine_steps if start_from == "source" else None,
+ # Q4 cannot hold a fused adapter (see the helper); Q8 can, at a
+ # measured 22.6% loss. Exact runtime attachment on request.
+ "lora_mode": ("unfused" if (quant == "q4" or p.get("upscale_lora_mode") == "unfused")
+ else "fused"),
+ "loras": [{"path": adapter_path,
+ "strength": float(adapter.get("default_strength") or 1.0)}],
+ # Fewer distilled steps keep the output closer to the
+ # reference (the adapter card says so) AND cut the wall time
+ # in proportion — the reference already carries the shot.
+ "stage1_steps": int(p.get("upscale_steps") or p.get("stage1_steps") or 4),
+ "stage2_steps": int(p.get("stage2_steps", 3)),
+ },
+ }
+ push(f"Upscale ×2 via helper: id={job['id']} src={source.name} {sw}×{sh} → "
+ f"{up_w}×{up_h} {frames}f · keep-the-shot {keep:.2f} · {quant.upper()} distilled · "
+ + (f"from the clip's own latent, {refine_steps}-step refine + Pixel Spatial Upscaler"
+ if start_from == "source" else "full re-render from noise + Pixel Spatial Upscaler"))
+ result = HELPER.run(job_spec)
+ if "seed_used" in result:
+ push(f"seed used: {result['seed_used']}")
+ p["seed_used"] = result["seed_used"]
+ muxed = _mux_audio_from(final_out, src)
+ sidecar = {
+ "output": str(final_out), "raw_output": str(final_out),
+ "params": {**p, "command": "upscale", "keep_shot": keep,
+ "source_size": [sw, sh], "audio_from_source": muxed},
+ "started": job.get("started_at"),
+ "elapsed_sec": round(time.time() - job["started_ts"], 2) if job.get("started_ts") else None,
+ "fps": src_fps, "model": up_model_dir, "queue_id": job["id"],
+ "helper_elapsed_sec": result.get("elapsed_sec"),
+ "output_codec": output_codec_settings(),
+ }
+ write_sidecar(final_out.with_suffix(final_out.suffix + ".json"), sidecar)
+ job["output_path"] = str(final_out)
+ push(f"Upscale ×2 done in {sidecar['elapsed_sec']}s → {final_out.name}"
+ + (" (source audio kept)" if muxed else ""))
+ if p.get("open_when_done"):
+ subprocess.run(["open", str(final_out)], check=False)
+ return
if mode == "ingredients":
# Ingredients (multi-reference) — the FLAGSHIP IC-LoRA feature. 2-8
# subject images (a face + a prop + a location) are composed into ONE
diff --git a/mlx_warm_helper.py b/mlx_warm_helper.py
index bde7e71..50996ae 100644
--- a/mlx_warm_helper.py
+++ b/mlx_warm_helper.py
@@ -2474,7 +2474,7 @@ def configure_acceleration(mode: str) -> str:
# of letting it surface as an un-triageable TypeError mid-render.
#
# 2026-08-12: this is a FORK BUILD, not an upstream tag. The vendored checkout
-# is mrbizarro/ltx-2-mlx at the immutable tag `v0.14.19+ltx25.6` — v0.14.19 plus
+# is mrbizarro/ltx-2-mlx at the immutable tag `v0.14.19+ltx25.7` — v0.14.19 plus
# the LTX-2.5 port (keyframe pos-emb, Gemma 4 tower, ancestral sampler). The
# release segment stays 0.14.19 because that is genuinely what it branches from;
# the `+ltx25.N` local segment is what makes the two distinguishable.
@@ -2499,7 +2499,7 @@ def configure_acceleration(mode: str) -> str:
# — a skew gate blind to the one skew that mattered. Bumping the pin here
# without bumping the packages (or the reverse) puts it back into permanent
# SKEW warnings, so the two move together or not at all.
-_LTX_EXPECTED_VERSION = "0.14.19+ltx25.6"
+_LTX_EXPECTED_VERSION = "0.14.19+ltx25.7"
def _detect_ltx_version() -> dict:
@@ -3876,11 +3876,48 @@ for line in sys.__stdin__:
# ICLoraPipeline — it loads its own DiT + VAE at init, so holding
# the t2v / i2v caches just doubles the memory footprint.
release_pipelines("restore render incoming")
- pipe = ICLoraPipeline(
- model_dir=Path(model_dir),
- lora_paths=resolved,
- low_memory=LOW_MEMORY,
- )
+ # gemma_model_id was never passed here, so every IC lane (Colorize,
+ # Ingredients, Control, Upscale ×2) encoded its prompt with the
+ # class default — Gemma 3 from the HF cache — even on an LTX-2.5
+ # checkpoint, whose text encoder is the Gemma 4 fine-tune the
+ # panel hands us in LTX_GEMMA. The references carried the shot so
+ # nobody noticed; the prompt was the part being ignored.
+ # lora_mode "unfused": keep the adapter as a runtime wrapper instead
+ # of folding it into the quantized weights. Fusing re-quantizes
+ # W + B@A back onto the int grid — the fork measures 22.6% of this
+ # upscaler's delta lost at int8 and ~150% at int4 (i.e. nothing of
+ # the adapter survives on Q4). The native loader attaches
+ # `_pending_loras` exactly, at any bit width; the IC pipeline's own
+ # fuse step is skipped by handing it an empty list, so the reference
+ # downscale factor it would have read from the file is set by hand.
+ lora_mode = str(p.get("lora_mode") or "fused")
+ if lora_mode == "unfused":
+ try:
+ _install_lora_fusion_patches()
+ except Exception: # noqa: BLE001
+ pass
+ from ltx_pipelines_mlx.iclora_utils import read_lora_reference_downscale_factor
+ pipe = ICLoraPipeline(
+ model_dir=Path(model_dir),
+ lora_paths=[],
+ gemma_model_id=GEMMA_PATH,
+ low_memory=LOW_MEMORY,
+ )
+ pipe._pending_loras = list(resolved)
+ for _lp, _ in resolved:
+ _scale = read_lora_reference_downscale_factor(_lp)
+ if _scale != 1:
+ pipe.reference_downscale_factor = _scale
+ emit({"event": "log",
+ "line": f"IC-LoRA applied UNFUSED (exact runtime wrapper), "
+ f"reference downscale ×{pipe.reference_downscale_factor}"})
+ else:
+ pipe = ICLoraPipeline(
+ model_dir=Path(model_dir),
+ lora_paths=resolved,
+ gemma_model_id=GEMMA_PATH,
+ low_memory=LOW_MEMORY,
+ )
emit({"event": "log",
"line": f"step:generate_restore {p['width']}x{p['height']} "
f"{num_frames}f @{float(p.get('frame_rate', 24.0)):.1f}fps "
@@ -3914,6 +3951,23 @@ for line in sys.__stdin__:
# asked for it, so the pipeline default still wins otherwise.
if p.get("skip_stage_2"):
kwargs["skip_stage_2"] = True
+ # Upscale ×2 (v4.11): one pass at the full target size — the
+ # reference IS the low-res clip, so a half-res stage 1 would only
+ # throw its detail away — and the "keep the shot" slider rides on
+ # the reference's attention strength.
+ if p.get("single_stage"):
+ kwargs["single_stage"] = True
+ if p.get("conditioning_attention_strength") is not None:
+ kwargs["conditioning_attention_strength"] = float(
+ p["conditioning_attention_strength"])
+ # Upscale ×2 from the clip itself (Stage 1 skipped, see
+ # ICLoraPipeline.generate): the clip's latent is upsampled and only
+ # `refine_steps` of the distilled tail run at full res.
+ if p.get("source_video"):
+ kwargs["source_video"] = str(p["source_video"])
+ kwargs.pop("single_stage", None)
+ if p.get("refine_steps") is not None:
+ kwargs["refine_steps"] = int(p["refine_steps"])
kwargs = _filter_unsupported_kwargs(pipe.generate_and_save, kwargs)
# Ingredients is single-stage ONLY (the public Space's recipe). If the
# imported pipeline package is an older/pinned build whose
diff --git a/required_files.json b/required_files.json
index 060672f..3879268 100644
--- a/required_files.json
+++ b/required_files.json
@@ -223,6 +223,34 @@
"ltx-2.3-22b-ic-lora-union-control-ref0.5.safetensors"
]
},
+ {
+ "_comment": "Pixel Spatial Upscaler x2 IC-LoRA - the OFFICIAL Lightricks LTX-2.5 adapter behind the Upscale x2 mode (a finished clip, typically an H3 draft, rides the IC reference channel and the 2.5 base re-renders it at twice the canvas with generated detail). The upstream repo is GATED (license click), so like the 2.5 packs the bytes come from the `mirror` block on the weights-ltx25-v1 release - one 327,322,640-byte safetensors (sha256 984851b769ea2bcb4c9e0a239a7676239e42c6a6001ddc69943b41ff0b283c1d, verified against the Hub's LFS oid before publishing) plus the LTX-2.x Community License text the adapter carries in its own metadata. Metadata reference_downscale_factor=2 (the IC loader halves the reference; handled in iclora_utils). `repo_id` is attribution; `download_include` is inert on the mirror lane and kept so the entry stays shaped like every other.",
+ "key": "ic_upscale_x2",
+ "kind": "optional",
+ "name": "Upscale x2 IC-LoRA (LTX-2.5, official)",
+ "blurb": "Optional, 0.3 GB. Powers the Upscale x2 mode - re-renders a clip (an H3 draft, say) at twice the size with real generated detail and keeps its sound. Mirrored on the Phosphene release, no HF token.",
+ "repo_id": "Lightricks/LTX-2.5-22b-IC-LoRA-Pixel-Spatial-Upscaler",
+ "local_dir": "mlx_models/loras/ic",
+ "size_gb": 0.33,
+ "mirror": {
+ "kind": "github-release",
+ "release_repo": "mrbizarro/Phosphene",
+ "tag": "weights-ltx25-v1",
+ "manifest_asset": "ic_upscale_x2__phosphene_release_manifest.json"
+ },
+ "files": [
+ "ltx-2.5-22b-ic-lora-pixel-spatial-upscaler-x2-1.0.safetensors",
+ "LICENSE-LTX-2.x-Community"
+ ],
+ "file_sizes": {
+ "ltx-2.5-22b-ic-lora-pixel-spatial-upscaler-x2-1.0.safetensors": 327322640
+ },
+ "download_include": [
+ "ltx-2.5-22b-ic-lora-pixel-spatial-upscaler-x2-1.0.safetensors",
+ "LICENSE-LTX-2.x-Community"
+ ],
+ "publish_scope": "files"
+ },
{
"_comment": "LTX-2.5 Q4. Built by us (scripts/convert_ltx_mlx.py -> scripts/quantize_ltx.py) from the official Lightricks bf16 release, not by dgrauet. Mirrored through a GitHub release rather than HuggingFace, so deep-verify reads sha256 from the in-pack phosphene_quant_manifest.json (verify_source 'manifest') instead of the HF checksum API — which is why that manifest is listed as a required file. temporal_upscaler and duration_head ship because 2.5 has them and they are tiny; the x1.5 spatial upscaler does not exist for 2.5.",
"_mirror_comment": "PUBLISHED 2026-08-12. `repo_id` names a HuggingFace repo that DOES NOT EXIST and never will — our HF token is read-only and this pack is our own quantisation of a gated upstream. It is kept only as the pack's stable identity string (the panel shows it, and `_expected_meta` never calls the HF API for a verify_source 'manifest' pack). The bytes come from the `mirror` block: GitHub release assets, sharded at 1.9 GB because the cap is 2 GiB, fetched + reassembled + sha256-verified by scripts/fetch_pack_release.py. `download_include` is inert on this lane (the release manifest is the allowlist) and is kept only so the entry stays shaped like every other.",
diff --git a/scripts/pinokio/ltx25_weights.sh b/scripts/pinokio/ltx25_weights.sh
index fc084ee..bb659d3 100644
--- a/scripts/pinokio/ltx25_weights.sh
+++ b/scripts/pinokio/ltx25_weights.sh
@@ -39,3 +39,10 @@ else
echo '=================================================================='
exit 1
fi
+
+# Upscale x2 adapter (0.3 GB, optional): the LTX-2.5 Pixel Spatial Upscaler
+# IC-LoRA behind Remix -> Upscale x2. Gated on the Hub, mirrored on the same
+# release. BEST-EFFORT: a miss must never fail the install - the panel offers
+# it in Settings -> Models and the mode refuses by name until it lands.
+$PY scripts/fetch_pack_release.py --repo-key ic_upscale_x2 \
+ || echo 'WARN: Upscale x2 adapter fetch failed - video still works; download it later from Settings -> Models.'
diff --git a/scripts/pinokio/ltx_checkout.sh b/scripts/pinokio/ltx_checkout.sh
index a06f012..bf00e78 100644
--- a/scripts/pinokio/ltx_checkout.sh
+++ b/scripts/pinokio/ltx_checkout.sh
@@ -39,7 +39,7 @@
# A tag is the only form of this reference that an upstream history rewrite
# cannot take away.
#
-# `v0.14.19+ltx25.6` on mrbizarro/ltx-2-mlx == v0.14.19 plus:
+# `v0.14.19+ltx25.7` on mrbizarro/ltx-2-mlx == v0.14.19 plus:
# - the LTX-2.5 port (versioned DiT config, duration head, Euler-ancestral
# sampler, the vendored Gemma 4 text tower, encoder keyed off the checkpoint)
# - unfused runtime LoRAs (c78cc71..3259338)
@@ -55,15 +55,18 @@
# conditioning tokens were rescaled and re-noised on every intermediate
# step, so a 2.5 i2v render composed the clip without ever seeing the
# supplied image and only the terminal step stamped it back in.
+# - ltx25.7: IC-LoRA `source_video=` — Upscale ×2 from the clip's own latent
+# (Stage 1 skipped, latent-upsampled, N-step control-aware refine) and the
+# 2.5 distilled schedules on the IC lane instead of the 2.3 constants.
#
-# The three packages declare `0.14.19+ltx25.6`, and `_LTX_EXPECTED_VERSION` in
+# The three packages declare `0.14.19+ltx25.7`, and `_LTX_EXPECTED_VERSION` in
# mlx_warm_helper.py must equal that string. Move the two together or the
# version-skew gate reports a permanent false alarm.
#
# To bump: retag on the fork, change LTX_PIN here, change the documented value
# in install.js, bump the three pyprojects AND _LTX_EXPECTED_VERSION, run
# `node scripts/check_ltx_pin.js`, smoke-test on dev, push.
-LTX_PIN="v0.14.19+ltx25.6"
+LTX_PIN="v0.14.19+ltx25.7"
LTX_FORK_URL="https://github.com/mrbizarro/ltx-2-mlx.git"
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
diff --git a/test_control_discoverability.py b/test_control_discoverability.py
index 18df3a0..1dd0d79 100644
--- a/test_control_discoverability.py
+++ b/test_control_discoverability.py
@@ -259,8 +259,9 @@ class TestSourceDerivedCanvasRidesTheEngineGrid(unittest.TestCase):
def test_make_job_shares_the_same_helper(self):
"""One rule, one function — or the day the grid changes, two of the
three lanes learn about it."""
- # one def + three call sites: make_job, Control, Colorize.
- self.assertEqual(PANEL_SRC.count("ltx_floor_canvas("), 4)
+ # one def + five call sites: make_job, Control, Colorize, Upscale ×2,
+ # and the H3 form's "LTX ×2" export note (same rule, same helper).
+ self.assertEqual(PANEL_SRC.count("ltx_floor_canvas("), 6)
class TestTheDocumentation(unittest.TestCase):
diff --git a/webapp/index.html b/webapp/index.html
index b9fb84d..e3782e2 100644
--- a/webapp/index.html
+++ b/webapp/index.html
@@ -394,6 +394,13 @@
LTX IC-LoRAs elsewhere recognises it here. -->
<button type="button" class="mode-chip pill-btn" data-remix="control" title="Union Control IC-LoRA — the render copies the motion, camera move, composition and pose of a clip you supply, while the prompt repaints the subject and scene. Feed it an ordinary video, or a pose / depth / canny sequence you already have.">Motion Control<span class="mc-sub sub">its motion → your scene</span></button>
<button type="button" class="mode-chip pill-btn" data-remix="restore" title="Colorize IC-LoRA — adds natural color to a black-and-white or desaturated clip.">Colorize<span class="mc-sub sub">B&amp;W clip → color</span></button>
+ <!-- Upscale ×2 — the LTX-2.5 Pixel Spatial Upscaler IC-LoRA. A
+ generative 2× enlarge: the source clip rides the reference
+ channel and the 2.5 base re-renders every pixel at twice the
+ canvas (up to this Mac's i2v cap). The natural partner of an H3
+ draft: H3 does the story and the sound at a small canvas, LTX
+ 2.5 does the pixels. Works on any clip in Outputs. -->
+ <button type="button" class="mode-chip pill-btn" data-remix="upscale" title="LTX Upscale — LTX-2.5 Pixel Spatial Upscaler IC-LoRA. Re-renders a clip at twice its size with real generated detail (not a filter). Made for H3 drafts, works on any clip.">LTX Upscale<span class="mc-sub sub">any clip → 2× sharper</span></button>
</div>
</div>
@@ -695,6 +702,41 @@
<div class="hint" style="margin-top:6px">Pick a black-and-white or washed-out clip. The prompt below describes the colors to paint in (e.g. "golden warm sunlight, blue sky, green grass"). Output matches the source's resolution + length. Runs on Q4 — no Q8 needed.</div>
</div>
+ <!-- Upscale ×2 (upscale) — source-video picker + one slider. The
+ LTX-2.5 Pixel Spatial Upscaler IC-LoRA re-renders the clip at
+ 2× (capped at this Mac's i2v canvas; frames + prompt come from
+ the source and its sidecar). The slider is the IC reference
+ strength: 1.0 keeps the shot exactly, lower lets LTX
+ re-imagine detail (faces, textures) more freely. Audio from the
+ source is carried over. Shown/hidden by updateDerived() when
+ currentMode === 'upscale'. -->
+ <div class="mode-only" id="upscaleSection">
+ <h2>Clip to upscale</h2>
+ <select id="upscaleSrcSelect" onchange="document.getElementById('upscale_source_path').value=this.value"></select>
+ <input name="upscale_source_path" id="upscale_source_path" placeholder="/path/to/draft.mp4" style="margin-top:6px">
+ <!-- Presets, not a slider: the number (keep_shot) maps server-side
+ to how the render starts — Faithful/Balanced refine the clip's
+ own latent for 1/2 steps, Re-imagine is the adapter's full
+ re-render from noise. Times measured on an M4 Max for a 5 s
+ 640×384 draft → 1280×768. -->
+ <div class="pill-group cols-3" id="upscalePresetGroup" style="margin-top:10px">
+ <button type="button" class="pill-btn active" data-keep="1.0" onclick="setUpscalePreset(this)"
+ title="Sharp generated detail on the clip's own frames — the face stays hers, expressions can shift a touch. About 5.5 min per 5 s on an M4 Max.">
+ <span>Faithful</span><span class="sub">sharp, face stays</span>
+ </button>
+ <button type="button" class="pill-btn" data-keep="0.8" onclick="setUpscalePreset(this)"
+ title="Same recipe with one step less — a touch softer, noticeably faster. About 3.75 min per 5 s on an M4 Max.">
+ <span>Quick</span><span class="sub">a touch softer</span>
+ </button>
+ <button type="button" class="pill-btn" data-keep="0.4" onclick="setUpscalePreset(this)"
+ title="Full re-render at 2× from the clip as reference — the sharpest detail; faces drift from the draft. About 7 min per 5 s on an M4 Max.">
+ <span>Re-imagine</span><span class="sub">sharpest, faces drift</span>
+ </button>
+ </div>
+ <input type="hidden" name="keep_shot" id="keep_shot" value="1.0">
+ <div class="hint" style="margin-top:6px">Doubles the clip's size with generated detail, not a filter — an H3 draft comes out with LTX-2.5 pixels and keeps its sound. Length and (if empty) the prompt come from the source (up to 0.3 s may be trimmed at the tail to fit LTX's frame grid). Output is capped at this Mac's Image-to-Video canvas. Times on the presets are for a 5 s 640×384 draft on an M4 Max (Faithful ≈ 5.5 min, Quick ≈ 3.75, Re-imagine ≈ 6.5); slower Macs take longer in proportion.</div>
+ </div>
+
<!-- Ingredients (multi-reference) — the flagship IC-LoRA. Pick 2-8
subject images (a face + a prop + a location); they're tiled
into one reference sheet and the model composes them into a new
@@ -1463,7 +1505,7 @@
<div class="cz-label">Upscale
<span class="cz-label-hint">after the render · no crop</span>
</div>
- <div class="pill-group cols-3" id="h3UpscaleGroup">
+ <div class="pill-group cols-4" id="h3UpscaleGroup">
<button type="button" class="pill-btn" data-h3-upscale="off"
title="Ship the tier's native canvas with no post-process.">
<span>Native</span><span class="sub">as rendered</span>
@@ -1476,6 +1518,13 @@
title="Scale to 1920×1080 — no crop, no distortion. A 16:9 tier scales clean; anything else is padded.">
<span>1080p fit</span><span class="sub">scale + pad</span>
</button>
+ <!-- "H3 mind, LTX pixels": the draft ships native and an Upscale
+ ×2 job (LTX-2.5 Pixel Spatial Upscaler) is queued behind it.
+ Not a resize — generated detail, the draft's own sound. -->
+ <button type="button" class="pill-btn" data-h3-upscale="ltx_x2"
+ title="Queue an Upscale ×2 pass (LTX-2.5 Pixel Spatial Upscaler) right after the draft: twice the size with generated detail, keeps the sound. Faithful preset — the face and lips stay as drafted.">
+ <span>LTX ×2</span><span class="sub">generated detail</span>
+ </button>
</div>
<!-- What THIS tier + THIS export target will actually do: "pure
1.25× scale, no bars" or "12:7 fits to 1234×720 — 23 px bars
@@ -3259,6 +3308,16 @@
</svg>
<span class="po-act-label">Extend</span>
</button>
+ <!-- Upscale ×2 — hands this clip to the LTX-2.5 Pixel Spatial
+ Upscaler lane (Remix → Upscale ×2). Video-only; the natural
+ next step after an H3 draft. -->
+ <button id="useAsUpscaleBtn" class="po-act" type="button"
+ onclick="useAsUpscaleSource()" title="LTX Upscale — re-render this clip at 2× with LTX-2.5 (generated detail, keeps the sound)">
+ <svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
+ <path d="M3 13 L13 3 M8 3 L13 3 L13 8 M3 8 L3 13 L8 13" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
+ </svg>
+ <span class="po-act-label">LTX Upscale</span>
+ </button>
<!-- Pull a good accident from the Video tab into a film. Hidden until
at least one board exists on disk — nothing about Storyboard shows
up in the rest of the panel until there is a film to show it for. -->
diff --git a/webapp/js/boot.js b/webapp/js/boot.js
index eca8593..5bd2712 100644
--- a/webapp/js/boot.js
+++ b/webapp/js/boot.js
@@ -264,7 +264,7 @@ window._liveStagePendingOutput = null;
// REMIX_MODES — the IC-LoRA reference tools grouped under the single "Remix"
// mode pill. These are REAL backend modes (the #mode field + the dispatch see
// them); "remix" itself is a UI-only pseudo-mode that resolves to one of these.
-globalThis.REMIX_MODES = ['ingredients', 'control', 'restore'];
+globalThis.REMIX_MODES = ['ingredients', 'control', 'restore', 'upscale'];
// Main right-pane gallery kind filter (All / Videos / Photos). Independent
// of `filterMode` (which is visible/hidden) and independent of
diff --git a/webapp/js/characters.js b/webapp/js/characters.js
index 4866ebf..2ef9151 100644
--- a/webapp/js/characters.js
+++ b/webapp/js/characters.js
@@ -2783,6 +2783,7 @@ function updateCustomizeSummary() {
// actually folded away on H3 is the export target, so that is what it says.
if (up === 'fit_720p') parts.push('720p export');
else if (up === 'fit_1080p') parts.push('1080p export');
+ else if (up === 'ltx_x2') parts.push('LTX ×2 after');
else parts.push('native export');
el.textContent = parts.join(' · ');
return;
diff --git a/webapp/js/queue.js b/webapp/js/queue.js
index 8ff8ba1..fb5b1a6 100644
--- a/webapp/js/queue.js
+++ b/webapp/js/queue.js
@@ -930,6 +930,11 @@ function updateDerived() {
// drive the output, but the prompt + seed still apply).
const _restoreSection = document.getElementById('restoreSection');
if (_restoreSection) _restoreSection.classList.toggle('show', currentMode === 'restore');
+ // Upscale ×2 — its own source picker + "keep the shot" slider. The source
+ // drives dims (×2, capped) and length, so the sizing/quick-metrics rows
+ // are hidden below, like Extend.
+ const _upscaleSection = document.getElementById('upscaleSection');
+ if (_upscaleSection) _upscaleSection.classList.toggle('show', currentMode === 'upscale');
// Ingredients (multi-reference) — its own multi-image picker + action field.
// Like Colorize it KEEPS the sizing/quick-metrics rows (frames apply; the
// sheet drives the rest).
@@ -949,12 +954,13 @@ function updateDerived() {
maybeScaleTouchedKeyframeTiming(window._kfTimingLastFrames, f);
}
syncKeyframeTiming();
- document.getElementById('sizingSection').classList.toggle('show', currentMode !== 'extend');
+ document.getElementById('sizingSection').classList.toggle('show', currentMode !== 'extend' && currentMode !== 'upscale');
// quickMetricsRow (Duration / Frames / Seed) doesn't apply to Extend
// (extend_seconds drives the new content; the source video provides
- // the rest). Hide it in extend, show otherwise.
+ // the rest) nor to Upscale ×2 (source dims ×2 + source length). Hide it
+ // there, show otherwise.
const qmr = document.getElementById('quickMetricsRow');
- if (qmr) qmr.classList.toggle('show', currentMode !== 'extend');
+ if (qmr) qmr.classList.toggle('show', currentMode !== 'extend' && currentMode !== 'upscale');
document.getElementById('audioSection').classList.toggle('show', mode === 'i2v_clean_audio');
// I2V audio source picker (Advanced) — only relevant in I2V flow.
// In T2V/Extend/FFLF the model generates audio jointly; there's nothing
@@ -2429,6 +2435,9 @@ async function poll() {
// Colorize (restore) source dropdown — same video-only list as Extend.
const restoreSel = document.getElementById('restoreSrcSelect');
if (restoreSel) restoreSel.innerHTML = _videoOpts;
+ // Upscale ×2 source dropdown — same video-only list.
+ const upscaleSel = document.getElementById('upscaleSrcSelect');
+ if (upscaleSel) upscaleSel.innerHTML = _videoOpts;
// Control (Union) control-video dropdown — same video-only list.
const controlSel = document.getElementById('controlSrcSelect');
if (controlSel) controlSel.innerHTML = _videoOpts;
@@ -3228,6 +3237,10 @@ function selectOutput(path, options) {
// about the next render and says nothing about this clip.
const outIsH3 = !!(o && o.engine === 'h3');
if (useExtBtn) useExtBtn.style.display = (isPhoto || outIsH3) ? 'none' : '';
+ // Upscale ×2 is video-only but engine-agnostic: an H3 draft is exactly the
+ // clip it was built for.
+ const useUpBtn = document.getElementById('useAsUpscaleBtn');
+ if (useUpBtn) useUpBtn.style.display = isPhoto ? 'none' : '';
if (animBtn) animBtn.style.display = isPhoto ? '' : 'none';
// "Finish at …" — for a completed H3 render that has a higher canvas to be
// committed at. Decided from o.engine / o.h3_tier (both sidecar-derived,
@@ -3432,6 +3445,28 @@ function useAsExtendSourcePath(path) {
document.querySelector('aside.form-pane').scrollTop = 0;
}
function useAsExtendSource() { if (!activePath) return alert('Pick an output first.'); useAsExtendSourcePath(activePath); }
+// Upscale ×2 — same hand-off shape as Extend: switch to the Remix tool,
+// point the picker at this clip, scroll the form to the top.
+function useAsUpscaleSourcePath(path) {
+ setMode('upscale');
+ const inp = document.getElementById('upscale_source_path');
+ if (inp) inp.value = path;
+ const sel = document.getElementById('upscaleSrcSelect');
+ if (sel) sel.value = path;
+ updateDerived();
+ const pane = document.querySelector('aside.form-pane');
+ if (pane) pane.scrollTop = 0;
+}
+function useAsUpscaleSource() { if (!activePath) return alert('Pick an output first.'); useAsUpscaleSourcePath(activePath); }
+// Upscale ×2 presets — one hidden number (keep_shot) the server maps to how
+// the render starts; the pills are the only thing the user touches.
+function setUpscalePreset(btn) {
+ const v = (btn && btn.dataset && btn.dataset.keep) || '1.0';
+ const inp = document.getElementById('keep_shot');
+ if (inp) inp.value = v;
+ document.querySelectorAll('#upscalePresetGroup .pill-btn').forEach(b =>
+ b.classList.toggle('active', b === btn));
+}
async function loadParams() {
if (!activePath) return;
@@ -4555,7 +4590,7 @@ Object.assign(globalThis, {
retryJob, renderCarousel, findOutputByPath, stageMayAutoSelectOutput,
selectOutput, openExpandLightbox, closeExpandLightbox, phosToast,
animateActive, hide, openOutputsFolder, hideActive,
- useAsExtendSource, loadParams, _flashActionDone, closeOutputInfoModal,
+ useAsExtendSource, useAsUpscaleSource, useAsUpscaleSourcePath, setUpscalePreset, loadParams, _flashActionDone, closeOutputInfoModal,
togglePause, openBatch, closeBatch, queueBatch,
// inline-handler targets: generated markup resolves these through the
// global scope (the v4.9.0 regression, PR #69)