Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

A film script's continuity row can be set in a single shot, replacing the film-wide row for that...

Bowen Xue452f579817eb
diff --git a/freevideo_engine/agent/drama.py b/freevideo_engine/agent/drama.py
index 904e3c0..56243c7 100644
--- a/freevideo_engine/agent/drama.py
+++ b/freevideo_engine/agent/drama.py
@@ -153,6 +153,12 @@ def check(play, single_seconds=BLOCK_SECONDS):
for field in ('action', 'idea', 'prompt', 'camera', 'framing', 'sound', 'music'):
if field in shot:
validate(specs._text, shot[field], path + '/' + field, 20000, empty=True)
+ if 'continuity' in shot:
+ if not isinstance(shot['continuity'], dict):
+ problem(path + '/continuity', 'must be an object of text by character name, and optionally "set"')
+ else:
+ for key, text in shot['continuity'].items():
+ validate(specs._text, text, path + '/continuity/' + str(key).replace('~', '~0').replace('/', '~1'), 20000, empty=True)
for field, low, high in (('takes', 1, 8), ('seed', 0, specs.MAX_SEED)):
if field in shot:
validate(specs._int, shot[field], path + '/' + field, low, high)
@@ -333,9 +339,11 @@ def prompt(play, shot):
for key in people if characters[key].get('look')]
def continuity():
- """The film's table of clothes, props and places, the rows of the people in this shot (and 'set'), in every shot."""
- table = play.get('continuity')
- if not isinstance(table, dict):
+ """The film's table of clothes, props and places, the rows of the people in this shot (and 'set'), in every shot.
+ A row written in the shot itself replaces the film's row of that person (or 'set') for this shot only."""
+ table = {**(play.get('continuity') if isinstance(play.get('continuity'), dict) else {}),
+ **(shot.get('continuity') if isinstance(shot.get('continuity'), dict) else {})}
+ if not table:
return []
rows = ['%s: %s.' % (_cap(characters[key].get('name') or key), table[key].strip().rstrip('.'))
for key in people if isinstance(table.get(key), str) and table[key].strip()]
diff --git a/freevideo_engine/agent/production.py b/freevideo_engine/agent/production.py
index f58c7cf..5229df8 100644
--- a/freevideo_engine/agent/production.py
+++ b/freevideo_engine/agent/production.py
@@ -73,7 +73,7 @@ def _compiled(play, shot):
# What a screenplay shot and a line may say; anything else would be ignored without a word.
SHOT_FIELDS = ('id', 'seconds', 'action', 'idea', 'prompt', 'camera', 'framing', 'sound', 'music', 'takes', 'seed',
- 'continue', 'first', 'references', 'cast', 'lines', 'cuts')
+ 'continue', 'first', 'references', 'cast', 'lines', 'cuts', 'continuity')
LINE_FIELDS = ('who', 'line', 'how', 'language')
diff --git a/freevideo_engine/agent/skill/freevideo/references/film-script.txt b/freevideo_engine/agent/skill/freevideo/references/film-script.txt
index 01646cd..26a1930 100644
--- a/freevideo_engine/agent/skill/freevideo/references/film-script.txt
+++ b/freevideo_engine/agent/skill/freevideo/references/film-script.txt
@@ -22,7 +22,7 @@ Example: Beat 2, the kitchen. Mia stands at the sink, left of frame, back to the
## Continuity across shots
-- Clothes, hair, props and time of day are fixed for the whole film. Write them once and copy them into every shot.
+- Clothes, hair, props and time of day that stay the same are written once, in the film's continuity table; the prompt carries that row in every shot. A state that changes during the film (a scar that appears, a lantern that goes out, a bandage) is written in the shot where it holds, as that shot's own continuity row for the person: it replaces the table's row for that shot only. Do not put both states in the table, and keep a changing state out of the person's look in the cast as well; every shot would show both.
- A new shot starts from what happened, not from the previous last frame: someone arrives, looks, answers. Say where everyone stands at the start.
- A continuous action across two beats stays in one shot.
- If the people in one scene look alike, give each a distinct colour of clothing so they are not swapped.