From 85c626cd3d2538bf6984a00a53f69919851784ca Mon Sep 17 00:00:00 2001 From: ukr8b3g-cmyk Date: Fri, 14 Aug 2026 03:24:00 +0900 Subject: [PATCH] Release H3 Continuum V3.2.2 --- CHANGELOG.md | 8 +++++++ README.md | 4 ++-- metadata.ini | 2 +- pyproject.toml | 6 ++--- reference.py | 11 +++++++++ tests/test_v217_stable_facade.py | 2 +- tests/test_v32_reference.py | 41 +++++++++++++++++++++++++------- v3/nodes.py | 32 +++++++++---------------- version.py | 2 +- 9 files changed, 71 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bec9700..788223b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.2.2 + +- Added a third ordered Reference Image input to the production sampler. +- Required Reference Images to be connected contiguously from Image 1. +- Allowed Ref2VA, FL2VA, and unverified checkpoints with Reference conditioning. +- Kept checkpoint classification as diagnostics without automatic MODEL switching. +- Kept Strict Compatibility for genuinely unsafe or unsupported H3 contracts. + ## 3.2.1 - Declared V3.2.1 stable after GitHub Actions, Windows Ref2VA generation, Spectrum Actual Prefix 2, chunk integrity and complete Auto Resume passed. diff --git a/README.md b/README.md index f6a66d0..c6d9150 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Native long-form MiniMax H3 video and audio continuation for ComfyUI. -**Stable release:** V3.2.1. The production path has passed local syntax and pytest checks, GitHub Actions, Windows generation, Ref2VA Reference + Continuation, Spectrum Actual Prefix 2, and complete Run Storage resume. +**Current package:** V3.2.2. It extends the validated V3.2.1 baseline with a third ordered Reference Image and diagnostic-only Ref2VA/FL2VA checkpoint classification. https://github.com/user-attachments/assets/bfa8c683-fc9d-48f1-9cdb-477ca110cdf2 @@ -80,7 +80,7 @@ The sampler selects the mode from connected image inputs. Reference images and First/Last Frame are mutually exclusive. `Reference 2` cannot be used without `Reference 1`. -For the formally supported Reference path, connect a MiniMax H3 **Ref2VA** MODEL upstream. With **Strict Compatibility** enabled (the default), Reference generation stops unless the upstream base checkpoint can be verified as Ref2VA. FL2VA MODEL + Reference conditioning has also worked in local testing, but requires Strict Compatibility to be disabled and remains experimental. +Reference Image 1, 1+2, or 1+2+3 may be connected. Gaps are rejected. **Ref2VA** is the reference-specialized checkpoint and may provide stronger reference fidelity, while **FL2VA + Reference** is also allowed. Checkpoint classification is diagnostic only; the sampler never switches MODELs automatically. **Strict Compatibility** remains reserved for H3 contracts that are actually unsafe or unsupported. Reference prompts should identify the images explicitly: diff --git a/metadata.ini b/metadata.ini index f716d81..8ddee59 100644 --- a/metadata.ini +++ b/metadata.ini @@ -1,4 +1,4 @@ [project] name = H3 Continuum -version = 3.2.1 +version = 3.2.2 description = Native MiniMax H3 continuation with Core VAE decode, Reference conditioning and crash-safe Run Storage. diff --git a/pyproject.toml b/pyproject.toml index 9e024ba..cc5d4e0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "comfyui-h3-continuum" -version = "3.2.1" +version = "3.2.2" description = "Integrated N-chunk continuation for ComfyUI native MiniMax H3 video and audio" readme = "README.md" requires-python = ">=3.10" -license = { text = "MIT" } +license = { file = "LICENSE" } authors = [{ name = "ukr8b3g-cmyk" }] dependencies = [] keywords = ["comfyui", "minimax-h3", "video", "audio", "continuation"] @@ -15,4 +15,4 @@ Repository = "https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum" [tool.comfy] PublisherId = "ukr8b3g-cmyk" DisplayName = "H3 Continuum" -Icon = "" +requires-comfyui = ">=0.32.0" diff --git a/reference.py b/reference.py index a804c44..5d83a0e 100644 --- a/reference.py +++ b/reference.py @@ -133,16 +133,27 @@ def prepare_reference_assets( output_width: int, output_height: int, size_mode: str, + reference_image_3: torch.Tensor | None = None, ) -> ReferenceAssets | None: if reference_image_1 is None: if reference_image_2 is not None: raise ReferenceConditioningError( "Reference Image 2 requires Reference Image 1" ) + if reference_image_3 is not None: + raise ReferenceConditioningError( + "Reference Image 3 requires Reference Images 1 and 2" + ) return None + if reference_image_3 is not None and reference_image_2 is None: + raise ReferenceConditioningError( + "Reference Image 3 requires Reference Image 2" + ) inputs = [reference_image_1] if reference_image_2 is not None: inputs.append(reference_image_2) + if reference_image_3 is not None: + inputs.append(reference_image_3) images = tuple( _resize_reference( _validate_image(f"Reference Image {index}", image), diff --git a/tests/test_v217_stable_facade.py b/tests/test_v217_stable_facade.py index 9b6d0d2..c300655 100644 --- a/tests/test_v217_stable_facade.py +++ b/tests/test_v217_stable_facade.py @@ -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.2.1"' in version_source + assert 'PACKAGE_VERSION = "3.2.2"' in version_source diff --git a/tests/test_v32_reference.py b/tests/test_v32_reference.py index 4bf5f63..e85f7c2 100644 --- a/tests/test_v32_reference.py +++ b/tests/test_v32_reference.py @@ -66,6 +66,32 @@ def test_reference_socket_rejects_image_batches(): ) +def test_three_reference_images_are_ordered_and_contiguous(): + assets = prepare_reference_assets( + reference_image_1=torch.zeros((1, 32, 32, 3)), + reference_image_2=torch.ones((1, 32, 32, 3)), + reference_image_3=torch.full((1, 32, 32, 3), 0.5), + output_width=32, + output_height=32, + size_mode=REFERENCE_SIZE_MATCH_OUTPUT, + ) + assert assets is not None + assert assets.count == 3 + assert validate_reference_prompts(["Use , , and ."], 3) == "" + + +def test_reference_image_3_rejects_gaps(): + with pytest.raises(ReferenceConditioningError, match="requires Reference Image 2"): + prepare_reference_assets( + reference_image_1=torch.zeros((1, 32, 32, 3)), + reference_image_2=None, + reference_image_3=torch.zeros((1, 32, 32, 3)), + output_width=32, + output_height=32, + size_mode=REFERENCE_SIZE_MATCH_OUTPUT, + ) + + def _reference_prompt(checkpoint_name: str) -> dict: return { "1": { @@ -79,20 +105,19 @@ def _reference_prompt(checkpoint_name: str) -> dict: } -def test_strict_reference_requires_ref2va_checkpoint(): +def test_reference_checkpoint_classification_is_diagnostic_only(): assert _validate_reference_checkpoint( _reference_prompt("minimax_h3_ref2va_pruned_int8.safetensors"), "2", strict_compatibility=True, ) == "ref2va" - with pytest.raises(ValueError, match="FL2VA checkpoint"): - _validate_reference_checkpoint( - _reference_prompt("minimax_h3_fl2va_pruned_int8.safetensors"), - "2", - strict_compatibility=True, - ) assert _validate_reference_checkpoint( _reference_prompt("minimax_h3_fl2va_pruned_int8.safetensors"), "2", - strict_compatibility=False, + strict_compatibility=True, ) == "fl2va" + assert _validate_reference_checkpoint( + _reference_prompt("minimax_h3_unknown.safetensors"), + "2", + strict_compatibility=True, + ) == "unknown" diff --git a/v3/nodes.py b/v3/nodes.py index 48163a8..e3bd357 100644 --- a/v3/nodes.py +++ b/v3/nodes.py @@ -53,24 +53,12 @@ def _validate_regenerate_storage(run_storage: str, regenerate_from: int) -> None def _validate_reference_checkpoint( prompt, unique_id, *, strict_compatibility: bool ) -> str: - from ..graph_contract import ( - CHECKPOINT_FL2VA, - CHECKPOINT_REF2VA, - classify_h3_checkpoint, - ) + from ..graph_contract import classify_h3_checkpoint - classification = classify_h3_checkpoint(prompt, unique_id) - if strict_compatibility and classification != CHECKPOINT_REF2VA: - if classification == CHECKPOINT_FL2VA: - detail = "an FL2VA checkpoint is connected" - else: - detail = "the base checkpoint cannot be verified as Ref2VA" - raise ValueError( - "Reference Images require a verified MiniMax H3 Ref2VA MODEL when " - f"Strict Compatibility is enabled; {detail}. Disable Strict " - "Compatibility only for experimental FL2VA/unknown combinations." - ) - return classification + # Checkpoint choice is diagnostic only. Strict Compatibility remains + # reserved for H3 contracts that are actually unsafe or unsupported. + _ = strict_compatibility + return classify_h3_checkpoint(prompt, unique_id) class H3ContinuumAdvancedV3: @@ -539,6 +527,7 @@ class H3ContinuumSamplerProduction(H3ContinuumSamplerV3): "last_frame": ("IMAGE",), "reference_image_1": ("IMAGE",), "reference_image_2": ("IMAGE",), + "reference_image_3": ("IMAGE",), }, "hidden": { "prompt": "PROMPT", @@ -579,6 +568,7 @@ class H3ContinuumSamplerProduction(H3ContinuumSamplerV3): prompt_overrides=None, prompt=None, unique_id=None, + reference_image_3=None, ): from ..reference import prepare_reference_assets regenerate_from = _regenerate_from_value( @@ -591,6 +581,7 @@ class H3ContinuumSamplerProduction(H3ContinuumSamplerV3): output_width=int(width), output_height=int(height), size_mode=reference_size, + reference_image_3=reference_image_3, ) if reference_assets is not None and (first_frame is not None or last_frame is not None): raise ValueError( @@ -609,11 +600,10 @@ class H3ContinuumSamplerProduction(H3ContinuumSamplerV3): return str(report) if reference_checkpoint == "ref2va": status = "Ref2VA verified." + elif reference_checkpoint == "fl2va": + status = "FL2VA; allowed, but reference fidelity may differ from Ref2VA." else: - status = ( - f"{reference_checkpoint}; Experimental because Strict " - "Compatibility is disabled." - ) + status = "unverified; execution allowed, Core contract errors remain fatal." return str(report) + "\nReference MODEL: " + status def execute(): diff --git a/version.py b/version.py index 5d7b1b9..1271c9e 100644 --- a/version.py +++ b/version.py @@ -1,6 +1,6 @@ """Package version and public schema identifiers.""" -PACKAGE_VERSION = "3.2.1" +PACKAGE_VERSION = "3.2.2" STATE_SCHEMA_VERSION = 1 PLAN_SCHEMA_VERSION = 1 PUBLIC_API_VERSION = 3