Simplify H3 beat timing and cleanup
This commit is contained in:
@@ -734,14 +734,27 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
|
||||
|
||||
for index in range(1, 10):
|
||||
self.assertNotIn(f"ref_image_{index}", optional)
|
||||
self.assertNotIn("per_beat_length", optional)
|
||||
self.assertNotIn("cleanup_between_shots", optional)
|
||||
|
||||
def test_shot_seconds_tooltip_describes_ceiling_behavior(self):
|
||||
optional = self.module.H3LongVideos.INPUT_TYPES()["optional"]
|
||||
tooltip = optional["shot_seconds"][1]["tooltip"]
|
||||
|
||||
self.assertIn("GLOBAL per-shot ceiling", tooltip)
|
||||
self.assertIn("not 'force every beat to exactly this length'", tooltip)
|
||||
self.assertIn("hard ~15.1s single-shot limit", tooltip)
|
||||
self.assertIn("GLOBAL per-shot maximum", tooltip)
|
||||
self.assertIn("A beat's own `seconds:` directive can still ask for less", tooltip)
|
||||
self.assertIn("honoring it; may spill to system RAM (slow) or OOM", tooltip)
|
||||
|
||||
def test_resolve_shot_frames_honors_forced_request_over_budget(self):
|
||||
original_estimate_shot_frames = self.module.estimate_shot_frames
|
||||
try:
|
||||
self.module.estimate_shot_frames = lambda *_args, **_kwargs: 73
|
||||
frames, note = self.module.resolve_shot_frames(10.0, 24, 16.0, 8.0, 1.5)
|
||||
|
||||
self.assertEqual(frames, 243)
|
||||
self.assertIn("honoring it", note)
|
||||
finally:
|
||||
self.module.estimate_shot_frames = original_estimate_shot_frames
|
||||
|
||||
def test_run_defaults_match_declared_ref_widget_defaults(self):
|
||||
node = self.module.H3LongVideos()
|
||||
@@ -1152,7 +1165,7 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
|
||||
module.quant_accel_note = lambda *_args, **_kwargs: ""
|
||||
module.lora_active = lambda _model: False
|
||||
module.resolve_shot_frames = lambda *_args, **_kwargs: (73, "")
|
||||
module.plan_beat_frames = lambda beats, fps, budget, per_beat=True: ([73] * len(beats), [])
|
||||
module.plan_beat_frames = lambda beats, fps, budget: ([73] * len(beats), [])
|
||||
module.dialogue_fit_warnings = lambda *_args, **_kwargs: []
|
||||
module.dialogue_filler_warnings = lambda *_args, **_kwargs: []
|
||||
module.distribute_generations = lambda anchor, beats, *_args, **_kwargs: [
|
||||
|
||||
Reference in New Issue
Block a user