Fix pasted multi-shot prompt parsing

This commit is contained in:
2026-10-30 12:03:00 +00:00
parent c299955a72
commit 83773470bf
2 changed files with 45 additions and 22 deletions
+17
View File
@@ -183,6 +183,23 @@ class H3NodeTests(unittest.TestCase):
finally:
sys.modules.pop(reference_module.__name__, None)
def test_two_shot_script_is_preserved_as_two_slots(self):
reference_module = types.ModuleType("upstream.v3.reference_images_v39")
reference_module.ReferenceImagesV39Bundle = FakeReferenceBundle
sys.modules[reference_module.__name__] = reference_module
try:
result = PROMPT.DumasH3SequencePromptBuilder().build(
1, 4, "", '{"clips":[{"slots":['
'{"start":0,"end":2,"text":"Shot 1: the subject walks."},'
'{"start":2,"end":4,"text":"Shot 2: the subject turns."}]}]}',
"", "",
)
self.assertEqual(result[1], 1)
self.assertIn("Shot 1: the subject walks.", result[0])
self.assertIn("Shot 2: the subject turns.", result[0])
finally:
sys.modules.pop(reference_module.__name__, None)
def test_per_clip_upscale_uses_connected_sigmas(self):
original = UPSCALE._native_node
original_helper = UPSCALE._continuum_helper