track-gate: plain text is the primary prompt_override form (user-verified) - the input splits 'scene1 | scene2 | scene3' on pipes with no JSON: parse_override_segments, even slices of the editor's total_length, trailing | a no-op, TYPE t2v; [s-e,type] and @mediaN are text-path extras, <Picture N> is JSON-only; schema doc now leads with the text form and demotes the JSON to per-segment control; wiring doc 'two forms' section; merge writes prompt_override.txt for zero-media equal-duration stories; suite 34/34
This commit is contained in:
parent
1473abcbd2
commit
e3e66dd628
@ -301,12 +301,21 @@ attaches the wrong image), and the track locks.
|
||||
|
||||
### 5A — Default: the `prompt_override` paste
|
||||
|
||||
**Default paste: plain text, no JSON.** For zero-media stories with equal scene lengths,
|
||||
deliver `prompt_override.txt` — the scene prompts joined with ` | ` on one line (the merge
|
||||
writes it next to the JSON). The input splits plain text on pipes: one scene per chunk,
|
||||
the editor's existing `total_length` divided evenly, a trailing `|` harmless, TYPE renders
|
||||
as t2v (`track-schema.md` "plain text form" — proven against the pack's parser). The JSON
|
||||
payload below is the OPTION for per-segment durations, continuity modes, locks or
|
||||
`<Picture N>` media tokens.
|
||||
|
||||
`prompt_override.json` is what the user pastes into the **multitrack editor node's
|
||||
`prompt_override` input** (`easy multiTrackEditor`). It is minimal by design — the parser
|
||||
requires only `type` and `prompts`; optional keys appear only when non-default (duration is
|
||||
SECONDS, `generation_type` defaults to `r2v` in the pack's code). It is self-contained: one
|
||||
prompt per clip, media reference tokens inside the prompts, and no frame fields anywhere.
|
||||
Deliver it with these instructions:
|
||||
`prompt_override` input** (`easy multiTrackEditor`) when that per-segment control is
|
||||
needed. It is minimal by design — the parser requires only `type` and `prompts`; optional
|
||||
keys appear only when non-default (duration is SECONDS, `generation_type` defaults to
|
||||
`r2v` in the pack's code). It is self-contained: one prompt per clip, media reference
|
||||
tokens inside the prompts, and no frame fields anywhere. Deliver it with these
|
||||
instructions:
|
||||
|
||||
1. In the editor node set `format` to `MiniMax` (the payload is parsed as MiniMax only in
|
||||
that format).
|
||||
@ -315,8 +324,9 @@ Deliver it with these instructions:
|
||||
`video`. The `<Picture N>` / `<Audio N>` / `<Video N>` tokens resolve against those
|
||||
input lists positionally. With an empty inventory (`[]`, pure t2v) nothing gets wired —
|
||||
the editor demands no media inputs at all.
|
||||
3. Select the `prompt_override` widget, clear it, paste the whole one-line JSON. The editor
|
||||
rebuilds the task track: one clip per prompt, back-to-back, durations as specified.
|
||||
3. Select the `prompt_override` widget, clear it, paste the one-line plain text
|
||||
(`prompt_override.txt`) or the one-line JSON payload. The editor rebuilds the task
|
||||
track: one clip per prompt/pipe-chunk, back-to-back, durations as specified.
|
||||
4. **Rendering walks the timeline through `easy multiTrackTaskOutput` — and that node
|
||||
outputs ONE task segment per pass, selected by its `task_index` int input (default 0 =
|
||||
only the FIRST clip).** A workflow whose `task_index` stays 0 renders only the first
|
||||
|
||||
@ -219,6 +219,21 @@ def _main(argv: list[str]) -> int:
|
||||
override_path.write_text(
|
||||
json.dumps(override, ensure_ascii=True, separators=(",", ":")) + "\n",
|
||||
encoding="utf-8")
|
||||
# Plain-text form of the same payload: the prompt_override input splits on '|'
|
||||
# with no JSON at all (parse_override_segments -> one even segment per part).
|
||||
# Only valid with zero media — <Picture N>/<Audio N>/<Video N> tokens are
|
||||
# JSON-only; the text path understands only @imageN/@audioN/@videoN. And only
|
||||
# valid for EQUAL row durations: the text form divides total_length evenly.
|
||||
uses_media = bool(
|
||||
outline["_roles"].get("master_audio")
|
||||
or outline["_roles"].get("reference_video")
|
||||
or any(row.get("images") for row in outline["rows"])
|
||||
)
|
||||
equal_durations = len({float(row["duration_seconds"]) for row in outline["rows"]}) == 1
|
||||
text_path = None
|
||||
if not uses_media and equal_durations:
|
||||
text_path = out_path.parent / "prompt_override.txt"
|
||||
text_path.write_text(" | ".join(override["prompts"]) + "\n", encoding="utf-8")
|
||||
prompts = len(override["prompts"])
|
||||
total_s = sum(float(row["duration_seconds"]) for row in outline["rows"])
|
||||
print(f"OVERRIDE OK: {prompts} prompts, duration {override.get('duration', '10 (default)')}, "
|
||||
@ -226,8 +241,11 @@ def _main(argv: list[str]) -> int:
|
||||
f"({override_path.stat().st_size} chars, one line)")
|
||||
print(f"PLAN OK: {_summary(plan)}")
|
||||
print(f"wrote {out_path} and {out_path.parent / 'track_data.json'}")
|
||||
print("deliver: paste prompt_override.json into the multitrack editor's "
|
||||
"prompt_override input (format MiniMax)")
|
||||
if text_path:
|
||||
print(f"PLAIN TEXT OK: wrote {text_path} (scenes joined by ' | ', one line — "
|
||||
f"the input needs no JSON for zero-media stories)")
|
||||
print("deliver: paste prompt_override.txt (plain text) or prompt_override.json "
|
||||
"into the multitrack editor's prompt_override input (format MiniMax)")
|
||||
print("NOTE: easy multiTrackTaskOutput renders ONE task segment per pass "
|
||||
"(task_index, default 0 = first clip only).")
|
||||
print(" - all clips: use the pack's example_workflows/MinimaxH3_ForLoop_MultiShot.json "
|
||||
|
||||
@ -474,7 +474,44 @@ python3 scripts/patch_workflow.py inspect RESULT.json
|
||||
|
||||
---
|
||||
|
||||
## prompt_override — the paste payload (format MiniMax)
|
||||
## prompt_override — plain text form: `scene1 | scene2 | scene3` (the simple default)
|
||||
|
||||
The `prompt_override` input does not require any JSON. Paste plain text — one scene per
|
||||
pipe-separated chunk:
|
||||
|
||||
```
|
||||
<scene 1 text> | <scene 2 text> | <scene 3 text>
|
||||
```
|
||||
|
||||
The editor's execute (`nodes/basic.py`): a non-JSON `prompt_override` with a value goes to
|
||||
`build_multitrack_data_from_prompt_override` → `parse_override_segments`
|
||||
(`utils/prompt_override.py`), which splits on `|`, strips each part and drops empties —
|
||||
one task segment per part, a trailing `|` is a no-op. Proven by executing the pack's code
|
||||
(sandbox `scripts/prove_plain_text_override.py`):
|
||||
|
||||
- Frames: the editor's existing `total_length` (its track_data / length input) is divided
|
||||
EVENLY across the parts — there are no per-segment durations in this form. 720 total,
|
||||
3 parts → [0-240] [240-480] [480-720].
|
||||
- No pipe at all = ONE segment spanning the whole timeline (the "one giant clip" trap).
|
||||
- Task type: parts default to `flf` → task_mode `default` → TaskOutput TYPE `t2v`.
|
||||
- Optional per-part extras (inside the part text):
|
||||
- `[s-e]` frame ranges, seconds form `[1.5s-3s]` (4-frame quanta), optional type suffix
|
||||
`[0-240,r2v]` → that segment becomes task_mode `ref` / TYPE `r2v` (other types:
|
||||
`flf`, `fmlf`, `ref`, `l2v`, `v2v`, `i2v`, `rv2v`, `vi2v`). With explicit ranges the
|
||||
timeline length becomes the last end + 1.
|
||||
- `@image1` / `@audio1` / `@video1` attach the editor's matching media input slots
|
||||
positionally. The `<Picture N>` bracket form is NOT parsed in this path — it stays
|
||||
literal text; only the JSON payload understands it.
|
||||
- Continuity: parts become independent segments; there is no `continuity_mode` in the
|
||||
text form (context joins are a JSON/TRACK_DATA feature).
|
||||
|
||||
Use this form when the scenes share one length and t2v (or per-part `[s-e,type]`) is
|
||||
enough. Use the JSON payload below only for per-segment durations, continuity modes,
|
||||
locks or `<Picture N>` media tokens.
|
||||
|
||||
---
|
||||
|
||||
## prompt_override — JSON payload form (optional: per-segment durations, modes, locks)
|
||||
|
||||
The `easy multiTrackEditor` node has an optional `prompt_override` input. When the editor's
|
||||
`format` is `MiniMax` and the pasted value is a `minimax_prompt_override` JSON payload, the
|
||||
|
||||
@ -21,17 +21,22 @@ Side facts (same node, verified in source):
|
||||
- `easy multiTrackInfoOutput` (tracks_info in) exposes `TASK_COUNT` = number of task
|
||||
segments — 3 for the Sam payload. Also WIDTH/HEIGHT/TOTAL_FRAMES/FPS.
|
||||
|
||||
## The prompt_override input requires the `type` field (proven)
|
||||
## The prompt_override input takes TWO forms (proven)
|
||||
|
||||
`MultiTrackEditor.execute` (`nodes/basic.py` L1949-1957): with `format = "MiniMax"`
|
||||
it calls `is_minimax_prompt_override(prompt_override)` FIRST. Only a payload with
|
||||
`"type": "minimax_prompt_override"` and a `prompts` list passes
|
||||
(`utils/prompt_override.py` `parse_minimax_prompt_override`). Any other non-empty
|
||||
value — including a full TRACKS_INFO JSON — falls to the `|`-text parser, which
|
||||
treats the ENTIRE string as one prompt: one segment 0..479 whose `text` is the
|
||||
literal JSON. Proven by running the repo's parser on the captured workflow
|
||||
(`scripts/prove_relay_chain.py` STEP A). So: paste the compact payload (with the
|
||||
type field) into `prompt_override`; full TRACKS_INFO belongs only in `track_data`.
|
||||
`MultiTrackEditor.execute` (`nodes/basic.py` L1954-1957): with `format = "MiniMax"` it
|
||||
calls `is_minimax_prompt_override(prompt_override)` FIRST. Only a payload with
|
||||
`"type": "minimax_prompt_override"` and a `prompts` list takes the JSON path
|
||||
(`utils/prompt_override.py` `parse_minimax_prompt_override`). Anything else with a value
|
||||
falls to the generic `|`-text parser — which is a legitimate form in its own right, not
|
||||
just a failure mode (`track-schema.md` "plain text form"):
|
||||
|
||||
- Plain pipe text `scene1 | scene2 | scene3` → N task segments, evenly sliced over the
|
||||
editor's `total_length` (proven by executing the pack's code,
|
||||
`scripts/prove_plain_text_override.py`). This is the simple default; no JSON needed.
|
||||
- A full TRACKS_INFO JSON contains no `|` → ONE segment whose prompt is the literal
|
||||
JSON dump (STEP A of `prove_relay_chain.py`): the garbage single-clip failure. So:
|
||||
paste plain text OR the minimal JSON payload into `prompt_override`; full TRACKS_INFO
|
||||
belongs only in `track_data`.
|
||||
|
||||
## Single-pass timeline render: task_index=-1 + prompt_format=promptRelay (short timelines only)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user