Use named character refs for H3 image conditioning

This commit is contained in:
2026-08-28 09:52:02 +00:00
parent af226987d7
commit 9b862928ba
2 changed files with 46 additions and 7 deletions
+19
View File
@@ -388,6 +388,25 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
)
self.assertEqual(dropped, [4])
def test_resolve_prompt_refs_keeps_named_character_images_alongside_tagged_location(self):
refs = [
{"kind": "character", "image": "img1", "name": "Mara"},
{"kind": "character", "image": "img2", "name": "Jon"},
{"kind": "location", "image": "img3", "name": "Hangar"},
]
text, references, dropped = self.module.resolve_prompt_refs(
"Mara and Jon argue inside <Picture 3>.",
refs,
)
self.assertEqual(text, "Mara and Jon argue inside <Picture 1>.")
self.assertEqual(
[self.module._reference_image(ref) for ref in references],
["img3", "img1", "img2"],
)
self.assertEqual(dropped, [])
def test_shot_references_uses_all_connected_sparse_slots(self):
refs = [
None,