Remove legacy H3 ref image aliases

This commit is contained in:
2026-09-02 13:06:25 +00:00
parent 08630964d5
commit 6684c5f2e0
3 changed files with 42 additions and 69 deletions
-6
View File
@@ -734,12 +734,6 @@ Each slot has a stable picture number:
- `ref_2` = `<Picture 2>`
- and so on
### `ref_image_1` To `ref_image_9`
Legacy compatibility aliases for older graphs.
You should prefer `ref_1` to `ref_9` in new work.
### `ref_mode`
Controls which beats receive the reference images.
+3 -24
View File
@@ -5912,7 +5912,7 @@ class H3LongVideos:
"previous shot's last frame automatically; this socket is only the initial handoff."}),
# ref2va inputs. SOCKET NUMBER matters: prompt tags refer to these
# exact slots, even when some intermediate sockets are left empty.
# A shot using only ref_image_7 is still tagged as <Picture 7> in the
# A shot using only ref_7 is still tagged as <Picture 7> in the
# prompt and renumbered only for the per-shot tokenizer payload.
# When a mode uses all connected refs, they keep socket order.
# The tokenizer labels the carried refs <Picture 1>..<Picture N> in
@@ -5931,16 +5931,6 @@ class H3LongVideos:
"ref_7": ("REFERENCE", {"tooltip": "Reference slot <Picture 7>."}),
"ref_8": ("REFERENCE", {"tooltip": "Reference slot <Picture 8>."}),
"ref_9": ("REFERENCE", {"tooltip": "Reference slot <Picture 9>."}),
"ref_image_1": ("*", {"tooltip": "Legacy alias for ref_1. Accepts old IMAGE wiring or a "
"REFERENCE payload. Keep old graphs working without rewiring."}),
"ref_image_2": ("*", {"tooltip": "Legacy alias for ref_2. Accepts old IMAGE wiring or a REFERENCE payload."}),
"ref_image_3": ("*", {"tooltip": "Legacy alias for ref_3. Accepts old IMAGE wiring or a REFERENCE payload."}),
"ref_image_4": ("*", {"tooltip": "Legacy alias for ref_4. Accepts old IMAGE wiring or a REFERENCE payload."}),
"ref_image_5": ("*", {"tooltip": "Legacy alias for ref_5. Accepts old IMAGE wiring or a REFERENCE payload."}),
"ref_image_6": ("*", {"tooltip": "Legacy alias for ref_6. Accepts old IMAGE wiring or a REFERENCE payload."}),
"ref_image_7": ("*", {"tooltip": "Legacy alias for ref_7. Accepts old IMAGE wiring or a REFERENCE payload."}),
"ref_image_8": ("*", {"tooltip": "Legacy alias for ref_8. Accepts old IMAGE wiring or a REFERENCE payload."}),
"ref_image_9": ("*", {"tooltip": "Legacy alias for ref_9. Accepts old IMAGE wiring or a REFERENCE payload."}),
"plan_only": ("BOOLEAN", {"default": False,
"tooltip": "Preview the shot split and timing WITHOUT sampling pixels. Uses this "
"node's current settings and returns the plan in `info` almost instantly. "
@@ -6483,9 +6473,6 @@ class H3LongVideos:
ref_1=None, ref_2=None, ref_3=None, ref_4=None,
ref_5=None, ref_6=None, ref_7=None, ref_8=None,
ref_9=None,
ref_image_1=None, ref_image_2=None, ref_image_3=None, ref_image_4=None,
ref_image_5=None, ref_image_6=None, ref_image_7=None, ref_image_8=None,
ref_image_9=None,
ref_mode="auto ref2v", ref_image_size="match", ref_noise_aug=0.95,
detail_pass=False, detail_sampler_name="euler", detail_scheduler="beta",
detail_steps=8, detail_denoise=0.4,
@@ -6508,18 +6495,10 @@ class H3LongVideos:
f"computed at {H3_FPS}; set your video-save node to {H3_FPS} too")
fps = H3_FPS
w, h = parse_resolution(resolution)
legacy_ref_slots = (
ref_image_1, ref_image_2, ref_image_3, ref_image_4, ref_image_5,
ref_image_6, ref_image_7, ref_image_8, ref_image_9,
)
direct_ref_slots = tuple(
current if current is not None else legacy
for current, legacy in zip((
ref_slots = tuple((
ref_1, ref_2, ref_3, ref_4, ref_5,
ref_6, ref_7, ref_8, ref_9,
), legacy_ref_slots)
)
ref_slots = direct_ref_slots
))
normalized_ref_slots = _normalized_ref_slots(ref_slots)
connected_refs = [ref for ref in normalized_ref_slots if _reference_image(ref) is not None]
direct_ref_count = len(connected_refs)
+7 -7
View File
@@ -609,11 +609,11 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
ref_positions = [names.index(f"ref_{index}") for index in range(1, 10)]
self.assertEqual(ref_positions, list(range(ref_positions[0], ref_positions[0] + 9)))
def test_input_types_keep_legacy_ref_image_aliases(self):
def test_input_types_do_not_expose_legacy_ref_image_aliases(self):
optional = self.module.H3LongVideos.INPUT_TYPES()["optional"]
for index in range(1, 10):
self.assertIn(f"ref_image_{index}", optional)
self.assertNotIn(f"ref_image_{index}", optional)
def test_shot_seconds_tooltip_describes_ceiling_behavior(self):
optional = self.module.H3LongVideos.INPUT_TYPES()["optional"]
@@ -708,7 +708,7 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
self.assertEqual(context, "")
def test_run_uses_legacy_ref_image_inputs_when_new_slots_are_empty(self):
def test_run_uses_reference_slots_directly(self):
calls = {}
original_parse_resolution = self.module.parse_resolution
original_connected_refs = self.module._connected_refs
@@ -772,13 +772,13 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
scheduler="simple",
seed=1,
plan_only=True,
ref_image_1={"image": "legacy-1"},
ref_image_3={"image": "legacy-3"},
ref_1={"image": "live-1"},
ref_3={"image": "live-3"},
)
self.assertEqual(calls["refs"][0]["image"], "legacy-1")
self.assertEqual(calls["refs"][0]["image"], "live-1")
self.assertIsNone(calls["refs"][1])
self.assertEqual(calls["refs"][2]["image"], "legacy-3")
self.assertEqual(calls["refs"][2]["image"], "live-3")
self.assertEqual(result[2].count("ref2va: 2 reference image(s)"), 1)
finally:
self.module.parse_resolution = original_parse_resolution