subject_definitions takes exactly three forms: no-image traits, binds-to-image, verbatim refmod
This commit is contained in:
parent
28f9b80c83
commit
c2559f0572
@ -70,7 +70,11 @@ otherwise. Copy the user's quoted speech EXACTLY into the right scene's `dialogu
|
|||||||
if the story has no quoted speech, every `dialogue` array stays `[]`. Only the last
|
if the story has no quoted speech, every `dialogue` array stays `[]`. Only the last
|
||||||
scene's beat may come to rest. The `subjects` array is the cast inventory: collect the
|
scene's beat may come to rest. The `subjects` array is the cast inventory: collect the
|
||||||
full head-to-toe look there once — when writing scenes it is spent by weaving it into
|
full head-to-toe look there once — when writing scenes it is spent by weaving it into
|
||||||
each scene's [Shot 1] body, never parked in subject_definitions.
|
each scene's [Shot 1] body, never parked in subject_definitions. If the story's script
|
||||||
|
carries a `characters:` block with refmod entries — `sam:&identity: <identity text>;
|
||||||
|
voice: <voice text>&` — copy the identity and voice text verbatim into that subject's
|
||||||
|
inventory string (the & marks are delimiters, never content); the scene turns must carry
|
||||||
|
them into subject_definitions untouched.
|
||||||
|
|
||||||
## Step 2 — Present the guide for approval (do not skip)
|
## Step 2 — Present the guide for approval (do not skip)
|
||||||
|
|
||||||
@ -110,7 +114,7 @@ Each fragment is exactly this shape:
|
|||||||
"duration_seconds": 15,
|
"duration_seconds": 15,
|
||||||
"prompt": [
|
"prompt": [
|
||||||
"subject_definitions:",
|
"subject_definitions:",
|
||||||
"<Subject 1> ...lean identity anchor: who they are, tied to their reference image...",
|
"<Subject 1> ...one of the three definition forms (see craft rules below)...",
|
||||||
"summary:",
|
"summary:",
|
||||||
"[reference generation]",
|
"[reference generation]",
|
||||||
"retention_analysis:",
|
"retention_analysis:",
|
||||||
@ -168,14 +172,20 @@ and sampler latent or the video can come out square.
|
|||||||
own line; `summary` is exactly `[reference generation]`; every scene is its own single
|
own line; `summary` is exactly `[reference generation]`; every scene is its own single
|
||||||
H3 generation, so the bracket number is always `[Shot 1]`.
|
H3 generation, so the bracket number is always `[Shot 1]`.
|
||||||
- The full look is re-stated in EVERY scene, and it lives in the [Shot 1] body —
|
- The full look is re-stated in EVERY scene, and it lives in the [Shot 1] body —
|
||||||
subject_definitions stays a lean identity anchor (the `<Subject 1>` label and who
|
subject_definitions only anchors identity, in exactly one of three forms per line:
|
||||||
they are, tied to their reference image; never a wardrobe list, never a nude/bare
|
a character with NO reference image gets physical traits only ("<Subject 1> is a
|
||||||
state). Weave the head-to-toe look into the action as the scene exposes it — hair,
|
20 year old woman with blonde hair, blue eyes and a medium build" — age, hair,
|
||||||
build, and face as they move, each garment where the action touches it, footwear
|
eyes, build; never clothing, never a nude/bare state); a character WITH a
|
||||||
where steps land — nothing is shared between scenes or from a prefix. Name every
|
reference image gets "<Subject 1> binds to <Image 1> : what the image actually
|
||||||
body part the clothing leaves uncovered and call uncovered skin "nude", never
|
shows" (the writing LLM is multimodal — look at it); and a user refmod
|
||||||
"bare", where the scene shows it
|
(`sam:&identity: ...; voice: ...&` in the story's characters block) is carried
|
||||||
("a man wearing a white tank-top with nude arms").
|
through VERBATIM as "<Subject 1> identity: ...; voice: ..." — never rewritten,
|
||||||
|
never trimmed, exempt from the length and clothing rules. Weave the head-to-toe
|
||||||
|
look into the action as the scene exposes it — hair, build, and face as they
|
||||||
|
move, each garment where the action touches it, footwear where steps land —
|
||||||
|
nothing is shared between scenes or from a prefix. Name every body part the
|
||||||
|
clothing leaves uncovered and call uncovered skin "nude", never "bare", where the
|
||||||
|
scene shows it ("a man wearing a white tank-top with nude arms").
|
||||||
- Scene composition, not word count: the [Shot 1] body must carry every element —
|
- Scene composition, not word count: the [Shot 1] body must carry every element —
|
||||||
subject anchor (`<Subject 1>` restated, the full look woven in), style anchor,
|
subject anchor (`<Subject 1>` restated, the full look woven in), style anchor,
|
||||||
continuity anchor
|
continuity anchor
|
||||||
|
|||||||
@ -71,16 +71,16 @@ Input:
|
|||||||
DEFAULTS: {"duration_seconds": 8, "steps": 20}
|
DEFAULTS: {"duration_seconds": 8, "steps": 20}
|
||||||
|
|
||||||
SCENE 1
|
SCENE 1
|
||||||
{"id": "corridor_walk", "duration_seconds": 8, "prompt": ["subject_definitions:", "<Subject 1> the night nurse, matching her subject reference image.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands gripping the trolley handle, pushes the trolley down the corridor.", "overall_soundscape:", "low fluorescent hum, a distant trolley wheel squeak.", "non_diegetic_music:", "N/A"], "_handoff": {"end_state": "She is mid-stride at the far end.", "soundscape": "low fluorescent hum, a distant trolley wheel squeak.", "dialogue_used": []}}
|
{"id": "corridor_walk", "duration_seconds": 8, "prompt": ["subject_definitions:", "<Subject 1> binds to <Image 1> : a woman in her thirties with dark brown hair in a low bun, pale green scrubs, white sneakers.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands gripping the trolley handle, pushes the trolley down the corridor.", "overall_soundscape:", "low fluorescent hum, a distant trolley wheel squeak.", "non_diegetic_music:", "N/A"], "_handoff": {"end_state": "She is mid-stride at the far end.", "soundscape": "low fluorescent hum, a distant trolley wheel squeak.", "dialogue_used": []}}
|
||||||
|
|
||||||
SCENE 2
|
SCENE 2
|
||||||
{"id": "door_stop", "duration_seconds": 8, "prompt": ["subject_definitions:", "<Subject 1> the night nurse, matching her subject reference image.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] Continue the same walk as <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands opening off the trolley handle, and stops the trolley at the blue door.", "overall_soundscape:", "the same fluorescent hum continues, the trolley wheel falls silent.", "non_diegetic_music:", "N/A"], "_handoff": {"end_state": "Her hand rests on the push bar.", "soundscape": "the same fluorescent hum continues, the trolley wheel falls silent.", "dialogue_used": []}}
|
{"id": "door_stop", "duration_seconds": 8, "prompt": ["subject_definitions:", "<Subject 1> binds to <Image 1> : a woman in her thirties with dark brown hair in a low bun, pale green scrubs, white sneakers.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] Continue the same walk as <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands opening off the trolley handle, and stops the trolley at the blue door.", "overall_soundscape:", "the same fluorescent hum continues, the trolley wheel falls silent.", "non_diegetic_music:", "N/A"], "_handoff": {"end_state": "Her hand rests on the push bar.", "soundscape": "the same fluorescent hum continues, the trolley wheel falls silent.", "dialogue_used": []}}
|
||||||
|
|
||||||
Correct reply:
|
Correct reply:
|
||||||
|
|
||||||
{"prompt_prefix": [""], "defaults": {"duration_seconds": 8, "steps": 20}, "shots": [
|
{"prompt_prefix": [""], "defaults": {"duration_seconds": 8, "steps": 20}, "shots": [
|
||||||
{"id": "corridor_walk", "prompt": ["subject_definitions:", "<Subject 1> the night nurse, matching her subject reference image.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands gripping the trolley handle, pushes the trolley down the corridor.", "overall_soundscape:", "low fluorescent hum, a distant trolley wheel squeak.", "non_diegetic_music:", "N/A"], "duration_seconds": 8},
|
{"id": "corridor_walk", "prompt": ["subject_definitions:", "<Subject 1> binds to <Image 1> : a woman in her thirties with dark brown hair in a low bun, pale green scrubs, white sneakers.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands gripping the trolley handle, pushes the trolley down the corridor.", "overall_soundscape:", "low fluorescent hum, a distant trolley wheel squeak.", "non_diegetic_music:", "N/A"], "duration_seconds": 8},
|
||||||
{"id": "door_stop", "prompt": ["subject_definitions:", "<Subject 1> the night nurse, matching her subject reference image.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] Continue the same walk as <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands opening off the trolley handle, and stops the trolley at the blue door.", "overall_soundscape:", "the same fluorescent hum continues, the trolley wheel falls silent.", "non_diegetic_music:", "N/A"], "duration_seconds": 8}
|
{"id": "door_stop", "prompt": ["subject_definitions:", "<Subject 1> binds to <Image 1> : a woman in her thirties with dark brown hair in a low bun, pale green scrubs, white sneakers.", "summary:", "[reference generation]", "retention_analysis:", "<Subject 1>: fully_preserved", "detailed_description:", "Photorealistic cool fluorescent lighting, soft clinical palette.", "[Shot 1] Continue the same walk as <Subject 1>, the same night nurse from her reference image in her pale green scrub top, matching scrub trousers, and white sneakers, her nude hands opening off the trolley handle, and stops the trolley at the blue door.", "overall_soundscape:", "the same fluorescent hum continues, the trolley wheel falls silent.", "non_diegetic_music:", "N/A"], "duration_seconds": 8}
|
||||||
]}
|
]}
|
||||||
|
|
||||||
Note what the example shows: the "_handoff" objects vanished, every prompt string is
|
Note what the example shows: the "_handoff" objects vanished, every prompt string is
|
||||||
|
|||||||
@ -51,7 +51,7 @@ Emit exactly this shape and no other keys:
|
|||||||
{ "id": "scene_one",
|
{ "id": "scene_one",
|
||||||
"prompt": [
|
"prompt": [
|
||||||
"subject_definitions:",
|
"subject_definitions:",
|
||||||
"<Subject 1> ...lean identity anchor: who they are, tied to their reference image...",
|
"<Subject 1> ...one of the three definition forms (REF2VA PROMPT 1)...",
|
||||||
"summary:",
|
"summary:",
|
||||||
"[reference generation]",
|
"[reference generation]",
|
||||||
"retention_analysis:",
|
"retention_analysis:",
|
||||||
@ -125,9 +125,9 @@ Shots are flat. A shot never contains a nested object.
|
|||||||
# PROMPT CRAFT
|
# PROMPT CRAFT
|
||||||
- "prompt_prefix" stays empty, exactly [""]. Never put identity, wardrobe, style, or
|
- "prompt_prefix" stays empty, exactly [""]. Never put identity, wardrobe, style, or
|
||||||
continuity text in it. Every scene's prompt must be self-sufficient:
|
continuity text in it. Every scene's prompt must be self-sufficient:
|
||||||
subject_definitions re-binds the <Subject 1> tag as a lean identity anchor and the
|
subject_definitions anchors the <Subject 1> tag's identity in one of its three
|
||||||
[Shot 1] body carries the full look woven into the action in every scene, because
|
forms and the [Shot 1] body carries the full look woven into the action in every
|
||||||
nothing is shared from a prefix or between scenes.
|
scene, because nothing is shared from a prefix or between scenes.
|
||||||
- The [Shot 1] body of every scene's detailed_description must:
|
- The [Shot 1] body of every scene's detailed_description must:
|
||||||
1. Continue the exact action, pose, camera direction, and lighting from the previous
|
1. Continue the exact action, pose, camera direction, and lighting from the previous
|
||||||
scene's [Shot 1] body. Scene 1 instead sets the opening.
|
scene's [Shot 1] body. Scene 1 instead sets the opening.
|
||||||
@ -137,13 +137,16 @@ Shots are flat. A shot never contains a nested object.
|
|||||||
- Compose every scene from the same eight elements, and never chase a word count —
|
- Compose every scene from the same eight elements, and never chase a word count —
|
||||||
chase the elements. A description that genuinely carries them comes out long enough
|
chase the elements. A description that genuinely carries them comes out long enough
|
||||||
on its own; padding to a number is as much a failure as a thin one-liner:
|
on its own; padding to a number is as much a failure as a thin one-liner:
|
||||||
1. SUBJECT ANCHOR — subject_definitions is only a lean identity anchor (REF2VA
|
1. SUBJECT ANCHOR — subject_definitions anchors identity only, one line per subject
|
||||||
PROMPT below): the <Subject 1> label and who the person is, tied to their
|
in exactly one of three forms (REF2VA PROMPT below): physical traits only when
|
||||||
subject reference image. The full look lives in the [Shot 1] body, woven into
|
the character has no reference image ("is a ... with ..." — age, hair, eyes,
|
||||||
the action as the scene exposes it: hair, build, and face as they move, every
|
build), "binds to <Image N> : what the image actually shows" when one is wired
|
||||||
garment where the action touches it, footwear where steps land, and every body
|
(you are multimodal — look at it), or the user's refmod carried through verbatim
|
||||||
part the clothing leaves uncovered named "nude" (PROMPT CRAFT) where the scene
|
("identity: ...; voice: ..."). The full look lives in the [Shot 1] body, woven
|
||||||
shows or uses that skin.
|
into the action as the scene exposes it: hair, build, and face as they move,
|
||||||
|
every garment where the action touches it, footwear where steps land, and every
|
||||||
|
body part the clothing leaves uncovered named "nude" (PROMPT CRAFT) where the
|
||||||
|
scene shows or uses that skin.
|
||||||
2. STYLE ANCHOR — the one consistent look: medium, lighting quality, palette.
|
2. STYLE ANCHOR — the one consistent look: medium, lighting quality, palette.
|
||||||
3. CONTINUITY ANCHOR — open inside the previous scene's end state (scene 1 sets the
|
3. CONTINUITY ANCHOR — open inside the previous scene's end state (scene 1 sets the
|
||||||
opening) and name what carries over: the stride, the camera direction, the light,
|
opening) and name what carries over: the stride, the camera direction, the light,
|
||||||
@ -207,7 +210,8 @@ Shots are flat. A shot never contains a nested object.
|
|||||||
fades until only the doorway lamp lights the room". A summarized change or movement
|
fades until only the doorway lamp lights the room". A summarized change or movement
|
||||||
is a gap H3 fills by guessing, and guessed motion drifts off intent.
|
is a gap H3 fills by guessing, and guessed motion drifts off intent.
|
||||||
- Describe the complete look in every scene, inside the [Shot 1] body — subject
|
- Describe the complete look in every scene, inside the [Shot 1] body — subject
|
||||||
definitions stay a lean identity anchor and never carry the look. Weave the full
|
definitions never carry the scene's look; they only anchor identity in one of
|
||||||
|
their three forms. Weave the full
|
||||||
head-to-toe appearance into the action according to what is going on in the scene:
|
head-to-toe appearance into the action according to what is going on in the scene:
|
||||||
face, hair, and build as the body moves, each garment where the action touches it
|
face, hair, and build as the body moves, each garment where the action touches it
|
||||||
(a cuff sliding back, a hem swaying, fabric darkening), footwear where steps land.
|
(a cuff sliding back, a hem swaying, fabric darkening), footwear where steps land.
|
||||||
@ -235,14 +239,25 @@ Shots are flat. A shot never contains a nested object.
|
|||||||
labels. Give every shot a prompt array with exactly these sections, in this order,
|
labels. Give every shot a prompt array with exactly these sections, in this order,
|
||||||
one line per element — the header on its own line, the content on the following
|
one line per element — the header on its own line, the content on the following
|
||||||
element:
|
element:
|
||||||
1. "subject_definitions:" then one line per subject: "<Subject 1> ..." — a lean
|
1. "subject_definitions:" then one line per subject — each line is exactly one of
|
||||||
identity anchor only: who the person is, tied to their subject reference image
|
three forms:
|
||||||
(for example "<Subject 1> the night nurse, matching her subject reference
|
a. No reference image for this character: physical traits only — "<Subject 1>
|
||||||
image."). Never put the head-to-toe look, a wardrobe list, or any nude/bare
|
is a 20 year old woman with blonde hair, blue eyes and a medium build." Age,
|
||||||
skin state here — those are woven into the [Shot 1] body of
|
hair, eyes, build. Never clothing, never a nude/bare skin state — the look is
|
||||||
detailed_description where the scene shows them. Define <Subject 2> the same
|
woven into the [Shot 1] body instead.
|
||||||
way when the story casts a second recurring person. Never define a label
|
b. A reference image is wired for this character: "<Subject 1> binds to <Image 1>
|
||||||
twice; never define a label you do not use.
|
: <what the image actually shows>." You are multimodal: look at <Image 1> and
|
||||||
|
describe what you see — age, hair, eyes, build, what they wear in the image.
|
||||||
|
Never invent what you cannot see.
|
||||||
|
c. The user wrote a refmod — the story carries a `characters:` block with the
|
||||||
|
name as `sam:&identity: <identity text>; voice: <voice text>&`. Strip the &
|
||||||
|
marks and carry the text through VERBATIM: "<Subject 1> identity: <their
|
||||||
|
identity text>; voice: <their voice text>". Never rewrite, trim, reorder, or
|
||||||
|
"improve" a refmod line — it is the user's tested wording and overrides every
|
||||||
|
other rule about definitions, including the length cap and the
|
||||||
|
clothing/skin-state ban.
|
||||||
|
Define <Subject 2> the same way when the story casts a second recurring person.
|
||||||
|
Never define a label twice; never define a label you do not use.
|
||||||
2. "summary:" then "[reference generation]" — exactly this directive on every scene,
|
2. "summary:" then "[reference generation]" — exactly this directive on every scene,
|
||||||
nothing else in the section.
|
nothing else in the section.
|
||||||
3. "retention_analysis:" then one line per defined label: "<Subject 1>:
|
3. "retention_analysis:" then one line per defined label: "<Subject 1>:
|
||||||
@ -313,8 +328,8 @@ Correct reply:
|
|||||||
"id": "greenhouse_arrival",
|
"id": "greenhouse_arrival",
|
||||||
"prompt": [
|
"prompt": [
|
||||||
"subject_definitions:",
|
"subject_definitions:",
|
||||||
"<Subject 1> the adult bicycle courier, matching his subject reference
|
"<Subject 1> binds to <Image 1> : a lean adult bicycle courier with short
|
||||||
image.",
|
dark brown hair and a mustard-yellow waterproof jacket.",
|
||||||
"summary:",
|
"summary:",
|
||||||
"[reference generation]",
|
"[reference generation]",
|
||||||
"retention_analysis:",
|
"retention_analysis:",
|
||||||
@ -355,8 +370,8 @@ Correct reply:
|
|||||||
"id": "greenhouse_delivery",
|
"id": "greenhouse_delivery",
|
||||||
"prompt": [
|
"prompt": [
|
||||||
"subject_definitions:",
|
"subject_definitions:",
|
||||||
"<Subject 1> the adult bicycle courier, matching his subject reference
|
"<Subject 1> binds to <Image 1> : a lean adult bicycle courier with short
|
||||||
image.",
|
dark brown hair and a mustard-yellow waterproof jacket.",
|
||||||
"summary:",
|
"summary:",
|
||||||
"[reference generation]",
|
"[reference generation]",
|
||||||
"retention_analysis:",
|
"retention_analysis:",
|
||||||
@ -406,11 +421,13 @@ Correct reply:
|
|||||||
5. shots is non-empty; ids are unique snake_case; every prompt array has a non-empty line.
|
5. shots is non-empty; ids are unique snake_case; every prompt array has a non-empty line.
|
||||||
6. Every duration_seconds is between 2 and 15.
|
6. Every duration_seconds is between 2 and 15.
|
||||||
7. Scene 1 sets an opening; every later scene continues the previous final action; every
|
7. Scene 1 sets an opening; every later scene continues the previous final action; every
|
||||||
scene except the last ends mid-action. subject_definitions re-binds <Subject 1> as
|
scene except the last ends mid-action. subject_definitions anchors <Subject 1> in
|
||||||
a lean identity anchor in every scene (no wardrobe list, no nude/bare state), and
|
one of its three forms in every scene (no-image physical traits / binds-to-image
|
||||||
the [Shot 1] body re-states who <Subject 1> is and carries the full head-to-toe
|
describing what the image shows / the user's refmod verbatim; never a wardrobe
|
||||||
look woven into the action, because the prefix is empty — naming every uncovered
|
list, never a nude/bare state), and the [Shot 1] body re-states who <Subject 1>
|
||||||
body part as "nude", never "bare", where the scene shows that skin.
|
is and carries the full head-to-toe look woven into the action, because the prefix
|
||||||
|
is empty — naming every uncovered body part as "nude", never "bare", where the
|
||||||
|
scene shows that skin.
|
||||||
8. Every [Shot 1] body carries every element of a scene composition — subject,
|
8. Every [Shot 1] body carries every element of a scene composition — subject,
|
||||||
style, continuity, blocking, camera, performance, texture, exit state — and no
|
style, continuity, blocking, camera, performance, texture, exit state — and no
|
||||||
change anywhere is stated as a bare outcome like "is now"; every transformation is
|
change anywhere is stated as a bare outcome like "is now"; every transformation is
|
||||||
@ -470,8 +487,11 @@ A retired boxer teaches his granddaughter to dance in their cluttered kitchen.
|
|||||||
safer; the node rounds up for you.
|
safer; the node rounds up for you.
|
||||||
- **Reference-tag prompts:** `<Subject N>` definitions are the ref2va reference format
|
- **Reference-tag prompts:** `<Subject N>` definitions are the ref2va reference format
|
||||||
and resolve against the subject reference images wired in ComfyUI (Scheduled
|
and resolve against the subject reference images wired in ComfyUI (Scheduled
|
||||||
Ref2VA / `native_ref2va`). The `<Picture N>` / `<Video N>` / `<Audio N>` gate stays
|
Ref2VA / `native_ref2va`). A character with a wired image is defined as
|
||||||
strict: tags that don't correspond to real wiring will hurt generation.
|
"<Subject N> binds to <Image N> : <what the image shows>"; without an image the
|
||||||
|
definition carries physical traits only; a user refmod (`&identity: ...; voice:
|
||||||
|
...&`) is carried through verbatim. The `<Picture N>` / `<Video N>` / `<Audio N>`
|
||||||
|
gate stays strict: tags that don't correspond to real wiring will hurt generation.
|
||||||
- **Prose-only shot prompts:** the six-section REF2VA template is the native H3
|
- **Prose-only shot prompts:** the six-section REF2VA template is the native H3
|
||||||
full-reference format and the strongest steering. If you ever want plain prose shots
|
full-reference format and the strongest steering. If you ever want plain prose shots
|
||||||
instead, delete the REF2VA section and its self-check items — the node passes prose
|
instead, delete the REF2VA section and its self-check items — the node passes prose
|
||||||
@ -481,7 +501,8 @@ A retired boxer teaches his granddaughter to dance in their cluttered kitchen.
|
|||||||
the prefix is exactly [""] — the compiled shot prompt (`prefix + blank line + scene prompt`,
|
the prefix is exactly [""] — the compiled shot prompt (`prefix + blank line + scene prompt`,
|
||||||
`chain_nodes.py`) then starts directly at the trained `subject_definitions:` header
|
`chain_nodes.py`) then starts directly at the trained `subject_definitions:` header
|
||||||
instead of a prose preamble. Identity, wardrobe, and style therefore live inside
|
instead of a prose preamble. Identity, wardrobe, and style therefore live inside
|
||||||
every scene — a lean anchor in subject_definitions and the full look woven into
|
every scene — an identity anchor in subject_definitions (one of its three forms)
|
||||||
|
and the full look woven into
|
||||||
the [Shot 1] body, restated per scene — which also suits each scene being its own
|
the [Shot 1] body, restated per scene — which also suits each scene being its own
|
||||||
generation. The validator accepts an empty prefix as
|
generation. The validator accepts an empty prefix as
|
||||||
long as every scene prompt is non-empty. If you reintroduce prose, expect some
|
long as every scene prompt is non-empty. If you reintroduce prose, expect some
|
||||||
|
|||||||
@ -93,7 +93,11 @@ Emit exactly this shape and no other keys:
|
|||||||
fully enough to re-draw them identically in every scene. This array is the cast
|
fully enough to re-draw them identically in every scene. This array is the cast
|
||||||
inventory: collect the full head-to-toe look here once — when writing scenes it is
|
inventory: collect the full head-to-toe look here once — when writing scenes it is
|
||||||
spent by weaving it into each scene's [Shot 1] body, never parked in
|
spent by weaving it into each scene's [Shot 1] body, never parked in
|
||||||
subject_definitions.
|
subject_definitions. If the story's script carries a `characters:` block with refmod
|
||||||
|
entries — `sam:&identity: <identity text>; voice: <voice text>&` — copy the identity
|
||||||
|
and voice text verbatim into that subject's inventory string (the & marks are
|
||||||
|
delimiters, never content); the scene writers must carry them into subject_definitions
|
||||||
|
untouched.
|
||||||
- "style": one consistent look for the whole plan. Never per-scene styles.
|
- "style": one consistent look for the whole plan. Never per-scene styles.
|
||||||
- "soundscape_seed": weather plus location tone in a few words. Every scene's
|
- "soundscape_seed": weather plus location tone in a few words. Every scene's
|
||||||
overall_soundscape line later continues from it.
|
overall_soundscape line later continues from it.
|
||||||
@ -168,7 +172,7 @@ Emit exactly this shape and no other keys:
|
|||||||
"duration_seconds": 15,
|
"duration_seconds": 15,
|
||||||
"prompt": [
|
"prompt": [
|
||||||
"subject_definitions:",
|
"subject_definitions:",
|
||||||
"<Subject 1> ...lean identity anchor: who they are, tied to their reference image...",
|
"<Subject 1> ...one of the three definition forms (REF2VA PROMPT 1 below)...",
|
||||||
"summary:",
|
"summary:",
|
||||||
"[reference generation]",
|
"[reference generation]",
|
||||||
"retention_analysis:",
|
"retention_analysis:",
|
||||||
@ -219,10 +223,10 @@ identity and style from the story alone; without a handoff you are scene 1.
|
|||||||
|
|
||||||
# IDENTITY AND CONTINUITY
|
# IDENTITY AND CONTINUITY
|
||||||
- Every scene is generated alone: nothing is shared between scenes. Your prompt must
|
- Every scene is generated alone: nothing is shared between scenes. Your prompt must
|
||||||
be self-sufficient — subject_definitions re-binds <Subject 1> as a lean identity
|
be self-sufficient — subject_definitions re-states <Subject 1> in one of its three
|
||||||
anchor, and the [Shot 1] body carries the full head-to-toe look woven into the
|
definition forms (REF2VA PROMPT below), and the [Shot 1] body carries the full
|
||||||
action plus the visual style in every scene, even though the previous scene
|
head-to-toe look woven into the action plus the visual style in every scene, even
|
||||||
already did.
|
though the previous scene already did.
|
||||||
- Copy the subject descriptions and "style" from STYLE AND CAST faithfully. Never change
|
- Copy the subject descriptions and "style" from STYLE AND CAST faithfully. Never change
|
||||||
wardrobe, hair, age, build, or look mid-plan.
|
wardrobe, hair, age, build, or look mid-plan.
|
||||||
- If PREVIOUS HANDOFF is a handoff object, your scene opens inside the exact end_state
|
- If PREVIOUS HANDOFF is a handoff object, your scene opens inside the exact end_state
|
||||||
@ -242,13 +246,16 @@ element is a failed scene. Do not chase a word count — chase the elements. A
|
|||||||
body that genuinely carries them comes out long enough on its own; padding to
|
body that genuinely carries them comes out long enough on its own; padding to
|
||||||
a number is as much a failure as a thin one-liner.
|
a number is as much a failure as a thin one-liner.
|
||||||
|
|
||||||
1. SUBJECT ANCHOR — subject_definitions is only a lean identity anchor (REF2VA
|
1. SUBJECT ANCHOR — subject_definitions anchors identity only, one line per subject
|
||||||
PROMPT below): the <Subject 1> label and who the person is, tied to their
|
in exactly one of three forms (REF2VA PROMPT below): physical traits only when
|
||||||
subject reference image. The full look lives in the [Shot 1] body, woven into
|
the character has no reference image ("is a ... with ..." — age, hair, eyes,
|
||||||
the action as the scene exposes it: hair, build, and face as they move, every
|
build), "binds to <Image N> : what the image actually shows" when one is wired
|
||||||
garment where the action touches it, footwear where steps land, and every body
|
(you are multimodal — look at it), or the user's refmod carried through verbatim
|
||||||
part the clothing leaves uncovered named "nude" (PROMPT CRAFT) where the scene
|
("identity: ...; voice: ..."). The full look lives in the [Shot 1] body, woven
|
||||||
shows or uses that skin. Nothing is shared between scenes or from a prefix.
|
into the action as the scene exposes it: hair, build, and face as they move,
|
||||||
|
every garment where the action touches it, footwear where steps land, and every
|
||||||
|
body part the clothing leaves uncovered named "nude" (PROMPT CRAFT) where the
|
||||||
|
scene shows or uses that skin. Nothing is shared between scenes or from a prefix.
|
||||||
2. STYLE ANCHOR — the one consistent look: medium, lighting quality, palette.
|
2. STYLE ANCHOR — the one consistent look: medium, lighting quality, palette.
|
||||||
3. CONTINUITY ANCHOR — open inside the previous end_state (scene 1 instead
|
3. CONTINUITY ANCHOR — open inside the previous end_state (scene 1 instead
|
||||||
establishes place, light, and the first action). Name what carries over: the
|
establishes place, light, and the first action). Name what carries over: the
|
||||||
@ -319,7 +326,8 @@ The sound picture is its own element and lives in the overall_soundscape section
|
|||||||
fades until only the doorway lamp lights the room". A summarized change or movement
|
fades until only the doorway lamp lights the room". A summarized change or movement
|
||||||
is a gap H3 fills by guessing, and guessed motion drifts off intent.
|
is a gap H3 fills by guessing, and guessed motion drifts off intent.
|
||||||
- Describe the complete look in every scene, inside the [Shot 1] body — subject
|
- Describe the complete look in every scene, inside the [Shot 1] body — subject
|
||||||
definitions stay a lean identity anchor and never carry the look. Weave the full
|
definitions never carry the scene's look; they only anchor identity in one of their
|
||||||
|
three forms. Weave the full
|
||||||
head-to-toe appearance into the action according to what is going on in the scene:
|
head-to-toe appearance into the action according to what is going on in the scene:
|
||||||
face, hair, and build as the body moves, each garment where the action touches it
|
face, hair, and build as the body moves, each garment where the action touches it
|
||||||
(a cuff sliding back, a hem swaying, fabric darkening), footwear where steps land.
|
(a cuff sliding back, a hem swaying, fabric darkening), footwear where steps land.
|
||||||
@ -345,14 +353,24 @@ The sound picture is its own element and lives in the overall_soundscape section
|
|||||||
the user has wired, and the H3 model reserves special tokens for six exact section
|
the user has wired, and the H3 model reserves special tokens for six exact section
|
||||||
labels. Give your prompt array exactly these sections, in this order, one line per
|
labels. Give your prompt array exactly these sections, in this order, one line per
|
||||||
element — the header on its own line, the content on the following element:
|
element — the header on its own line, the content on the following element:
|
||||||
1. "subject_definitions:" then one line per subject: "<Subject 1> ..." — a lean
|
1. "subject_definitions:" then one line per subject — each line is exactly one of
|
||||||
identity anchor only: who the person is, tied to their subject reference image
|
three forms:
|
||||||
(for example "<Subject 1> the night nurse, matching her subject reference
|
a. No reference image for this character: physical traits only — "<Subject 1>
|
||||||
image."). Never put the head-to-toe look, a wardrobe list, or any nude/bare
|
is a 20 year old woman with blonde hair, blue eyes and a medium build." Age,
|
||||||
skin state here — those are woven into the [Shot 1] body of
|
hair, eyes, build. Never clothing, never a nude/bare skin state — the look is
|
||||||
detailed_description where the scene shows them. Define <Subject 2> the same
|
woven into the [Shot 1] body instead.
|
||||||
way when the outline casts a second person. Never define a label twice; never
|
b. A reference image is wired for this character: "<Subject 1> binds to <Image 1>
|
||||||
define a label you do not use.
|
: <what the image actually shows>." You are multimodal: look at <Image 1> and
|
||||||
|
describe what you see — age, hair, eyes, build, what they wear in the image.
|
||||||
|
Never invent what you cannot see.
|
||||||
|
c. The user wrote a refmod — the story's characters block carries the name as
|
||||||
|
`sam:&identity: <identity text>; voice: <voice text>&`. Strip the & marks and
|
||||||
|
carry the text through VERBATIM: "<Subject 1> identity: <their identity text>;
|
||||||
|
voice: <their voice text>". Never rewrite, trim, reorder, or "improve" a
|
||||||
|
refmod line — it is the user's tested wording and overrides every other rule
|
||||||
|
about definitions, including the length cap and the clothing/skin-state ban.
|
||||||
|
Define <Subject 2> the same way when the outline casts a second person. Never
|
||||||
|
define a label twice; never define a label you do not use.
|
||||||
2. "summary:" then "[reference generation]" — exactly this directive on every scene
|
2. "summary:" then "[reference generation]" — exactly this directive on every scene
|
||||||
of this workflow, nothing else in the section.
|
of this workflow, nothing else in the section.
|
||||||
3. "retention_analysis:" then one line per defined label: "<Subject 1>:
|
3. "retention_analysis:" then one line per defined label: "<Subject 1>:
|
||||||
@ -451,8 +469,8 @@ Correct reply:
|
|||||||
"duration_seconds": 15,
|
"duration_seconds": 15,
|
||||||
"prompt": [
|
"prompt": [
|
||||||
"subject_definitions:",
|
"subject_definitions:",
|
||||||
"<Subject 1> the adult bicycle courier, matching his subject reference
|
"<Subject 1> binds to <Image 1> : a lean adult bicycle courier with short
|
||||||
image.",
|
dark brown hair and a mustard-yellow waterproof jacket.",
|
||||||
"summary:",
|
"summary:",
|
||||||
"[reference generation]",
|
"[reference generation]",
|
||||||
"retention_analysis:",
|
"retention_analysis:",
|
||||||
@ -509,8 +527,10 @@ Correct reply:
|
|||||||
overall_soundscape / non_diegetic_music — each header on its own line, and
|
overall_soundscape / non_diegetic_music — each header on its own line, and
|
||||||
summary is exactly "[reference generation]".
|
summary is exactly "[reference generation]".
|
||||||
4. subject_definitions defines <Subject 1> (and <Subject 2> when the outline casts a
|
4. subject_definitions defines <Subject 1> (and <Subject 2> when the outline casts a
|
||||||
second person) exactly once each as a lean identity anchor — who they are, tied
|
second person) exactly once each, every line in exactly one of the three forms —
|
||||||
to the reference image, with no wardrobe list and no nude/bare state;
|
physical traits only when there is no reference image, "binds to <Image N> : ..."
|
||||||
|
describing what the image actually shows when one is wired, or the user's refmod
|
||||||
|
identity/voice text carried through verbatim;
|
||||||
retention_analysis carries one valid entry per defined label; the [Shot 1] body
|
retention_analysis carries one valid entry per defined label; the [Shot 1] body
|
||||||
re-states <Subject 1> and carries the full head-to-toe look woven into the
|
re-states <Subject 1> and carries the full head-to-toe look woven into the
|
||||||
action, naming every uncovered body part "nude" — never "bare" — where the
|
action, naming every uncovered body part "nude" — never "bare" — where the
|
||||||
@ -558,9 +578,9 @@ Correct reply:
|
|||||||
distributed by the outline.
|
distributed by the outline.
|
||||||
- **Prefix rule is unchanged:** fragments never carry `prompt_prefix`; the final plan
|
- **Prefix rule is unchanged:** fragments never carry `prompt_prefix`; the final plan
|
||||||
always gets `"prompt_prefix": [""]` (the empirically better empty prefix), and each
|
always gets `"prompt_prefix": [""]` (the empirically better empty prefix), and each
|
||||||
scene's lean subject_definitions anchor plus its [Shot 1] body — the full look
|
scene's subject_definitions (one of its three identity forms) plus its [Shot 1]
|
||||||
woven into the action — restate identity/wardrobe/style because nothing is shared
|
body — the full look woven into the action — restate identity/wardrobe/style because
|
||||||
from a prefix.
|
nothing is shared from a prefix.
|
||||||
- **Fragment file convention:** save each reply as `scene_NN.json` (zero-padded). The
|
- **Fragment file convention:** save each reply as `scene_NN.json` (zero-padded). The
|
||||||
assembler and `scripts/build_plan.py` accept the raw object; fenced output also
|
assembler and `scripts/build_plan.py` accept the raw object; fenced output also
|
||||||
parses.
|
parses.
|
||||||
|
|||||||
@ -30,12 +30,25 @@ REF2VA_SECTIONS = ["subject_definitions", "summary", "retention_analysis",
|
|||||||
REF2VA_TASK_DIRECTIVE = "[reference generation]"
|
REF2VA_TASK_DIRECTIVE = "[reference generation]"
|
||||||
REF2VA_RETENTION_MARKERS = {"fully_preserved", "partially_preserved",
|
REF2VA_RETENTION_MARKERS = {"fully_preserved", "partially_preserved",
|
||||||
"attribute_transfer", "weak_reference"}
|
"attribute_transfer", "weak_reference"}
|
||||||
# subject_definitions is a lean identity anchor (who the label is, tied to its
|
# Rule 7 - a subject_definitions line comes in exactly one of three forms:
|
||||||
# reference image) - never the full head-to-toe look and never a nude/bare skin
|
# 1. no reference image -> "<Subject N> is a <age> ... with <hair>, <eyes> and
|
||||||
# state; both are woven into the [Shot 1] body according to what the scene shows.
|
# <build>" - physical traits only: never clothing, never a nude/bare skin state
|
||||||
|
# 2. reference image -> "<Subject N> binds to <Image N> : <what the image
|
||||||
|
# actually shows>" - compact and faithful; the writer is multimodal
|
||||||
|
# 3. user refmod -> "<Subject N> identity: <verbatim>; voice: <verbatim>"
|
||||||
|
# - the user's own tested wording, carried through untouched (exempt from the
|
||||||
|
# length cap and the clothing/skin-state bans)
|
||||||
|
# In every form the full look is still woven into the [Shot 1] body.
|
||||||
REF2VA_DEF_MAX_WORDS = 25
|
REF2VA_DEF_MAX_WORDS = 25
|
||||||
|
REF2VA_REFMOD_RE = re.compile(r"^identity\s*:", re.I)
|
||||||
|
REF2VA_BINDS_RE = re.compile(r"^binds to <Image\s+\d+>\s*:\s*", re.I)
|
||||||
REF2VA_DEF_SKINSTATE_RE = re.compile(
|
REF2VA_DEF_SKINSTATE_RE = re.compile(
|
||||||
r"\b(?:nude|naked|unclothed|undressed|bare|barefoot|topless)\b", re.I)
|
r"\b(?:nude|naked|unclothed|undressed|bare|barefoot|topless)\b", re.I)
|
||||||
|
REF2VA_DEF_CLOTHING_RE = re.compile(
|
||||||
|
r"\b(?:wearing|wears|dressed|dresses|dress|outfit|garment|clothes|clothing|"
|
||||||
|
r"uniform|scrubs?|jacket|coat|shirt|blouse|trousers|pants|jeans|shorts|skirt|"
|
||||||
|
r"gown|hoodie|sweater|shoes|sneakers|boots|sandals|socks|stockings|gloves|"
|
||||||
|
r"helmet|lanyard)\b", re.I)
|
||||||
|
|
||||||
FENCE_RE = re.compile(r"^\s*```[a-zA-Z0-9_-]*\s*\n(.*?)\n?\s*```\s*$", re.S)
|
FENCE_RE = re.compile(r"^\s*```[a-zA-Z0-9_-]*\s*\n(.*?)\n?\s*```\s*$", re.S)
|
||||||
DIALOGUE_SPAN_RE = re.compile(r"<d>(.*?)</d>")
|
DIALOGUE_SPAN_RE = re.compile(r"<d>(.*?)</d>")
|
||||||
@ -153,22 +166,56 @@ def check_ref2va_prompt(lines, dur, where, prev_handoff=None):
|
|||||||
m = re.match(r"^(<(?:Subject|Picture|Video|Audio)\s+\d+>)\s+\S", line)
|
m = re.match(r"^(<(?:Subject|Picture|Video|Audio)\s+\d+>)\s+\S", line)
|
||||||
if not m:
|
if not m:
|
||||||
raise ValueError(f"{where}: subject_definitions lines must start with a "
|
raise ValueError(f"{where}: subject_definitions lines must start with a "
|
||||||
f"<Subject N> label and name the subject (lean identity "
|
f"<Subject N> label followed by one of the three "
|
||||||
f"anchor): {line[:60]!r}")
|
f"definition forms (is-a physical traits / binds to "
|
||||||
|
f"<Image N> / verbatim refmod): {line[:60]!r}")
|
||||||
if m.group(1) in defined:
|
if m.group(1) in defined:
|
||||||
raise ValueError(f"{where}: {m.group(1)} is defined more than once")
|
raise ValueError(f"{where}: {m.group(1)} is defined more than once")
|
||||||
anchor = line[m.end(1):].strip()
|
anchor = line[m.end(1):].strip()
|
||||||
|
if anchor.startswith("&"):
|
||||||
|
raise ValueError(f"{where}: {m.group(1)} keeps the user's &...& wrapper - "
|
||||||
|
f"strip the & marks and carry the refmod text verbatim "
|
||||||
|
f"('<Subject N> identity: ...; voice: ...'): {line[:60]!r}")
|
||||||
|
if REF2VA_REFMOD_RE.match(anchor):
|
||||||
|
defined.append(m.group(1)) # verbatim user refmod text - never edited
|
||||||
|
continue
|
||||||
|
mb = REF2VA_BINDS_RE.match(anchor)
|
||||||
|
if mb:
|
||||||
|
desc = anchor[mb.end():].strip()
|
||||||
|
if not desc:
|
||||||
|
raise ValueError(f"{where}: {m.group(1)} binds line needs a description "
|
||||||
|
f"after the colon - look at <Image N> and write what "
|
||||||
|
f"you see: {line[:60]!r}")
|
||||||
|
words = len(desc.split())
|
||||||
|
if words > REF2VA_DEF_MAX_WORDS:
|
||||||
|
raise ValueError(f"{where}: {m.group(1)} binds description is {words} "
|
||||||
|
f"words - describe what you actually see in <Image N> "
|
||||||
|
f"compactly (age, hair, eyes, build, what they wear in "
|
||||||
|
f"the image); the look in motion is still woven into "
|
||||||
|
f"the [Shot 1] body: {line[:60]!r}")
|
||||||
|
else:
|
||||||
|
if not re.match(r"^is\b", anchor, re.I):
|
||||||
|
raise ValueError(f"{where}: {m.group(1)} definition is none of the three "
|
||||||
|
f"forms - '<Subject N> is a ...' (physical traits only: "
|
||||||
|
f"age, hair, eyes, build), '<Subject N> binds to <Image "
|
||||||
|
f"N> : ...' (what the image shows), or the user's "
|
||||||
|
f"verbatim refmod '<Subject N> identity: ...; voice: "
|
||||||
|
f"...': {line[:60]!r}")
|
||||||
if REF2VA_DEF_SKINSTATE_RE.search(anchor):
|
if REF2VA_DEF_SKINSTATE_RE.search(anchor):
|
||||||
raise ValueError(f"{where}: {m.group(1)} definition carries a nude/bare "
|
raise ValueError(f"{where}: {m.group(1)} has no reference image, so its "
|
||||||
f"skin state - subject_definitions is a lean identity "
|
f"definition is physical traits only and carries a "
|
||||||
f"anchor only; weave the skin state into the [Shot 1] body "
|
f"nude/bare skin state - weave the skin state into the "
|
||||||
f"where the scene exposes it: {line[:60]!r}")
|
f"[Shot 1] body where the scene shows it: {line[:60]!r}")
|
||||||
|
if REF2VA_DEF_CLOTHING_RE.search(anchor):
|
||||||
|
raise ValueError(f"{where}: {m.group(1)} describes clothing in a no-image "
|
||||||
|
f"definition - physical traits only (age, hair, eyes, "
|
||||||
|
f"build); weave every garment into the [Shot 1] body "
|
||||||
|
f"where the action touches it: {line[:60]!r}")
|
||||||
words = len(anchor.split())
|
words = len(anchor.split())
|
||||||
if words > REF2VA_DEF_MAX_WORDS:
|
if words > REF2VA_DEF_MAX_WORDS:
|
||||||
raise ValueError(f"{where}: {m.group(1)} definition is {words} words - "
|
raise ValueError(f"{where}: {m.group(1)} definition is {words} words - "
|
||||||
f"subject_definitions is a lean identity anchor (who the "
|
f"keep it to lean physical traits (age, hair, eyes, "
|
||||||
f"label is, tied to its reference image), not the full "
|
f"build); the full look is woven into the [Shot 1] body "
|
||||||
f"head-to-toe look; weave the look into the [Shot 1] body "
|
|
||||||
f"according to what the scene shows")
|
f"according to what the scene shows")
|
||||||
defined.append(m.group(1))
|
defined.append(m.group(1))
|
||||||
if "<Subject 1>" not in defined:
|
if "<Subject 1>" not in defined:
|
||||||
@ -571,7 +618,9 @@ REF2VA_NURSE = {
|
|||||||
"duration_seconds": 8,
|
"duration_seconds": 8,
|
||||||
"prompt": [
|
"prompt": [
|
||||||
"subject_definitions:",
|
"subject_definitions:",
|
||||||
"<Subject 1> the night nurse, matching her subject reference image.",
|
"<Subject 1> binds to <Image 1> : a woman in her thirties with dark brown "
|
||||||
|
"hair in a low bun, calm grey eyes, slim build, pale green scrubs, white "
|
||||||
|
"sneakers.",
|
||||||
"summary:",
|
"summary:",
|
||||||
"[reference generation]",
|
"[reference generation]",
|
||||||
"retention_analysis:",
|
"retention_analysis:",
|
||||||
@ -613,12 +662,16 @@ REF2VA_NURSE = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# DOOR exercises the third definition form: a user refmod carried through
|
||||||
|
# verbatim (identity + voice), exempt from the length cap and content bans.
|
||||||
REF2VA_DOOR = {
|
REF2VA_DOOR = {
|
||||||
"id": "door_stop",
|
"id": "door_stop",
|
||||||
"duration_seconds": 8,
|
"duration_seconds": 8,
|
||||||
"prompt": [
|
"prompt": [
|
||||||
"subject_definitions:",
|
"subject_definitions:",
|
||||||
REF2VA_NURSE["prompt"][1],
|
"<Subject 1> identity: The night nurse is a woman in her thirties with "
|
||||||
|
"dark brown hair in a low bun and calm grey eyes; voice: The night nurse "
|
||||||
|
"speaks in a low, unhurried, even voice.",
|
||||||
"summary:",
|
"summary:",
|
||||||
"[reference generation]",
|
"[reference generation]",
|
||||||
"retention_analysis:",
|
"retention_analysis:",
|
||||||
@ -705,7 +758,11 @@ def run_fragment_suite():
|
|||||||
rh = validate_fragment(json.loads(json.dumps(REF2VA_NURSE)), index=1, total=2)
|
rh = validate_fragment(json.loads(json.dumps(REF2VA_NURSE)), index=1, total=2)
|
||||||
validate_fragment(json.loads(json.dumps(REF2VA_DOOR)), index=2, total=2,
|
validate_fragment(json.loads(json.dumps(REF2VA_DOOR)), index=2, total=2,
|
||||||
prev_handoff=rh)
|
prev_handoff=rh)
|
||||||
print(" all ref2va PASS cases ok")
|
noimage = _ref2va_short()
|
||||||
|
noimage["prompt"][1] = ("<Subject 1> is a woman in her thirties with dark brown "
|
||||||
|
"hair in a low bun, calm grey eyes and a slim build.")
|
||||||
|
validate_fragment(noimage, index=1, total=1)
|
||||||
|
print(" all ref2va PASS cases ok (binds, verbatim refmod, no-image traits)")
|
||||||
|
|
||||||
print("\nRef2VA edge cases that must FAIL:")
|
print("\nRef2VA edge cases that must FAIL:")
|
||||||
no_ret = _ref2va_short()
|
no_ret = _ref2va_short()
|
||||||
@ -731,13 +788,20 @@ def run_fragment_suite():
|
|||||||
"and calm grey eyes, wearing a pale green scrub top and "
|
"and calm grey eyes, wearing a pale green scrub top and "
|
||||||
"matching scrub trousers, white sneakers, and a lanyard "
|
"matching scrub trousers, white sneakers, and a lanyard "
|
||||||
"ID badge at her chest.")
|
"ID badge at her chest.")
|
||||||
|
clothed_defs = _ref2va_short()
|
||||||
|
clothed_defs["prompt"][1] = ("<Subject 1> is a night nurse wearing a pale green "
|
||||||
|
"scrub top and white sneakers.")
|
||||||
|
bad_binds = _ref2va_short()
|
||||||
|
bad_binds["prompt"][1] = "<Subject 1> bound to her subject reference image."
|
||||||
r2_cases = [
|
r2_cases = [
|
||||||
("missing retention_analysis entry", no_ret, {}),
|
("missing retention_analysis entry", no_ret, {}),
|
||||||
("summary directive not [reference generation]", wrong_summary, {}),
|
("summary directive not [reference generation]", wrong_summary, {}),
|
||||||
("no style sentences before [Shot 1]", no_style, {}),
|
("no style sentences before [Shot 1]", no_style, {}),
|
||||||
("sections out of canonical order", out_of_order, {}),
|
("sections out of canonical order", out_of_order, {}),
|
||||||
("nude/bare state in subject_definitions", nude_defs, {}),
|
("nude/bare state in a no-image subject definition", nude_defs, {}),
|
||||||
("head-to-toe look dump in subject_definitions", dump_defs, {}),
|
("head-to-toe look dump in subject_definitions", dump_defs, {}),
|
||||||
|
("clothing in a no-image subject definition", clothed_defs, {}),
|
||||||
|
("subject definition is none of the three forms", bad_binds, {}),
|
||||||
]
|
]
|
||||||
for i, (label, obj, kwargs) in enumerate(r2_cases, 1):
|
for i, (label, obj, kwargs) in enumerate(r2_cases, 1):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user