Prioritize character refs over location refs

This commit is contained in:
2026-08-29 11:36:53 +00:00
parent faaeb374e0
commit e08281c12b
2 changed files with 38 additions and 5 deletions
+15
View File
@@ -479,6 +479,21 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
self.assertFalse(shot_tag_driven)
self.assertEqual(mode_eff, "auto ref2v")
def test_resolve_prompt_refs_prioritizes_characters_before_locations(self):
refs = [
{"kind": "location", "image": "img1", "name": "Hangar"},
{"kind": "character", "image": "img2", "name": "Mara"},
]
text, references, dropped = self.module.resolve_prompt_refs(
"[Generation 1] Mara waits in the hangar.",
refs,
)
self.assertEqual(text, "[Generation 1] Mara waits in the hangar.")
self.assertEqual([self.module._reference_image(ref) for ref in references], ["img2", "img1"])
self.assertEqual(dropped, [])
def test_shot_references_uses_all_connected_sparse_slots(self):
refs = [
None,