Skip to content

Commit ddffc9d

Browse files
committed
Merge branch 'feat/601-4-restore-long-cost' into develop (#658)
2 parents 045edb6 + 4434ea6 commit ddffc9d

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

‎tests/test_catalog_structure.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,10 @@ def test_no_stale_entry_in_the_allowlist():
446446
# 2026-10-06), measured at 9_981: about 160 tokens, its tuned `padding` and
447447
# `gate_full`/`gate_zero` exposed beside `strength` and `crop_size` - the
448448
# catalog's only repair of one region of a clip, leaving the rest as it came.
449-
COMPACT_BUDGET = 10_000
449+
# Then to 10_050 for `templates/ltx2/restore-long`'s measured `cost` (#601,
450+
# stage #658, 2026-10-06), measured at 10_016: about 35 tokens, its total and
451+
# a `per_entry` rate over `windows`, so a longer source is quoted per window.
452+
COMPACT_BUDGET = 10_050
450453
FILTERED_BUDGET = 1_500
451454

452455

‎workflows/templates/ltx2/restore-long.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22
"id": "LTX2DeblurLong",
33
"description": "Restores sharpness to an out-of-focus source longer than one LTX-2.5 bucket by cutting it into overlapping windows, running restore-deblur's in-context pass on each, and blending them back into one video of exactly the source's length. 'window' (window_video) cuts window i of 'num_frames' frames, sharing 'overlap' frames with the one before; 'restore' regenerates each window in focus with the window attached as the IC-LoRA reference; 'join' (join_windows) blends each seam's 'overlap' frames on the 'curve' ramp and puts the source's own soundtrack back over the whole result, so the model's generated audio is discarded. 'windows' is a list of {name, index} entries, one per window, and must be exactly ceil(source_frames / (num_frames - overlap)) long, indexes 0 upward: read the source's frame count first with get_gallery_metadata('asset:...'). The defaults (121-frame windows, overlap 16, stride 105) take 3 windows for a source of 211 to 315 frames - about 9 to 13 s at 24 fps; 2 windows cover up to 210 frames, 4 up to 420. validate_workflow refuses a list of the wrong length when the source is an asset: or output: reference, naming the count it needs, before any GPU time. At most 32 windows (for_each's limit), about 140 s at these defaults. 'num_frames' is LTX's 8 * n + 1 bucket and is the window length, not the output's: the output is the source's frame count. A larger 'overlap' hides per-window drift in colour or detail better and costs more windows. Everything else - the trained 960x544 / 24 fps bucket, 'lora_scale', the dual-panel prompt, spatial defocus only - is restore-deblur's; set 'width'/'height' to the source's own size.",
44
"summary": "Sharpens out-of-focus footage longer than one bucket, a window at a time, joined back to the source's length.",
5+
"cost": [
6+
{
7+
"device": "cuda",
8+
"name": "RTX 3090",
9+
"vram_gb": 24,
10+
"minutes": 12.2,
11+
"per_entry": {
12+
"variable": "windows",
13+
"minutes": 1.56,
14+
"entries": 3
15+
}
16+
}
17+
],
518
"cost_drivers": [
619
"num_frames",
720
"width",

0 commit comments

Comments
 (0)