diff --git a/README.md b/README.md index 0d8a6da..b83c011 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ ready-to-run generation package: - `segments.txt` — N segment prompts, joined by `|`. The video creator node splits the total length evenly across segments (`N = max(1, round(total_seconds / 10))`) and generates them one by one. Default format is full-reference (ref2va); FL2VA - (first–last frame) is an opt-in alternative. + (first–last frame) and segmented (one `segment-N/segment.txt` file per segment with + `@PictureN`/`@AudioN` tokens) are opt-in alternatives. - `Image-N.json` — one 16:9 character-sheet text-to-image prompt per character that has no user-provided image reference, consumed one at a time by a ComfyUI workflow. - `Segment-img-N.json` — one 16:9 first-frame image prompt per segment, rendered by @@ -22,6 +23,7 @@ ready-to-run generation package: | `SKILL.md` | Skill entry point: triggers, mode selection, pipeline, output contract, validation checklist | | `references/ref2va-segment-format.md` | Authoritative per-segment format for the default mode (sections, labels, shots, audio template) | | `references/fl2va-segment-format.md` | The opt-in FL2VA first–last frame video prompt format | +| `references/segmented-output-format.md` | The opt-in segmented layout: one `segment-N/segment.txt` per segment with `@PictureN`/`@AudioN` tokens, otherwise identical to ref2va | | `references/t2i-character-sheet.md` | Character-sheet caption rules (four-panel photorealistic turnaround) and the two-key JSON contract | | `references/frame-image-prompts.md` | Per-segment first/last frame image prompt rules (`Segment-img-N.json`) | | `references/worked-example.md` | Complete end-to-end example, including the audio (singing) and FL2VA variants | @@ -34,10 +36,12 @@ ready-to-run generation package: 2. Give the agent a vague scene prompt and the total video length in seconds, plus optionally: song lyrics, an audio file mention (e.g. "use midnight.mp3"), per-character image references, style hints, and — only if wanted — an explicit - request for FL2VA / first-last frame mode. + request for FL2VA / first-last frame mode or segmented one-file-per-segment + output with `@PictureN`/`@AudioN` references. 3. The agent writes `segments.txt`, `Image-N.json` for characters lacking references, `Segment-img-N.json` (and `Segment-img-N-last.json` in FL2VA mode), and `image-map.txt` into the project folder. 4. Verify before use: `python3 scripts/validate_outputs.py --segments segments.txt --expected-n [--dir .] [--lyrics-file lyrics.txt]` — add - `--mode fl2va --total-seconds ` for FL2VA runs. + `--mode fl2va --total-seconds ` for FL2VA runs, or + `--mode segmented --segments-dir ` for segmented runs. diff --git a/SKILL.md b/SKILL.md index 4431a6b..e507cd3 100644 --- a/SKILL.md +++ b/SKILL.md @@ -1,6 +1,6 @@ --- name: mm-prompter -description: Writes multi-segment ref2va video prompts plus T2I character-sheet prompts and per-segment first-frame image prompts from a vague scene idea and a total video length in seconds. Use when the user gives a rough video/scene concept (optionally with song lyrics or an audio file name) and wants numbered video-generation segments joined by "|", character sheets as Image-N.json for characters that lack an image reference, Segment-img-N.json frame prompts, and an image-map.txt manifest. Optional opt-in FL2VA mode adds last-frame prompts and first-last video prompts. +description: Writes multi-segment ref2va video prompts plus T2I character-sheet prompts and per-segment first-frame image prompts from a vague scene idea and a total video length in seconds. Use when the user gives a rough video/scene concept (optionally with song lyrics or an audio file name) and wants numbered video-generation segments joined by "|", character sheets as Image-N.json for characters that lack an image reference, Segment-img-N.json frame prompts, and an image-map.txt manifest. Optional opt-in FL2VA mode adds last-frame prompts and first-last video prompts. Optional opt-in segmented mode writes one segment-N/segment.txt file per segment using @PictureN/@Audio1-style @-references instead of the joined file. --- # MM Prompt Creator @@ -10,8 +10,9 @@ generation package: 1. `segments.txt` — N segment prompts, joined by `|`. The downstream video creator node splits the total length evenly across segments and generates them one by one. - Default format is full-reference (ref2va); FL2VA (first–last frame) is an opt-in - alternative (see Mode selection). + Default format is full-reference (ref2va); FL2VA (first–last frame) and segmented + (one `segment-N/segment.txt` file per segment with `@PictureN`/`@AudioN` tokens) + are opt-in alternatives (see Mode selection). 2. `Image-N.json` — one 16:9 character-sheet text-to-image prompt per character that has no user-provided image reference. Consumed one at a time by a ComfyUI workflow. 3. `Segment-img-N.json` — one 16:9 first-frame image prompt per segment (both modes); @@ -36,6 +37,13 @@ example (including the audio and FL2VA variants) is in `references/worked-exampl character sheets. The sheets are still generated: they feed the image side, which renders the first/last frames with consistent characters. If the user's wording is ambiguous, stay in ref2va mode; never mix the two formats in one run. +- **Segmented (opt-in).** Switch when the user asks for each segment as its own + `segment.txt` file or for `@Picture1` / `@Audio1`-style references. This is an + adaptation of ref2va defined in `references/segmented-output-format.md`: the + segment content follows `references/ref2va-segment-format.md` unchanged, but each + segment is written to its own `segment-N/segment.txt` file (no `segments.txt`, no + `|` separators) and reference tokens are written as `@PictureN` / `@AudioN`; + `` stays unchanged. Never mix formats in one run. ## Inputs @@ -119,14 +127,19 @@ User-supplied files keep their filenames; generated sheets are always `Image-N.j The manifest never lists frame files — `Segment-img-N` numbering follows segments, not subjects. -**Step 9 — Assemble `segments.txt`.** Strip each segment text, join with a single `|` -(no spaces added around it). Exactly n segments, exactly n−1 `|` characters, no -trailing separator, no extra headers or numbering. The `|` character must never appear -inside a segment's own text. +**Step 9 — Assemble the segment outputs.** ref2va/FL2VA: strip each segment text and +join with a single `|` (no spaces added around it). Exactly n segments, exactly n−1 +`|` characters, no trailing separator, no extra headers or numbering; the `|` +character must never appear inside a segment's own text. Segmented: instead write +each segment to its own `segment-N/segment.txt` file per +`references/segmented-output-format.md` — no joined file, no `|` anywhere, and +`` / `