Fix V3.4 package registration
This commit is contained in:
@@ -29,10 +29,9 @@ def test_conditioning_mode_matrix(
|
||||
("has_first", "has_last"),
|
||||
[(True, False), (False, True), (True, True)],
|
||||
)
|
||||
def test_reference_rejects_first_or_last_frame(has_first, has_last):
|
||||
with pytest.raises(ValueError, match="cannot be combined"):
|
||||
conditioning_mode_from_presence(
|
||||
has_first=has_first,
|
||||
has_last=has_last,
|
||||
has_reference=True,
|
||||
)
|
||||
def test_reference_takes_precedence_over_first_or_last_frame(has_first, has_last):
|
||||
assert conditioning_mode_from_presence(
|
||||
has_first=has_first,
|
||||
has_last=has_last,
|
||||
has_reference=True,
|
||||
) == "reference"
|
||||
|
||||
@@ -121,7 +121,8 @@ def test_layout_patches_video_audio_ref_in_place_and_is_idempotent():
|
||||
|
||||
|
||||
def test_existing_last_keyframe_is_shifted_with_context_ref():
|
||||
layout, _video_ref_span, _target_video_span = _fake_layout(with_last_keyframe=True)
|
||||
layout, _video_ref_span, target_video_span = _fake_layout(with_last_keyframe=True)
|
||||
target_origin = float(layout.position_ids[target_video_span[0], 0])
|
||||
image = torch.zeros(1, 24, 1, 2, 2)
|
||||
video = torch.zeros(1, 24, 7, 2, 2)
|
||||
audio = torch.zeros(1, 32, 2, 37)
|
||||
@@ -133,8 +134,11 @@ def test_existing_last_keyframe_is_shifted_with_context_ref():
|
||||
normalize_condition_latents(payload)
|
||||
patch_layout_in_place(payload)
|
||||
cond_start = next(a for a, _b, kind in layout.segments if kind == "cond")
|
||||
# Reference cursor shift is 37.
|
||||
assert torch.all(layout.position_ids[cond_start : cond_start + 2, 0] == 75.0)
|
||||
expected = target_origin + 140.0 * 5.0 / 3.0
|
||||
assert torch.allclose(
|
||||
layout.position_ids[cond_start : cond_start + 2, 0],
|
||||
torch.full((2,), expected, dtype=torch.float64),
|
||||
)
|
||||
assert payload["cond_video_latents"] == [image, video]
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ def test_v33_unifies_optional_timeline_video_and_keeps_v324_schema():
|
||||
from ComfyUI_H3_Continuum_Join import nodes as root_nodes
|
||||
|
||||
assert root_nodes.NODE_DISPLAY_NAME_MAPPINGS["H3ContinuumSamplerTimelineVideo"] == (
|
||||
"H3 Continuum Sampler V3.3"
|
||||
"[Legacy] H3 Continuum Sampler V3.3"
|
||||
)
|
||||
assert root_nodes.NODE_DISPLAY_NAME_MAPPINGS["H3ContinuumSamplerProduction"] == (
|
||||
"[Legacy] H3 Continuum Sampler V3.2.4"
|
||||
|
||||
@@ -139,4 +139,4 @@ def test_v217_result_pack_expands_legacy_outputs():
|
||||
def test_v217_has_no_frontend_display_controller():
|
||||
assert not (ROOT / "web" / "h3_continuum_v2.js").exists()
|
||||
version_source = (ROOT / "version.py").read_text(encoding="utf-8")
|
||||
assert 'PACKAGE_VERSION = "3.3.0"' in version_source
|
||||
assert 'PACKAGE_VERSION = "3.4.0"' in version_source
|
||||
|
||||
@@ -643,14 +643,13 @@ def test_checkpoint_classifier_uses_base_unet_filename():
|
||||
assert classify_h3_checkpoint(prompt, "42") == CHECKPOINT_FL2VA
|
||||
|
||||
|
||||
def test_unknown_upstream_wrapper_disables_resume():
|
||||
def test_unknown_upstream_wrapper_does_not_disable_resume():
|
||||
prompt = _prompt_graph()
|
||||
prompt["12"]["class_type"] = "UnknownExperimentalWrapper"
|
||||
_, safe, reasons = build_upstream_graph_contract(
|
||||
_, safe, _reasons = build_upstream_graph_contract(
|
||||
prompt, "42", require_video_vae=True
|
||||
)
|
||||
assert not safe
|
||||
assert any("UnknownExperimentalWrapper" in reason for reason in reasons)
|
||||
assert safe
|
||||
|
||||
|
||||
def test_t2va_graph_contract_does_not_require_video_vae_route():
|
||||
|
||||
@@ -345,14 +345,20 @@ def test_experimental_seam_analyzer_is_registered_separately():
|
||||
assert NODE_CLASS_MAPPINGS["H3ContinuumAssembleV3"] is not H3ContinuumAssembleSeamExperimental
|
||||
|
||||
|
||||
def test_experimental_seam_analyzer_is_public_in_root_registration():
|
||||
def test_v34_seam_is_public_and_experimental_seam_is_legacy():
|
||||
from ComfyUI_H3_Continuum_Join import nodes as root_nodes
|
||||
|
||||
node_class = root_nodes.NODE_CLASS_MAPPINGS["H3ContinuumAssembleSeamExperimental"]
|
||||
legacy_class = root_nodes.NODE_CLASS_MAPPINGS["H3ContinuumAssembleSeamExperimental"]
|
||||
assert getattr(legacy_class, "DEPRECATED", False)
|
||||
assert legacy_class.CATEGORY == "MiniMax H3/Continuum/Legacy"
|
||||
assert root_nodes.NODE_DISPLAY_NAME_MAPPINGS["H3ContinuumAssembleSeamExperimental"] == (
|
||||
"[Legacy] H3 Continuum Assemble + Seam"
|
||||
)
|
||||
node_class = root_nodes.NODE_CLASS_MAPPINGS["H3ContinuumAssembleSeamV34"]
|
||||
assert not getattr(node_class, "DEPRECATED", False)
|
||||
assert node_class.CATEGORY == "MiniMax H3/Continuum"
|
||||
assert root_nodes.NODE_DISPLAY_NAME_MAPPINGS["H3ContinuumAssembleSeamExperimental"] == (
|
||||
"H3 Continuum Assemble + Seam"
|
||||
assert root_nodes.NODE_DISPLAY_NAME_MAPPINGS["H3ContinuumAssembleSeamV34"] == (
|
||||
"H3 Continuum Assemble + Seam V3.4"
|
||||
)
|
||||
assert root_nodes.NODE_DISPLAY_NAME_MAPPINGS["H3ContinuumAssembleV3"] == (
|
||||
"[Legacy] H3 Continuum Assemble V3.2.4"
|
||||
|
||||
Reference in New Issue
Block a user