Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions core/comic/page_prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
ANTI_CHARACTER_SHEET_LINE,
ANTI_MULTI_AGE_COLLAGE_LINE,
COSTUME_CHANGE_LOCK_LINE,
PERIOD_WARDROBE_LINE,
DIEGETIC_TEXT_LINE,
format_color_bible_block,
format_identity_line,
l1_from_canon,
parse_stage_ref,
resolve_canonical_name,
resolve_character_asset,
wardrobe_banline_for_bible,
)
from core.schemas import CharacterAsset, ComicPagePlan, Setting, VisualBible

Expand Down Expand Up @@ -64,6 +66,7 @@ def render_finished_page_prompt(
"leave clean panel art only — text will be added in post-processing,",
"do not render any readable text, letters, or glyphs (no Latin, no CJK),",
"do not cover faces, hands, or key action with placeholders.",
DIEGETIC_TEXT_LINE,
]
)
if strict:
Expand Down Expand Up @@ -95,7 +98,7 @@ def render_finished_page_prompt(
lines.append(color_block)
lines.append(COSTUME_CHANGE_LOCK_LINE)
lines.append(ANTI_CHARACTER_SHEET_LINE)
lines.append(PERIOD_WARDROBE_LINE)
lines.append(wardrobe_banline_for_bible(visual_bible))
lines.append(ANTI_MULTI_AGE_COLLAGE_LINE)
lines.append(f"Page purpose: {plan.purpose}")
lines.append(f"Layout intent: {plan.layout_intent}")
Expand All @@ -121,6 +124,14 @@ def render_finished_page_prompt(
desc = _character_desc_for_prompt(name, asset, visual_bible)
if desc:
lines.append(f" character {name}: {desc}")
if visual_bible is not None:
base, _stage = parse_stage_ref(name)
canon = visual_bible.characters.get(base)
if canon is None:
base = resolve_canonical_name(base, visual_bible)
canon = visual_bible.characters.get(base)
if canon is not None:
lines.append(f" {format_identity_line(name, canon)}")
if lettering == "in_image":
if panel.caption:
lines.append(f" CAPTION (exact): {panel.caption}")
Expand Down
Loading