Refine H3 long videos defaults and aliases
This commit is contained in:
@@ -183,6 +183,10 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
|
||||
def test_shot_references_uses_all_connected_sparse_slots(self):
|
||||
refs = [None, "img2", None, "img4", None, None, "img7", None, None]
|
||||
|
||||
self.assertEqual(
|
||||
self.module.shot_references(refs, "auto ref2v", 0, None),
|
||||
["img2", "img4", "img7"],
|
||||
)
|
||||
self.assertEqual(
|
||||
self.module.shot_references(refs, "first shot", 0, None),
|
||||
["img2", "img4", "img7"],
|
||||
@@ -225,6 +229,73 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
|
||||
("plan1", "direct2", "plan3", None, "direct5", None, "plan7", None, None),
|
||||
)
|
||||
|
||||
def test_ref_mode_defaults_are_ref2v_biased(self):
|
||||
optional = self.module.H3LongVideos.INPUT_TYPES()["optional"]
|
||||
|
||||
self.assertEqual(optional["ref_mode"][1]["default"], "auto ref2v")
|
||||
self.assertEqual(optional["ref_noise_aug"][1]["default"], 0.95)
|
||||
|
||||
def test_only_canonical_h3_long_videos_node_is_exposed(self):
|
||||
self.assertEqual(
|
||||
self.module.NODE_CLASS_MAPPINGS,
|
||||
{"DumasH3LongVideos": self.module.H3LongVideos},
|
||||
)
|
||||
self.assertEqual(
|
||||
self.module.NODE_DISPLAY_NAME_MAPPINGS,
|
||||
{"DumasH3LongVideos": "Dumas H3 Long Videos (FL2VA + REF2VA)"},
|
||||
)
|
||||
|
||||
def test_compose_persistent_does_not_expand_ambiguous_plural_to_full_cast(self):
|
||||
active = self.module.parse_wardrobe(
|
||||
"Maya = she, red jacket\n"
|
||||
"Jon = he, navy overalls\n"
|
||||
"Becca = she, green coat"
|
||||
)
|
||||
|
||||
shot = self.module.compose_persistent(
|
||||
"Both of them walk to the door.",
|
||||
active,
|
||||
"",
|
||||
speaking=False,
|
||||
)
|
||||
|
||||
self.assertEqual(shot, "Both of them walk to the door.")
|
||||
|
||||
def test_compose_persistent_keeps_two_person_plural_binding(self):
|
||||
active = self.module.parse_wardrobe(
|
||||
"Maya = she, red jacket\n"
|
||||
"Jon = he, navy overalls"
|
||||
)
|
||||
|
||||
shot = self.module.compose_persistent(
|
||||
"They walk to the door.",
|
||||
active,
|
||||
"",
|
||||
speaking=False,
|
||||
)
|
||||
|
||||
self.assertIn("Maya (red jacket)", shot)
|
||||
self.assertIn("Jon (navy overalls)", shot)
|
||||
self.assertIn("They walk to the door.", shot)
|
||||
|
||||
def test_compose_persistent_all_three_characters_binds_full_cast(self):
|
||||
active = self.module.parse_wardrobe(
|
||||
"Maya = she, red jacket\n"
|
||||
"Jon = he, navy overalls\n"
|
||||
"Becca = she, green coat"
|
||||
)
|
||||
|
||||
shot = self.module.compose_persistent(
|
||||
"The three characters walk to the door.",
|
||||
active,
|
||||
"",
|
||||
speaking=False,
|
||||
)
|
||||
|
||||
self.assertIn("Maya (red jacket)", shot)
|
||||
self.assertIn("Jon (navy overalls)", shot)
|
||||
self.assertIn("Becca (green coat)", shot)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user