docs: replace motion-context chain with video-extend continue flow

This commit is contained in:
Benjiyaya
2026-08-29 05:30:18 +08:00
parent c4f2e284a7
commit 91cbaf1a44
2 changed files with 41 additions and 2 deletions
+17 -2
View File
@@ -75,7 +75,7 @@ The app walks a project through four stages — **Story, Assets, Script, Video**
- **Story:** describe your idea and **Draft Storyline** — this opens a project-linked chat in the Agents view with the prompt pre-filled, and the agent writes beats, characters, locations, and misc. items. Edit anything by hand before moving on.
- **Assets:** each character, location, and item has its own **Image prompt**. Pick a workflow and shared settings (width/height/etc.) at the top, then click Generate per entity to produce reference images on your ComfyUI. Regenerate any single entity without touching the others.
- **Script:** **Regenerate Script** also opens a project-linked Agents chat (pre-filled) to rewrite the per-scene script. Scenes link back to the characters and locations from the Story stage.
- **Video:** each scene gets a **Generate** button that queues a clip job on ComfyUI with the right prompt and reference images (plus optional video/audio file refs). Import a FirstMotion + NextMotion H3 pair to chain clips: clip 1 starts a motion, clips 2+ continue the last 22 frames and 1s of audio from the previous latent so the export stitch reads as one long take.
- **Video:** each scene gets a **Generate** button that queues a clip job on ComfyUI with the right prompt and reference images (plus optional video/audio file refs). Scenes marked **Continue from previous video** in Script extend the previous clip instead of cutting fresh — see [Continue from previous clip (video extend)](#continue-from-previous-clip-video-extend).
- **Film view:** once scenes have clips, **Export film** stitches them with ffmpeg: clips are normalized to 1080p at the **majority frame rate of the clips themselves** (24 fps clips export at 24 fps; mixed-rate projects conform to whichever rate most clips use), joined with 0.5s crossfades, and loudness-normalized into one final file.
- When everything is done the project is automatically marked **Completed**.
@@ -124,7 +124,6 @@ Input roles:
| `image` | `img` | Generic image input (ordered ref slot — see below) |
| `video` | `vid` | Video file input (`LoadVideo`) |
| `audio` | `sound`, `sfx` | Audio file input (`LoadAudio`) |
| `clipindex` | `clip_index` | H3 Motion Context Primitive INT (`Load` / `Save` in the title) |
| `seed` | — | Shared form |
| `duration` | `dur`, `length`, `seconds` | Scene duration (video jobs) |
@@ -149,6 +148,22 @@ For multi-reference workflows, generic `(Input:image)` inputs are filled in **no
- **Ref 1 / Ref 2 — leave them on "Choose asset…"** to auto-fill from the scene's characters (in scene order) then the location, with `<Subject N>` numbering matched to those slots. Picking an asset manually overrides just that slot (and you take over subject numbering for it).
- **Duration** auto-fills from the scene's estimated duration; edit it only when you want a different clip length.
### Continue from previous clip (video extend)
Long takes don't have to be one giant generation. Mark a scene **Continue from previous video** in the **Script** stage and instead of cutting a fresh clip, it extends the previous scene's clip as real continuation footage (the first scene can't use the toggle).
The **Video** stage enforces one requirement: the scene's workflow must have an input tagged `(Input:video)` (a `LoadVideo` node). Continue scenes on a workflow without one have Generate disabled with a warning.
When the workflow qualifies, a **clip source picker** appears on the continue scene:
- **Auto** (default) — the previous scene's clip is used, resolved when the job actually runs.
- **Upload file** — extend from any video you provide (a Playground upload).
- **From timeline** — pick a specific earlier scene's clip explicitly.
Auto is safe even when scenes are queued in one batch: Calliope's queue renders one job at a time, so by the time a continue scene runs, the scene before it has already rendered and its clip is picked up automatically.
The workflow pattern (per [kat3ri/ComfyUI-MiniMax-H3-Extend](https://github.com/kat3ri/ComfyUI-MiniMax-H3-Extend)) is a `LoadVideo (Input:video)` node feeding the MiniMax H3 extend patched nodes (`MiniMaxH3EncodeAVPatched` → `MiniMaxH3VideoExtendPatched`) with the `(Output:video)` node at the end. Recommended starting settings from that repo: `context_frames` **2**, `ref_spacing` **1–2**, `ref_decay` **0.3**, `ref_ramp` **3–4** (5–6 if the prior clip had heavy motion).
### 3. Export the workflow
In ComfyUI, use **Save (API Format)** — not the regular UI workflow graph format. Calliope only understands API Format JSON.
+24
View File
@@ -37,6 +37,30 @@ Film export no longer forces everything to 30 fps.
- The export progress message now reports the rate: **"Exporting film (24 fps)…"**.
- Everything else in the pipeline is unchanged: 1080p normalize → 0.5s crossfades → loudness normalize.
## Video continue: file-based extension (replaces latent chain)
Long clips now chain through **actual video files**, not ComfyUI latents. The old FirstMotion/NextMotion Motion Context chain is gone.
Removed:
- `(Input:clipindex)` role and its `clip_index` aliases — Motion Context Primitive INT nodes are no longer detected or filled.
- The FirstMotion/NextMotion pair mechanics: latent Save/Load wiring, the 22-frame Motion Context handoff, the ~0.92s duration trim, and the "First motion" / "Next motion" analyze labels.
- Last-frame ffmpeg extraction (`_apply_chain_from_prev`) and the `continue_motion` API field.
- `motion_role` no longer appears in workflow analyze.
Added:
- **Script stage:** per-scene **Continue from previous video** toggle (`chain_from_prev`; the first scene can't use it).
- **Video stage:** continue scenes require a workflow with an `(Input:video)` input — otherwise Generate is disabled with a warning. When valid, a clip source picker offers **Auto** (previous clip, default), **Upload file**, or **From timeline** (explicit earlier clip).
- **Enqueue:** resolution order is explicit value → nearest earlier scene's clip → `continue_source` payload for job-time resolution.
- **Worker:** `_resolve_continue_source` picks up the nearest earlier scene's clip at run time (safe for batch enqueues — the queue is concurrency-1), writes it into the `(Input:video)` node, and uploads it to ComfyUI. No ffmpeg involved.
Migration:
- Existing FirstMotion/NextMotion workflows keep working as **plain video workflows** if they have an `(Input:video)` node — mark later scenes "Continue from previous video" and pick the workflow.
- Workflows relying on `clipindex`-titled Motion Context nodes lose that auto-fill; re-tag the clip input with `(Input:video)`.
- For the H3 extend pattern, target [kat3ri/ComfyUI-MiniMax-H3-Extend](https://github.com/kat3ri/ComfyUI-MiniMax-H3-Extend): `LoadVideo (Input:video)` → MiniMax H3 encode/extend patched nodes → `(Output:video)`.
## Housekeeping
- Added `.gitignore` files inside `calliope-backend/` and `calliope-web/` (venv, caches, SQLite data, node_modules, build output) so each sub-folder is self-protecting in addition to the repo-root rules.