the e studios remix a memory palace of the mania · 38 styles · one point

The Librarian

The Librarian — parts catalog & cut assembler

Runbook step 7, built & verified 2026-07-08. Replaces hand-maintained concat.txt files.

What it is

Two scripts in C:\AI turn the 63 loose render parts into a queryable library and

make new cuts a one-line command.

each mp4's prompt metadata tag, and recovers full provenance per part. Writes

catalog.json. Provenance is deterministic, not guessed: the embedded

VHS_LoadImagesPath directory (sNNrM_c) gives source segment+run; the positive

CLIPTextEncode gives style+content; loader nodes give the model stack; the sampler

gives seed/steps/cfg. Recovered fields: segment, run, style, positive prompt, model,

lora+weight, controlnet type/strength/end, seed, steps, cfg, sampler, frames, fps,

resolution, duration, version.

order, remux the original source audio.

Files

Cut file schema (cuts/<name>.json)

{
  "name": "v1_full",
  "audio": "~/Downloads/e_studios_source.mp4",
  "parts": ["RUNTMP_00005", "RUNTMP_00006", "..."]
}

audio optional (defaults to the source). parts is an ordered list of part_ids;

each resolves to a path via catalog.json (fallback: OUTDIR/<id>.mp4).

Commands

python librarian.py --print                          # rebuild catalog.json + human table
python librarian.py --query segment=21               # filter catalog (no rescan): see a segment's version stack
python librarian.py --query style=ligne model=LTX    # ints match ==, strings match substring; combine freely
python assemble.py cuts/v1_full.json                 # build a cut
python assemble.py --from-concat v1full/concat.txt v1_full   # import a legacy concat -> cut json
python assemble.py --new-v1 v1_from_catalog          # regenerate the v1 EDL from catalog metadata alone
python assemble.py --swap v1_full v1_lignev4 seg21=LIGNE_V4_00001   # clone a cut, swap part(s), assemble
python librarian.py --gaps                           # per-segment version count; the re-render queue

--swap keys are segNN (must be unique in the cut) or an existing PART_ID; multiple pairs allowed

in one call (audition several upgrades at once). This IS the "new cut in seconds" loop:

--query to find the part → --swap to drop it in.

Verified

→ the concat.txt files are now redundant; the catalog is the source of truth.

How to make a new cut (the "in seconds" promise)

  1. Render a new part (any pipeline) → it lands in OUTDIR with its workflow embedded.
  2. python librarian.py → it appears in the catalog, provenance auto-recovered.
  3. Copy a cut json, swap the part_id for the segment you're replacing, assemble.py it.

e.g. to swap seg21 to the v4 ligne claire: replace RUNTMP_00030 with LIGNE_V4_00001.

Coverage notes

correctly outside the 38-segment scheme.

LTX-Video-2B. As cloud parts (Qwen/Wan) arrive with their own embedded or sidecar metadata,

extend parse_workflow/PREFIX_HINT in librarian.py.

Existing cuts (cuts/)

Note: v4 was rendered on seg21's bass-macro frames, so this is a "v1 + ligne v4 upgrade"

demonstration at seg21, not the post-swap casting.

seg09 = LIGNE_S09_00001 (ligne claire Palantir, wordmark legible), seg21 = CONSTRUCT_S21_00001

(constructivist bass macros). The film as designed in E_CASTING.md, not as first-drafted.

Base for cloud upgrades → the maximal version.

Next (when wanted)

provenance is as rich as the ComfyUI ones.