Stop ref wardrobe from fighting live character memory
This commit is contained in:
+10
-4
@@ -4410,12 +4410,13 @@ def _matched_reference_slots(text, ref_slots):
|
||||
return matched
|
||||
|
||||
|
||||
def _reference_context_for_text(text, ref_slots):
|
||||
def _reference_context_for_text(text, ref_slots, include_character_wardrobe=True):
|
||||
parts = []
|
||||
for slot_number, ref in _matched_reference_slots(text, ref_slots):
|
||||
label = _reference_text(ref.get("name")) or _reference_text(ref.get("id")) or f"reference {slot_number}"
|
||||
description = _reference_sentence(ref.get("description"))
|
||||
wardrobe = _reference_sentence(ref.get("wardrobe"))
|
||||
wardrobe = (_reference_sentence(ref.get("wardrobe"))
|
||||
if include_character_wardrobe else "")
|
||||
general = _reference_sentence(ref.get("general"))
|
||||
facts = _reference_fact_sentence(ref, label)
|
||||
if ref.get("kind") == "location":
|
||||
@@ -6365,8 +6366,9 @@ class H3LongVideos:
|
||||
)
|
||||
ref_slots = direct_ref_slots
|
||||
direct_ref_count = len(_connected_refs(direct_ref_slots))
|
||||
explicit_character_memory = (character_memory or "").strip()
|
||||
derived_character_memory = _reference_character_memory(ref_slots)
|
||||
effective_character_memory = (character_memory or "").strip() or derived_character_memory
|
||||
effective_character_memory = explicit_character_memory or derived_character_memory
|
||||
# A pixel budget overrides the preset's SIZE while keeping its aspect ratio,
|
||||
# so the dropdown chooses the shape and this chooses how big. Scaling from
|
||||
# the preset's own dimensions is what makes 1.00MP reproduce each native
|
||||
@@ -6582,7 +6584,11 @@ class H3LongVideos:
|
||||
count_auto=(subject_count_guard == "auto"))
|
||||
enriched_gens = []
|
||||
for block in gens:
|
||||
context = _reference_context_for_text(block, ref_slots)
|
||||
context = _reference_context_for_text(
|
||||
block,
|
||||
ref_slots,
|
||||
include_character_wardrobe=not bool(explicit_character_memory),
|
||||
)
|
||||
if context:
|
||||
block = _inject_reference_context(block, context)
|
||||
enriched_gens.append(block)
|
||||
|
||||
Reference in New Issue
Block a user