From 3830cd66f6545c1a0e15ae05364a208b2a76d100 Mon Sep 17 00:00:00 2001 From: ukr8b3g-cmyk Date: Mon, 24 Aug 2026 15:57:48 +0900 Subject: [PATCH 1/2] docs: add recommended V3.5 workflow template --- CHANGELOG.md | 1 + MANIFEST.sha256 | 7 +- README.md | 7 +- README_JA.md | 6 + .../workflows/MiniMax_H3_Continuum_V35.json | 3237 +++++++++++++++++ 5 files changed, 3253 insertions(+), 5 deletions(-) create mode 100644 examples/workflows/MiniMax_H3_Continuum_V35.json diff --git a/CHANGELOG.md b/CHANGELOG.md index f9f479e..dd01408 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Added experimental `H3 Continuum Hi-Res Fix V3.5`, using a bounded pixel/VAE resize round trip before low-denoise Second Pass sampling. - Added `H3 Continuum Latent Resize V3.5` as an advanced utility; direct high-ratio latent interpolation is not the recommended main Hi-Res Fix path. - Added `H3 Continuum Assemble + Seam V3.5` with Auto, RAM, and Windows-safe disk-backed video buffers while keeping audio in RAM. +- Added the recommended V3.5 template workflow with optional Hi-Res Fix, Auto assembly, shared still-image megapixel sizing, and separate VHS Video Reference sizing. - Preserved Exact Duration, seam behavior, physical decode-group ordering, first-pass audio passthrough, and external Core VAE Decode contracts. - Kept V3.4 nodes and saved-workflow compatibility unchanged. - Validated a 9.49 GiB final IMAGE with hash-identical RAM/Disk-backed output and approximately 9.50 GiB lower Windows private memory in Disk-backed mode. diff --git a/MANIFEST.sha256 b/MANIFEST.sha256 index e7c687b..e8b6cbe 100644 --- a/MANIFEST.sha256 +++ b/MANIFEST.sha256 @@ -2,7 +2,7 @@ dca65fb1393e67f59c6f81f9411e3e745eb8f1097e9a2adf7ffc6f4e3901ca9f __init__.py 15b900d02624bea6cfe8ea25b22266a0c68b38b9f10c9089be0e38988bf2e34d .github/workflows/tests.yml 0a2f69d4cec89d440f5d5aa1ec68a7c9a741382d313f80dcddf96d13f70b3e68 .gitignore 16ea21aa8fe115ce8f6538a0268bc64762be2fd6931b3a0071a86a8cc9d218cf AGENTS.md -7b5c054c57940c7828c7ae5712cf796211b6a3bee0c50cc47fac03c3fffa0356 CHANGELOG.md +1313e8e2301cfd6aff6c97bc50858bf9450210c83bd4166a74e61fd9c66c0498 CHANGELOG.md e97e47c7585e81d9ec5fd32c0ca0b64699fd4610cd03e9d6575a91c30a10ca4e compatibility.py 4d62508f900af9f93ec320afb900c27cc9a300d1e0c0a94714258498c5ede5fc conditioning.py 71e3df269e226b1ecad597f9831c2a10b2215c8a3783652e9e9f536e99ce46c9 constants.py @@ -52,6 +52,7 @@ b8275c8cecde12aee0418cea456d1e7f4b875cbb1bce32f1f3d9e06a44dd0be1 examples/v2_pr 4e410aed8d7f6ebf11c98d4f71571e46855e4619c2bcbec921df70f29189b6b1 examples/workflows/MiniMax_H3_Continuum_V33.json 5eab33c110e07ec08ac66f289f20c295a90ca026ea5231ad6121755a28a2ded8 examples/workflows/MiniMax_H3_Continuum_V34_turbo.json 660e955c983e41947f5abfd89e66fbe5759ffda01e6c1a7164d580b0c41b2120 examples/workflows/MiniMax_H3_Continuum_V34.json +ed31ddd3d0af5e6f8dbd609e5ef51872322dbe52eaad8cae35e16342ac53dbfa examples/workflows/MiniMax_H3_Continuum_V35.json e8f41dee2240f1fcc6e8fd12448856513483ff3ae0427b2c554bb351f9ae8047 graph_contract.py 3d14acac341c63207995e2bd45cd407fdb3e2308273b1c90605adfe6f2e0bd8f hardening.py 6abdbc29472c7f9d447085b189fc47b69e110b94ef83192f9689d04000408843 INSTALL_JA.txt @@ -68,8 +69,8 @@ a7084bc1d12ab25a1ebe29a089dba72d6c1147e0f5556837e6321277562ad1f5 PACKAGE_VALIDA b470819f16fc179654dc1600721a63f0a5a14e777f4c004d574b499da6886ba5 public_api.py 16bc48b9ef6127af7e0e3ddd96791640cedf5159cd7c06452d72604f41998a52 pyproject.toml 94fdc2d545b2d4077a4d70229fd22ba3ccac21d49d1097d2873f76d04e9a3c7a pytest.ini -365f1b1ecc89f8f2ced338ce467d02384ef612441202a15064e5d1a5c6cd1bcf README_JA.md -18d3e7302db1bfe4f4417f6c520d2fcc616dceb23f703eb9e733147276b9c9a2 README.md +3a3ab9f5b9860c4b5478e37e49c06b1b102d49a408c712a25e439b6a557d7071 README_JA.md +dfcaceb3a9ed4784ca0017f864011cc9904c15dc95d5b59dd39d8a429aee28bb README.md 5d89c366b4f076fa73a2695557e0af749bf95df1dad0d55dbb2fe5b1c2519ad7 reference_audio.py 8f1744dc99f1a3a222b7d6e986f6dac1edcc0abbbe8b61a1d2606b1ca3569b3d reference_video.py 2995924fcb7bac27b548b01187d8276d2ab103c6f43416cf85400de3846c6297 reference.py diff --git a/README.md b/README.md index dadc31e..5d38176 100644 --- a/README.md +++ b/README.md @@ -122,10 +122,13 @@ This is a usability and reliability decision, not a claim that the experimental ## Example workflows +- [V3.5 recommended template](examples/workflows/MiniMax_H3_Continuum_V35.json) - [V3.4 standard](examples/workflows/MiniMax_H3_Continuum_V34.json) - [V3.4 Turbo](examples/workflows/MiniMax_H3_Continuum_V34_turbo.json) -The V3.4 templates remain valid in V3.5. A release-grade V3.5 UI workflow JSON is not bundled yet; use the connection guide above rather than older diagnostic workflows. +The V3.5 template is the recommended starting point. Hi-Res Fix is disabled by default, the V3.5 Assemble backend is set to Auto, and First Frame, Last Frame, and Reference Images 1-3 share one megapixel control. Video Reference sizing remains controlled by the VHS loader. Advanced users can bypass or rearrange the optional sections as needed. + +The V3.4 templates remain valid for saved-workflow compatibility. The templates include optional external nodes such as Spectrum, Video Helper Suite, rgthree, EasyUse, and RTX Video Super Resolution. Install, replace, connect, or bypass them according to your installation. Media and acceleration choices remain under user control. @@ -538,4 +541,4 @@ No OOM was observed in the cited recent local V3.4 checks, including two-chunk 8 ## License -See [LICENSE](LICENSE). \ No newline at end of file +See [LICENSE](LICENSE). diff --git a/README_JA.md b/README_JA.md index e1f5e46..4c9e01d 100644 --- a/README_JA.md +++ b/README_JA.md @@ -70,6 +70,12 @@ Hi-Res Fixを接続しなければV3.4 Sampling経路は変わりません。強 詳しいsocket接続・OFF時のpassthrough・既知の制限は[英語版V3.5接続ガイド](docs/V35_HIRES_FIX.md)を参照してください。 +## 推奨テンプレートワークフロー + +- [V3.5推奨テンプレート](examples/workflows/MiniMax_H3_Continuum_V35.json) + +V3.5テンプレートはHi-Res Fixが初期OFF、AssembleのBuffer BackendがAutoです。First Frame、Last Frame、Reference Image 1~3は1つのmegapixel設定を共有し、Video Referenceの解像度はVHS Load Video側で調整します。用途に応じて不要な補助経路を外したり、Advanced Second Pass経路へ組み替えたりできます。 + ## V3.4互換 V3.4ノードは保存済みワークフローを壊さないため残しています。Node ID、公開socket、Sampling、Conditioning、Terminal Merge、Assembly、Seam、Run StorageをV3.5へ置換していません。Second PassやDisk-backed Assembleを必要としない場合は、従来どおりV3.4を使用できます。 diff --git a/examples/workflows/MiniMax_H3_Continuum_V35.json b/examples/workflows/MiniMax_H3_Continuum_V35.json new file mode 100644 index 0000000..3eaaac1 --- /dev/null +++ b/examples/workflows/MiniMax_H3_Continuum_V35.json @@ -0,0 +1,3237 @@ +{ + "id": "ea97ab35-fa5e-41ed-84c4-781469b073c7", + "revision": 0, + "last_node_id": 311, + "last_link_id": 322, + "nodes": [ + { + "id": 136, + "type": "VAELoader", + "pos": [ + -770, + 1300 + ], + "size": [ + 530, + 60 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "links": [ + 102, + 295 + ] + } + ], + "title": "Audio VAE", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "VAELoader", + "models": [ + { + "name": "minimax_h3_audio_vae_fp32.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_audio_vae_fp32.safetensors", + "directory": "vae" + } + ] + }, + "widgets_values": [ + "minimax_h3_audio_vae_fp32.safetensors" + ], + "widgets_values_named": { + "vae_name": "minimax_h3_audio_vae_fp32.safetensors" + } + }, + { + "id": 256, + "type": "ResolutionSelector", + "pos": [ + -470, + 2030 + ], + "size": [ + 290, + 160 + ], + "flags": {}, + "order": 1, + "mode": 0, + "showAdvanced": false, + "inputs": [], + "outputs": [ + { + "name": "width", + "type": "INT", + "links": [ + 145 + ] + }, + { + "name": "height", + "type": "INT", + "links": [ + 146 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "ResolutionSelector" + }, + "widgets_values": [ + "1:1 (Square)", + 0.6, + 32 + ], + "widgets_values_named": { + "aspect_ratio": "1:1 (Square)", + "megapixels": 0.6, + "multiple": 32 + }, + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 147, + "type": "UNETLoader", + "pos": [ + -770, + 870 + ], + "size": [ + 530, + 90 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 124 + ] + } + ], + "title": "H3 Model", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "UNETLoader", + "models": [ + { + "name": "minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "directory": "diffusion_models" + } + ] + }, + "widgets_values": [ + "minimax\\minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "default" + ], + "widgets_values_named": { + "unet_name": "minimax\\minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "weight_dtype": "default" + } + }, + { + "id": 266, + "type": "LoadAudio", + "pos": [ + 350, + 2240 + ], + "size": [ + 290, + 140 + ], + "flags": {}, + "order": 3, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "AUDIO", + "type": "AUDIO", + "links": [ + 215 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.33.1", + "Node name for S&R": "LoadAudio" + }, + "widgets_values": [ + "audio_ace_step_00003_.mp3", + null, + null + ], + "widgets_values_named": { + "audio": "audio_ace_step_00003_.mp3", + "upload": null + } + }, + { + "id": 285, + "type": "Fast Groups Bypasser (rgthree)", + "pos": [ + 710, + 2230 + ], + "size": [ + 280, + 90 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "OPT_CONNECTION", + "type": "*", + "links": null + } + ], + "properties": { + "matchColors": "", + "matchTitle": "video audio", + "showNav": false, + "showAllGraphs": true, + "sort": "position", + "customSortAlphabet": "", + "toggleRestriction": "default" + }, + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 142, + "type": "CLIPLoader", + "pos": [ + -770, + 1010 + ], + "size": [ + 530, + 110 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 264, + 283 + ] + } + ], + "title": "MiniMax H3 Text Encoder", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "CLIPLoader", + "models": [ + { + "name": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "directory": "text_encoders" + } + ] + }, + "widgets_values": [ + "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "minimax", + "default" + ], + "widgets_values_named": { + "clip_name": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "type": "minimax", + "device": "default" + } + }, + { + "id": 286, + "type": "Power Lora Loader (rgthree)", + "pos": [ + -760, + 1450 + ], + "size": [ + 520, + 240 + ], + "flags": {}, + "order": 31, + "mode": 0, + "inputs": [ + { + "dir": 3, + "name": "model", + "type": "MODEL", + "link": 305 + }, + { + "dir": 3, + "name": "clip", + "type": "CLIP", + "link": null + } + ], + "outputs": [ + { + "dir": 4, + "name": "MODEL", + "shape": 3, + "type": "MODEL", + "links": [ + 216 + ] + }, + { + "dir": 4, + "name": "CLIP", + "shape": 3, + "type": "CLIP", + "links": null + } + ], + "properties": { + "cnr_id": "rgthree-comfy", + "ver": "1.0.2607232129", + "Show Strengths": "Single Strength", + "Match": "" + }, + "widgets_values": [ + {}, + { + "type": "PowerLoraLoaderHeaderWidget" + }, + { + "on": false, + "lora": "minimax\\minimax_h3_fl2v_lightx2v_turbo_8step_v1.0_resized_avg_rank_24_bf16.safetensors", + "strength": 1, + "strengthTwo": null + }, + { + "on": false, + "lora": "minimax\\minimax_h3_fl2v_lightx2v_turbo_4step_v1.0_768p_resized_avg_rank_31_bf16.safetensors", + "strength": 1, + "strengthTwo": null + }, + { + "on": false, + "lora": "minimax\\minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors", + "strength": 1, + "strengthTwo": null + }, + {}, + "" + ], + "widgets_values_named": { + "divider": {}, + "PowerLoraLoaderHeaderWidget": { + "type": "PowerLoraLoaderHeaderWidget" + }, + "lora_1": { + "on": false, + "lora": "minimax\\minimax_h3_fl2v_lightx2v_turbo_8step_v1.0_resized_avg_rank_24_bf16.safetensors", + "strength": 1, + "strengthTwo": null + }, + "lora_2": { + "on": false, + "lora": "minimax\\minimax_h3_fl2v_lightx2v_turbo_4step_v1.0_768p_resized_avg_rank_31_bf16.safetensors", + "strength": 1, + "strengthTwo": null + }, + "lora_3": { + "on": false, + "lora": "minimax\\minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors", + "strength": 1, + "strengthTwo": null + }, + "➕ Add Lora": "" + } + }, + { + "id": 153, + "type": "BasicScheduler", + "pos": [ + -150, + 930 + ], + "size": [ + 320, + 110 + ], + "flags": {}, + "order": 35, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 15 + } + ], + "outputs": [ + { + "name": "SIGMAS", + "type": "SIGMAS", + "links": [ + 286 + ] + } + ], + "title": "Scheduler", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "BasicScheduler" + }, + "widgets_values": [ + "simple", + 20, + 1 + ], + "widgets_values_named": { + "scheduler": "simple", + "steps": 20, + "denoise": 1 + }, + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 255, + "type": "Any Switch (rgthree)", + "pos": [ + -710, + 1800 + ], + "size": [ + 270, + 110 + ], + "flags": { + "collapsed": true + }, + "order": 32, + "mode": 0, + "inputs": [ + { + "dir": 3, + "name": "any_01", + "type": "INT", + "link": 143 + }, + { + "dir": 3, + "name": "any_02", + "type": "INT", + "link": 145 + }, + { + "dir": 3, + "name": "any_03", + "type": "INT", + "link": null + }, + { + "dir": 3, + "name": "any_04", + "type": "INT", + "link": null + }, + { + "name": "any_05", + "type": "INT", + "link": null + } + ], + "outputs": [ + { + "dir": 4, + "label": "INT", + "name": "*", + "shape": 3, + "type": "INT", + "links": [ + 296 + ] + } + ], + "properties": { + "cnr_id": "rgthree-comfy", + "ver": "1.0.2607232129" + } + }, + { + "id": 254, + "type": "Any Switch (rgthree)", + "pos": [ + -460, + 1810 + ], + "size": [ + 190, + 160 + ], + "flags": { + "collapsed": true + }, + "order": 33, + "mode": 0, + "inputs": [ + { + "dir": 3, + "name": "any_01", + "type": "INT", + "link": 144 + }, + { + "dir": 3, + "name": "any_02", + "type": "INT", + "link": 146 + }, + { + "dir": 3, + "name": "any_03", + "type": "INT", + "link": null + }, + { + "dir": 3, + "name": "any_04", + "type": "INT", + "link": null + }, + { + "name": "any_05", + "type": "INT", + "link": null + } + ], + "outputs": [ + { + "dir": 4, + "label": "INT", + "name": "*", + "shape": 3, + "type": "INT", + "links": [ + 297 + ] + } + ], + "properties": { + "cnr_id": "rgthree-comfy", + "ver": "1.0.2607232129" + } + }, + { + "id": 120, + "type": "GetImageSize", + "pos": [ + -2820, + 1780 + ], + "size": [ + 220, + 140 + ], + "flags": { + "collapsed": true + }, + "order": 29, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 2 + } + ], + "outputs": [ + { + "name": "width", + "type": "INT", + "links": [ + 143 + ] + }, + { + "name": "height", + "type": "INT", + "links": [ + 144 + ] + }, + { + "name": "batch_size", + "type": "INT", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "GetImageSize" + }, + "widgets_values": [], + "widgets_values_named": {} + }, + { + "id": 114, + "type": "LoadImage", + "pos": [ + -3180, + 880 + ], + "size": [ + 740, + 840 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 1 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "exec-eddfdf1c-ae6c-491d-9909-0b1edb176c30.png", + "image" + ], + "widgets_values_named": { + "image": "exec-eddfdf1c-ae6c-491d-9909-0b1edb176c30.png", + "upload": "image" + } + }, + { + "id": 290, + "type": "LoadImage", + "pos": [ + -2360, + 900 + ], + "size": [ + 460, + 760 + ], + "flags": {}, + "order": 7, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 255 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "exec-758fca62-818a-446e-a279-829cc126d899.png", + "image" + ], + "widgets_values_named": { + "image": "exec-758fca62-818a-446e-a279-829cc126d899.png", + "upload": "image" + } + }, + { + "id": 260, + "type": "MarkdownNote", + "pos": [ + -3660, + 880 + ], + "size": [ + 440, + 510 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: Model Links", + "properties": {}, + "widgets_values": [ + "## Model Links\n\n**vae**\n\n- [minimax_h3_video_vae_fp16.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_fp16.safetensors)\n- [minimax_h3_audio_vae_fp32.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_audio_vae_fp32.safetensors)\n\n**diffusion_models**\n\n- [minimax_h3_fl2va_pruned_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors)\n\n- [minimax_h3_ref2va_pruned_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors)\n\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│ ├── 📂 vae/\n│ │ ├── minimax_h3_video_vae_fp16.safetensors\n│ │ └── minimax_h3_audio_vae_fp32.safetensors\n│ ├── 📂 diffusion_models/\n│ │ └── minimax_h3_fl2va_pruned_int8_convrot.safetensors\n│ └── 📂 text_encoders/\n│ └── qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n" + ], + "widgets_values_named": { + "text": "## Model Links\n\n**vae**\n\n- [minimax_h3_video_vae_fp16.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_fp16.safetensors)\n- [minimax_h3_audio_vae_fp32.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_audio_vae_fp32.safetensors)\n\n**diffusion_models**\n\n- [minimax_h3_fl2va_pruned_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors)\n\n- [minimax_h3_ref2va_pruned_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors)\n\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│ ├── 📂 vae/\n│ │ ├── minimax_h3_video_vae_fp16.safetensors\n│ │ └── minimax_h3_audio_vae_fp32.safetensors\n│ ├── 📂 diffusion_models/\n│ │ └── minimax_h3_fl2va_pruned_int8_convrot.safetensors\n│ └── 📂 text_encoders/\n│ └── qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n" + }, + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 261, + "type": "MarkdownNote", + "pos": [ + -3660, + 1440 + ], + "size": [ + 440, + 420 + ], + "flags": { + "collapsed": false + }, + "order": 9, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: MiniMax H3", + "properties": {}, + "widgets_values": [ + "## MiniMax H3\n\n[MiniMax H3](https://www.minimax.io/blog/minimax-h3) is MiniMax's general-purpose, omni-modal generation model. It jointly understands text, image, video, and audio, and generates video with **native stereo audio**: voice, sound effects, and music are modeled jointly in a single forward pass, not layered on afterward. Output is up to 2K resolution, 24fps, and up to about 15 seconds.\n\n## About this workflow\n\nThis template runs the **Image to Video** task (`MiniMaxH3ImageToVideo` node), which covers both:\n\n- **t2va** (text-to-video), when no images are connected\n- **fl2va** (first/last-frame image-to-video), when `first_frame` and/or `last_frame` are connected\n\n**Key inputs**\n\n- **first_frame / last_frame**: optional keyframes; the model generates the motion between them\n- **prompt**: describe the shots, motion, and the accompanying audio (dialogue, SFX, music) in one block\n- **width / height**: set via Resolution Selector. H3's native canvas is a 768px short edge, capped at 768x1344 pixels, rounded to a multiple of 32\n- **duration (seconds)**: converted to a valid frame `length` by the Math Expression node, snapping up to the model's 17-frame-per-block (17k+5) grid at 24fps" + ], + "widgets_values_named": { + "text": "## MiniMax H3\n\n[MiniMax H3](https://www.minimax.io/blog/minimax-h3) is MiniMax's general-purpose, omni-modal generation model. It jointly understands text, image, video, and audio, and generates video with **native stereo audio**: voice, sound effects, and music are modeled jointly in a single forward pass, not layered on afterward. Output is up to 2K resolution, 24fps, and up to about 15 seconds.\n\n## About this workflow\n\nThis template runs the **Image to Video** task (`MiniMaxH3ImageToVideo` node), which covers both:\n\n- **t2va** (text-to-video), when no images are connected\n- **fl2va** (first/last-frame image-to-video), when `first_frame` and/or `last_frame` are connected\n\n**Key inputs**\n\n- **first_frame / last_frame**: optional keyframes; the model generates the motion between them\n- **prompt**: describe the shots, motion, and the accompanying audio (dialogue, SFX, music) in one block\n- **width / height**: set via Resolution Selector. H3's native canvas is a 768px short edge, capped at 768x1344 pixels, rounded to a multiple of 32\n- **duration (seconds)**: converted to a valid frame `length` by the Math Expression node, snapping up to the model's 17-frame-per-block (17k+5) grid at 24fps" + }, + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 262, + "type": "Fast Groups Bypasser (rgthree)", + "pos": [ + -2900, + 730 + ], + "size": [ + 280, + 90 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "OPT_CONNECTION", + "type": "*", + "links": null + } + ], + "properties": { + "matchColors": "", + "matchTitle": "first frame", + "showNav": false, + "showAllGraphs": true, + "sort": "position", + "customSortAlphabet": "", + "toggleRestriction": "default" + }, + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 228, + "type": "CreateVideo", + "pos": [ + 1050, + 1340 + ], + "size": [ + 290, + 110 + ], + "flags": { + "collapsed": false + }, + "order": 44, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 298 + }, + { + "name": "audio", + "shape": 7, + "type": "AUDIO", + "link": 299 + } + ], + "outputs": [ + { + "name": "VIDEO", + "type": "VIDEO", + "links": [ + 108 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.31.0", + "Node name for S&R": "CreateVideo" + }, + "widgets_values": [ + 24, + 8 + ], + "widgets_values_named": { + "fps": 24, + "bit_depth": 8 + } + }, + { + "id": 183, + "type": "easy cleanGpuUsed", + "pos": [ + 1070, + 1540 + ], + "size": [ + 200, + 30 + ], + "flags": { + "collapsed": false + }, + "order": 46, + "mode": 0, + "inputs": [ + { + "name": "anything", + "type": "*", + "link": 108 + } + ], + "outputs": [ + { + "name": "output", + "type": "*", + "links": [ + 31 + ] + } + ], + "properties": { + "cnr_id": "comfyui-easy-use", + "ver": "1.3.6", + "Node name for S&R": "easy cleanGpuUsed" + }, + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 250, + "type": "PreviewAny", + "pos": [ + 1910, + 2250 + ], + "size": [ + 480, + 630 + ], + "flags": { + "collapsed": false + }, + "order": 45, + "mode": 0, + "inputs": [ + { + "name": "source", + "type": "*", + "link": 300 + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.32.0", + "Node name for S&R": "PreviewAny" + }, + "widgets_values": [], + "widgets_values_named": {} + }, + { + "id": 139, + "type": "KSamplerSelect", + "pos": [ + -130, + 1110 + ], + "size": [ + 260, + 60 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "SAMPLER", + "type": "SAMPLER", + "links": [ + 265, + 285 + ] + } + ], + "title": "Sampler", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "KSamplerSelect" + }, + "widgets_values": [ + "res_multistep" + ], + "widgets_values_named": { + "sampler_name": "res_multistep" + }, + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 284, + "type": "ComfySwitchNode", + "pos": [ + 350, + 2080 + ], + "size": [ + 270, + 80 + ], + "flags": {}, + "order": 27, + "mode": 4, + "inputs": [ + { + "name": "on_false", + "type": "AUDIO", + "link": 215 + }, + { + "name": "on_true", + "type": "AUDIO", + "link": 214 + } + ], + "outputs": [ + { + "name": "output", + "type": "AUDIO", + "links": [ + 294 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.33.0", + "Node name for S&R": "ComfySwitchNode" + }, + "widgets_values": [ + true + ], + "widgets_values_named": { + "switch": true + } + }, + { + "id": 150, + "type": "SpectrumApplyMiniMaxH3", + "pos": [ + -170, + 1270 + ], + "size": [ + 340, + 640 + ], + "flags": {}, + "order": 34, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 216 + } + ], + "outputs": [ + { + "name": "model", + "type": "MODEL", + "links": [ + 15, + 239, + 263, + 282 + ] + } + ], + "title": "Spectrum", + "properties": { + "cnr_id": "comfyui-spectrum-minimax-h3", + "ver": "9395bf98fc60a04c5f588de7b2bb33516a0b622f", + "Node name for S&R": "SpectrumApplyMiniMaxH3" + }, + "widgets_values": [ + false, + 0.5, + 1, + 0.1, + 2, + 0.75, + 1, + 1, + 8, + false, + "system_ram", + true, + false, + false, + true, + 0, + "system_ram", + "off", + 0.65, + false, + false, + "coordinate_rls", + "hard_clip", + 0.4, + "no_attenuation" + ], + "widgets_values_named": { + "enabled": false, + "blend_weight": 0.5, + "degree": 1, + "ridge_lambda": 0.1, + "window_size": 2, + "flex_window": 0.75, + "warmup_steps": 1, + "tail_actual_steps": 1, + "max_history": 8, + "debug": false, + "history_storage": "system_ram", + "bootstrap_first_forecast": true, + "anchor_residual_feedback": false, + "selective_rollback_correction": false, + "offline_smoothing_replay": true, + "audio_blend_weight": 0, + "offline_archive_storage": "system_ram", + "model_aware_mode": "off", + "model_aware_risk_threshold": 0.65, + "model_aware_trust_shrinkage": false, + "model_aware_replay_generic_correction": false, + "generic_correction_mode": "coordinate_rls", + "generic_correction_limiter": "hard_clip", + "generic_correction_limit": 0.4, + "generic_correction_attenuation": "no_attenuation" + } + }, + { + "id": 298, + "type": "Fast Groups Bypasser (rgthree)", + "pos": [ + -2260, + 740 + ], + "size": [ + 280, + 90 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "OPT_CONNECTION", + "type": "*", + "links": null + } + ], + "properties": { + "matchColors": "", + "matchTitle": "last frame", + "showNav": false, + "showAllGraphs": true, + "sort": "position", + "customSortAlphabet": "", + "toggleRestriction": "default" + }, + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 227, + "type": "VAEDecodeAudio", + "pos": [ + 1100, + 1230 + ], + "size": [ + 190, + 50 + ], + "flags": { + "collapsed": false + }, + "order": 41, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 271 + }, + { + "name": "vae", + "type": "VAE", + "link": 102 + } + ], + "outputs": [ + { + "name": "AUDIO", + "type": "AUDIO", + "links": [ + 302 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "VAEDecodeAudio" + } + }, + { + "id": 226, + "type": "VAEDecode", + "pos": [ + 1090, + 1090 + ], + "size": [ + 200, + 50 + ], + "flags": { + "collapsed": false + }, + "order": 40, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 270 + }, + { + "name": "vae", + "type": "VAE", + "link": 103 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 301 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 302, + "type": "H3ContinuumHiResFixV35", + "pos": [ + 610, + 1070 + ], + "size": [ + 340, + 460 + ], + "flags": {}, + "order": 39, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 263 + }, + { + "name": "clip", + "type": "CLIP", + "link": 264 + }, + { + "name": "sampler", + "type": "SAMPLER", + "link": 265 + }, + { + "name": "sigmas", + "type": "SIGMAS", + "link": 266 + }, + { + "name": "video_latents", + "type": "LATENT", + "link": 277 + }, + { + "name": "audio_latents", + "type": "LATENT", + "link": 278 + }, + { + "name": "assembly_plan", + "type": "H3_CONTINUUM_ASSEMBLY_PLAN", + "link": 279 + }, + { + "name": "refine_context", + "shape": 7, + "type": "H3_CONTINUUM_REFINE_CONTEXT", + "link": 307 + }, + { + "name": "video_vae", + "shape": 7, + "type": "VAE", + "link": 308 + } + ], + "outputs": [ + { + "name": "video_latents", + "shape": 6, + "type": "LATENT", + "links": [ + 270 + ] + }, + { + "name": "audio_latents", + "shape": 6, + "type": "LATENT", + "links": [ + 271 + ] + }, + { + "name": "updated_assembly_plan", + "type": "H3_CONTINUUM_ASSEMBLY_PLAN", + "links": [ + 303 + ] + }, + { + "name": "status", + "type": "STRING", + "links": [ + 276 + ] + } + ], + "properties": { + "Node name for S&R": "H3ContinuumHiResFixV35" + }, + "widgets_values": [ + false, + "lanczos", + 2, + 42, + "fixed" + ], + "widgets_values_named": { + "enabled": false, + "upscale_method": "lanczos", + "scale_by": 2, + "refine_seed": 42, + "control_after_generate": "fixed" + }, + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 249, + "type": "PreviewAny", + "pos": [ + 1070, + 2190 + ], + "size": [ + 790, + 650 + ], + "flags": { + "collapsed": false + }, + "order": 38, + "mode": 0, + "inputs": [ + { + "name": "source", + "type": "*", + "link": 280 + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.32.0", + "Node name for S&R": "PreviewAny" + }, + "widgets_values": [], + "widgets_values_named": {} + }, + { + "id": 304, + "type": "PreviewAny", + "pos": [ + 1080, + 2930 + ], + "size": [ + 790, + 420 + ], + "flags": { + "collapsed": false + }, + "order": 42, + "mode": 0, + "inputs": [ + { + "name": "source", + "type": "*", + "link": 276 + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": null + } + ], + "title": "Hi-Res Fix status — NATIVE AUTO 576→768", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.32.0", + "Node name for S&R": "PreviewAny" + }, + "widgets_values": [], + "widgets_values_named": {} + }, + { + "id": 307, + "type": "MiniMaxChunkFeedForward", + "pos": [ + 170, + 660 + ], + "size": [ + 320, + 90 + ], + "flags": {}, + "order": 28, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 306 + } + ], + "outputs": [ + { + "name": "model", + "type": "MODEL", + "links": [ + 305 + ] + } + ], + "properties": { + "cnr_id": "comfyui-kjnodes", + "ver": "1.5.0", + "Node name for S&R": "MiniMaxChunkFeedForward" + }, + "widgets_values": [ + 2, + 4096 + ], + "widgets_values_named": { + "chunks": 2, + "seq_threshold": 4096 + } + }, + { + "id": 240, + "type": "MiniMaxH3MemoryEfficientSageAttentionPatch", + "pos": [ + -230, + 670 + ], + "size": [ + 330, + 30 + ], + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 124 + } + ], + "outputs": [ + { + "name": "model", + "type": "MODEL", + "links": [ + 306 + ] + } + ], + "properties": { + "cnr_id": "comfyui-kjnodes", + "ver": "1.5.0", + "Node name for S&R": "MiniMaxH3MemoryEfficientSageAttentionPatch" + } + }, + { + "id": 135, + "type": "VAELoader", + "pos": [ + -770, + 1170 + ], + "size": [ + 530, + 60 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "links": [ + 103, + 284, + 308 + ] + } + ], + "title": "Video VAE", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "VAELoader", + "models": [ + { + "name": "minimax_h3_video_vae_fp16.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_fp16.safetensors", + "directory": "vae" + } + ] + }, + "widgets_values": [ + "minimax_h3_video_vae_fp16.safetensors" + ], + "widgets_values_named": { + "vae_name": "minimax_h3_video_vae_fp16.safetensors" + } + }, + { + "id": 295, + "type": "ImageScaleToTotalPixels", + "pos": [ + -2290, + 1810 + ], + "size": [ + 280, + 110 + ], + "flags": { + "collapsed": false + }, + "order": 22, + "mode": 4, + "showAdvanced": true, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 255 + }, + { + "name": "megapixels", + "type": "FLOAT", + "widget": { + "name": "megapixels" + }, + "link": 257 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 289 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "ImageScaleToTotalPixels" + }, + "widgets_values": [ + "area", + 0.3, + 32 + ], + "widgets_values_named": { + "upscale_method": "area", + "megapixels": 0.3, + "resolution_steps": 32 + }, + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 119, + "type": "ImageScaleToTotalPixels", + "pos": [ + -3170, + 1780 + ], + "size": [ + 280, + 110 + ], + "flags": { + "collapsed": true + }, + "order": 23, + "mode": 0, + "showAdvanced": true, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 1 + }, + { + "name": "megapixels", + "type": "FLOAT", + "widget": { + "name": "megapixels" + }, + "link": 258 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 2, + 21 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "ImageScaleToTotalPixels" + }, + "widgets_values": [ + "area", + 0.3, + 32 + ], + "widgets_values_named": { + "upscale_method": "area", + "megapixels": 0.3, + "resolution_steps": 32 + }, + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 264, + "type": "LoadImage", + "pos": [ + -1090, + 2070 + ], + "size": [ + 540, + 520 + ], + "flags": {}, + "order": 14, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 171, + 315 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "title": "Reference 2", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "exec-f4d320af-42a8-4912-ad5d-d41461584f06.png", + "image" + ], + "widgets_values_named": { + "image": "exec-f4d320af-42a8-4912-ad5d-d41461584f06.png", + "upload": "image" + } + }, + { + "id": 257, + "type": "LoadImage", + "pos": [ + -1670, + 2060 + ], + "size": [ + 540, + 520 + ], + "flags": {}, + "order": 15, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 172, + 316 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "title": "Reference 2", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "exec-a07e2530-4d97-4af7-b18e-02075c30082b - Copy.png", + "image" + ], + "widgets_values_named": { + "image": "exec-a07e2530-4d97-4af7-b18e-02075c30082b - Copy.png", + "upload": "image" + } + }, + { + "id": 258, + "type": "LoadImage", + "pos": [ + -2240, + 2070 + ], + "size": [ + 540, + 520 + ], + "flags": {}, + "order": 16, + "mode": 4, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 173, + 317 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "title": "Reference 1", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "exec-05b19965-8744-452a-b823-11bd8983034a.png", + "image" + ], + "widgets_values_named": { + "image": "exec-05b19965-8744-452a-b823-11bd8983034a.png", + "upload": "image" + } + }, + { + "id": 182, + "type": "easy cleanGpuUsed", + "pos": [ + -2740, + 1820 + ], + "size": [ + 170, + 30 + ], + "flags": { + "collapsed": false + }, + "order": 30, + "mode": 0, + "inputs": [ + { + "name": "anything", + "type": "*", + "link": 21 + } + ], + "outputs": [ + { + "name": "output", + "type": "*", + "links": [ + 288 + ] + } + ], + "properties": { + "cnr_id": "comfyui-easy-use", + "ver": "1.3.6", + "Node name for S&R": "easy cleanGpuUsed" + }, + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 259, + "type": "Fast Groups Bypasser (rgthree)", + "pos": [ + -460, + 2260 + ], + "size": [ + 280, + 80 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "OPT_CONNECTION", + "type": "*", + "links": null + } + ], + "properties": { + "matchColors": "", + "matchTitle": "Reference image", + "showNav": false, + "showAllGraphs": true, + "sort": "position", + "customSortAlphabet": "", + "toggleRestriction": "default" + }, + "color": "#2a363b", + "bgcolor": "#3f5159" + }, + { + "id": 292, + "type": "BasicScheduler", + "pos": [ + 650, + 870 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 36, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 239 + } + ], + "outputs": [ + { + "name": "SIGMAS", + "type": "SIGMAS", + "links": [ + 266 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.33.3", + "Node name for S&R": "BasicScheduler" + }, + "widgets_values": [ + "simple", + 10, + 0.35 + ], + "widgets_values_named": { + "scheduler": "simple", + "steps": 10, + "denoise": 0.35 + } + }, + { + "id": 191, + "type": "SaveVideo", + "pos": [ + 1430, + 810 + ], + "size": [ + 940, + 1038 + ], + "flags": { + "collapsed": false + }, + "order": 47, + "mode": 0, + "inputs": [ + { + "name": "video", + "type": "VIDEO", + "link": 31 + } + ], + "outputs": [ + { + "name": "video", + "type": "VIDEO", + "links": null + } + ], + "title": "Save 3x5s Video", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "SaveVideo" + }, + "widgets_values": [ + "video/MiniMax_H3", + "auto", + "auto" + ], + "widgets_values_named": { + "filename_prefix": "video/MiniMax_H3", + "format": "auto", + "codec": "auto" + } + }, + { + "id": 297, + "type": "PrimitiveFloat", + "pos": [ + -2980, + 2250 + ], + "size": [ + 270, + 60 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "FLOAT", + "type": "FLOAT", + "links": [ + 257, + 258, + 309, + 310, + 311 + ] + } + ], + "title": "megapixels", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.33.3", + "Node name for S&R": "PrimitiveFloat" + }, + "widgets_values": [ + 0.3 + ], + "widgets_values_named": { + "value": 0.3 + }, + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 310, + "type": "ImageScaleToTotalPixels", + "pos": [ + -970, + 2670 + ], + "size": [ + 280, + 110 + ], + "flags": { + "collapsed": true + }, + "order": 26, + "mode": 4, + "showAdvanced": true, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 315 + }, + { + "name": "megapixels", + "type": "FLOAT", + "widget": { + "name": "megapixels" + }, + "link": 311 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 318 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "ImageScaleToTotalPixels" + }, + "widgets_values": [ + "area", + 0.3, + 32 + ], + "widgets_values_named": { + "upscale_method": "area", + "megapixels": 0.3, + "resolution_steps": 32 + }, + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 309, + "type": "ImageScaleToTotalPixels", + "pos": [ + -1490, + 2660 + ], + "size": [ + 280, + 110 + ], + "flags": { + "collapsed": true + }, + "order": 25, + "mode": 4, + "showAdvanced": true, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 316 + }, + { + "name": "megapixels", + "type": "FLOAT", + "widget": { + "name": "megapixels" + }, + "link": 310 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 320 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "ImageScaleToTotalPixels" + }, + "widgets_values": [ + "area", + 0.3, + 32 + ], + "widgets_values_named": { + "upscale_method": "area", + "megapixels": 0.3, + "resolution_steps": 32 + }, + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 308, + "type": "ImageScaleToTotalPixels", + "pos": [ + -2100, + 2660 + ], + "size": [ + 280, + 110 + ], + "flags": { + "collapsed": true + }, + "order": 24, + "mode": 4, + "showAdvanced": true, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 317 + }, + { + "name": "megapixels", + "type": "FLOAT", + "widget": { + "name": "megapixels" + }, + "link": 309 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 321 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.30.0", + "Node name for S&R": "ImageScaleToTotalPixels" + }, + "widgets_values": [ + "area", + 0.3, + 32 + ], + "widgets_values_named": { + "upscale_method": "area", + "megapixels": 0.3, + "resolution_steps": 32 + }, + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 281, + "type": "VHS_LoadVideo", + "pos": [ + -120, + 2100 + ], + "size": [ + 430, + 734 + ], + "flags": {}, + "order": 19, + "mode": 4, + "inputs": [ + { + "name": "meta_batch", + "shape": 7, + "type": "VHS_BatchManager", + "link": null + }, + { + "name": "vae", + "shape": 7, + "type": "VAE", + "link": null + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 322 + ] + }, + { + "name": "frame_count", + "type": "INT", + "links": null + }, + { + "name": "audio", + "type": "AUDIO", + "links": [ + 214 + ] + }, + { + "name": "video_info", + "type": "VHS_VIDEOINFO", + "links": null + } + ], + "properties": { + "cnr_id": "comfyui-videohelpersuite", + "ver": "1.7.9", + "Node name for S&R": "VHS_LoadVideo" + }, + "widgets_values": { + "video": "MiniMax_H3_Continuum_V31_00103_.mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 0, + "skip_first_frames": 0, + "select_every_nth": 1, + "format": "AnimateDiff", + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "MiniMax_H3_Continuum_V31_00103_.mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 0, + "skip_first_frames": 0, + "select_every_nth": 1 + } + } + }, + "widgets_values_named": { + "video": "MiniMax_H3_Continuum_V31_00103_.mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 0, + "skip_first_frames": 0, + "select_every_nth": 1, + "format": "AnimateDiff", + "choose video to upload": null, + "videopreview": { + "hidden": false, + "paused": false, + "params": { + "filename": "MiniMax_H3_Continuum_V31_00103_.mp4", + "type": "input", + "format": "video/mp4", + "force_rate": 0, + "custom_width": 0, + "custom_height": 0, + "frame_load_cap": 0, + "skip_first_frames": 0, + "select_every_nth": 1 + } + } + } + }, + { + "id": 306, + "type": "H3ContinuumAssembleSeamV35", + "pos": [ + 1010, + 800 + ], + "size": [ + 360, + 220 + ], + "flags": {}, + "order": 43, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 301 + }, + { + "name": "audio", + "type": "AUDIO", + "link": 302 + }, + { + "name": "assembly_plan", + "type": "H3_CONTINUUM_ASSEMBLY_PLAN", + "link": 303 + }, + { + "name": "driving_audio", + "shape": 7, + "type": "AUDIO", + "link": 304 + } + ], + "outputs": [ + { + "name": "images", + "type": "IMAGE", + "links": [ + 298 + ] + }, + { + "name": "audio", + "type": "AUDIO", + "links": [ + 299 + ] + }, + { + "name": "report", + "type": "STRING", + "links": [ + 300 + ] + } + ], + "properties": { + "Node name for S&R": "H3ContinuumAssembleSeamV35" + }, + "widgets_values": [ + true, + "Auto", + "Auto", + "Auto", + "Detailed Report" + ], + "widgets_values_named": { + "exact_total_duration": true, + "audio_seam": "Auto", + "video_seam": "Auto", + "buffer_backend": "Auto", + "diagnostics": "Detailed Report" + }, + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 305, + "type": "H3ContinuumSamplerV35", + "pos": [ + 230, + 930 + ], + "size": [ + 300, + 800 + ], + "flags": {}, + "order": 37, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 282 + }, + { + "name": "clip", + "type": "CLIP", + "link": 283 + }, + { + "name": "video_vae", + "type": "VAE", + "link": 284 + }, + { + "name": "sampler", + "type": "SAMPLER", + "link": 285 + }, + { + "name": "sigmas", + "type": "SIGMAS", + "link": 286 + }, + { + "label": "Sequence Prompt", + "name": "sequence_prompt", + "type": "STRING", + "link": 287 + }, + { + "name": "first_frame", + "shape": 7, + "type": "IMAGE", + "link": 288 + }, + { + "name": "last_frame", + "shape": 7, + "type": "IMAGE", + "link": 289 + }, + { + "name": "reference_image_1", + "shape": 7, + "type": "IMAGE", + "link": 321 + }, + { + "name": "reference_image_2", + "shape": 7, + "type": "IMAGE", + "link": 320 + }, + { + "name": "reference_image_3", + "shape": 7, + "type": "IMAGE", + "link": 318 + }, + { + "label": "Video Reference", + "name": "reference_video_1", + "shape": 7, + "type": "IMAGE", + "link": 322 + }, + { + "name": "driving_audio", + "shape": 7, + "type": "AUDIO", + "link": 294 + }, + { + "name": "audio_vae", + "shape": 7, + "type": "VAE", + "link": 295 + }, + { + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 296 + }, + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 297 + } + ], + "outputs": [ + { + "name": "video_latents", + "shape": 6, + "type": "LATENT", + "links": [ + 277 + ] + }, + { + "name": "audio_latents", + "shape": 6, + "type": "LATENT", + "links": [ + 278 + ] + }, + { + "name": "assembly_plan", + "type": "H3_CONTINUUM_ASSEMBLY_PLAN", + "links": [ + 279 + ] + }, + { + "name": "status", + "type": "STRING", + "links": [ + 280 + ] + }, + { + "name": "driving_audio", + "type": "AUDIO", + "links": [ + 304 + ] + }, + { + "name": "refine_context", + "type": "H3_CONTINUUM_REFINE_CONTEXT", + "links": [ + 307 + ] + } + ], + "properties": { + "Node name for S&R": "H3ContinuumSamplerV35" + }, + "widgets_values": [ + "Auto", + 1, + 5, + 1344, + 768, + "Balanced — 22 frames", + 1025049120664532, + "randomize", + true, + "Detailed Report", + "Auto", + 0, + false, + true, + true, + "Off", + "", + "Match Output", + "d1c61168-c72e-44d1-9b78-1c9adb4eba0e", + "Efficient - 0.4 MP" + ], + "widgets_values_named": { + "prompt_mode": "Auto", + "chunks": 1, + "chunk_seconds": 5, + "width": 1344, + "height": 768, + "continuity": "Balanced — 22 frames", + "base_seed": 1025049120664532, + "control_after_generate": "randomize", + "audio_continuity": true, + "diagnostics": "Detailed Report", + "reroll_from_chunk": "Auto", + "reroll_nonce": 0, + "strict_compatibility": false, + "debug": true, + "show_preview": true, + "run_storage": "Off", + "run_name": "", + "reference_size": "Match Output", + "project_id": "d1c61168-c72e-44d1-9b78-1c9adb4eba0e", + "video_reference_size": "Efficient - 0.4 MP" + }, + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 188, + "type": "PrimitiveStringMultiline", + "pos": [ + -1810, + 860 + ], + "size": [ + 1010, + 1030 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 287 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.31.0", + "Node name for S&R": "PrimitiveStringMultiline" + }, + "widgets_values": [ + "" + ], + "widgets_values_named": { + "value": "" + } + } + ], + "links": [ + [ + 1, + 114, + 0, + 119, + 0, + "IMAGE" + ], + [ + 2, + 119, + 0, + 120, + 0, + "IMAGE" + ], + [ + 15, + 150, + 0, + 153, + 0, + "MODEL" + ], + [ + 21, + 119, + 0, + 182, + 0, + "IMAGE" + ], + [ + 31, + 183, + 0, + 191, + 0, + "VIDEO" + ], + [ + 102, + 136, + 0, + 227, + 1, + "VAE" + ], + [ + 103, + 135, + 0, + 226, + 1, + "VAE" + ], + [ + 108, + 228, + 0, + 183, + 0, + "VIDEO" + ], + [ + 124, + 147, + 0, + 240, + 0, + "MODEL" + ], + [ + 143, + 120, + 0, + 255, + 0, + "INT" + ], + [ + 144, + 120, + 1, + 254, + 0, + "INT" + ], + [ + 145, + 256, + 0, + 255, + 1, + "INT" + ], + [ + 146, + 256, + 1, + 254, + 1, + "INT" + ], + [ + 214, + 281, + 2, + 284, + 1, + "AUDIO" + ], + [ + 215, + 266, + 0, + 284, + 0, + "AUDIO" + ], + [ + 216, + 286, + 0, + 150, + 0, + "MODEL" + ], + [ + 239, + 150, + 0, + 292, + 0, + "MODEL" + ], + [ + 255, + 290, + 0, + 295, + 0, + "IMAGE" + ], + [ + 257, + 297, + 0, + 295, + 1, + "FLOAT" + ], + [ + 258, + 297, + 0, + 119, + 1, + "FLOAT" + ], + [ + 263, + 150, + 0, + 302, + 0, + "MODEL" + ], + [ + 264, + 142, + 0, + 302, + 1, + "CLIP" + ], + [ + 265, + 139, + 0, + 302, + 2, + "SAMPLER" + ], + [ + 266, + 292, + 0, + 302, + 3, + "SIGMAS" + ], + [ + 270, + 302, + 0, + 226, + 0, + "LATENT" + ], + [ + 271, + 302, + 1, + 227, + 0, + "LATENT" + ], + [ + 276, + 302, + 3, + 304, + 0, + "STRING" + ], + [ + 277, + 305, + 0, + 302, + 4, + "LATENT" + ], + [ + 278, + 305, + 1, + 302, + 5, + "LATENT" + ], + [ + 279, + 305, + 2, + 302, + 6, + "H3_CONTINUUM_ASSEMBLY_PLAN" + ], + [ + 280, + 305, + 3, + 249, + 0, + "STRING" + ], + [ + 282, + 150, + 0, + 305, + 0, + "MODEL" + ], + [ + 283, + 142, + 0, + 305, + 1, + "CLIP" + ], + [ + 284, + 135, + 0, + 305, + 2, + "VAE" + ], + [ + 285, + 139, + 0, + 305, + 3, + "SAMPLER" + ], + [ + 286, + 153, + 0, + 305, + 4, + "SIGMAS" + ], + [ + 287, + 188, + 0, + 305, + 5, + "STRING" + ], + [ + 288, + 182, + 0, + 305, + 6, + "IMAGE" + ], + [ + 289, + 295, + 0, + 305, + 7, + "IMAGE" + ], + [ + 294, + 284, + 0, + 305, + 12, + "AUDIO" + ], + [ + 295, + 136, + 0, + 305, + 13, + "VAE" + ], + [ + 296, + 255, + 0, + 305, + 14, + "INT" + ], + [ + 297, + 254, + 0, + 305, + 15, + "INT" + ], + [ + 298, + 306, + 0, + 228, + 0, + "IMAGE" + ], + [ + 299, + 306, + 1, + 228, + 1, + "AUDIO" + ], + [ + 300, + 306, + 2, + 250, + 0, + "STRING" + ], + [ + 301, + 226, + 0, + 306, + 0, + "IMAGE" + ], + [ + 302, + 227, + 0, + 306, + 1, + "AUDIO" + ], + [ + 303, + 302, + 2, + 306, + 2, + "H3_CONTINUUM_ASSEMBLY_PLAN" + ], + [ + 304, + 305, + 4, + 306, + 3, + "AUDIO" + ], + [ + 305, + 307, + 0, + 286, + 0, + "MODEL" + ], + [ + 306, + 240, + 0, + 307, + 0, + "MODEL" + ], + [ + 307, + 305, + 5, + 302, + 7, + "H3_CONTINUUM_REFINE_CONTEXT" + ], + [ + 308, + 135, + 0, + 302, + 8, + "VAE" + ], + [ + 309, + 297, + 0, + 308, + 1, + "FLOAT" + ], + [ + 310, + 297, + 0, + 309, + 1, + "FLOAT" + ], + [ + 311, + 297, + 0, + 310, + 1, + "FLOAT" + ], + [ + 315, + 264, + 0, + 310, + 0, + "IMAGE" + ], + [ + 316, + 257, + 0, + 309, + 0, + "IMAGE" + ], + [ + 317, + 258, + 0, + 308, + 0, + "IMAGE" + ], + [ + 318, + 310, + 0, + 305, + 10, + "IMAGE" + ], + [ + 320, + 309, + 0, + 305, + 9, + "IMAGE" + ], + [ + 321, + 308, + 0, + 305, + 8, + "IMAGE" + ], + [ + 322, + 281, + 0, + 305, + 11, + "IMAGE" + ] + ], + "groups": [ + { + "id": 1, + "title": "Shared H3 Models and Accelerators", + "bounding": [ + -1850, + 760, + 2410, + 1180 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 2, + "title": "first frame", + "bounding": [ + -3180, + 810, + 760, + 1130 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 3, + "title": "Reference image", + "bounding": [ + -2260, + 1990, + 1750, + 740 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 4, + "title": "video audio", + "bounding": [ + -140, + 2000, + 830, + 830 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 6, + "title": "last frame", + "bounding": [ + -2380, + 820, + 500, + 1120 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 7, + "title": "H3 Continuum Second Pass", + "bounding": [ + 580, + 760, + 390, + 1190 + ], + "color": "#3f789e", + "flags": {} + } + ], + "config": {}, + "extra": { + "frontendVersion": "1.49.6", + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "ds": { + "scale": 0.46650738020973403, + "offset": [ + 2427.315185198168, + -587.2022768864995 + ] + }, + "VHS_MetadataImage": false, + "VHS_KeepIntermediate": true, + "reroutes": [ + { + "id": 1, + "pos": [ + -2310, + 2654 + ], + "linkIds": [ + 309, + 310, + 311 + ] + } + ], + "linkExtensions": [ + { + "id": 309, + "parentId": 1 + }, + { + "id": 310, + "parentId": 1 + }, + { + "id": 311, + "parentId": 1 + } + ] + }, + "version": 0.4 +} \ No newline at end of file From a704aa961fc2ba0c19aef6f2ecfdcb46fa9384b2 Mon Sep 17 00:00:00 2001 From: ukr8b3g-cmyk Date: Mon, 24 Aug 2026 17:30:43 +0900 Subject: [PATCH 2/2] feat: expose Reference Audio in V3.5 sampler --- MANIFEST.sha256 | 77 ++++++++------- tests/test_v31_run_storage.py | 65 ++++++++++++ tests/test_v351_reference_audio.py | 154 +++++++++++++++++++++++++++++ tests/test_v35_context_sampler.py | 51 ++++++++++ v3/driving_nodes.py | 33 ++++++- 5 files changed, 340 insertions(+), 40 deletions(-) create mode 100644 tests/test_v351_reference_audio.py diff --git a/MANIFEST.sha256 b/MANIFEST.sha256 index e8b6cbe..e24f44d 100644 --- a/MANIFEST.sha256 +++ b/MANIFEST.sha256 @@ -1,13 +1,13 @@ dca65fb1393e67f59c6f81f9411e3e745eb8f1097e9a2adf7ffc6f4e3901ca9f __init__.py -15b900d02624bea6cfe8ea25b22266a0c68b38b9f10c9089be0e38988bf2e34d .github/workflows/tests.yml -0a2f69d4cec89d440f5d5aa1ec68a7c9a741382d313f80dcddf96d13f70b3e68 .gitignore -16ea21aa8fe115ce8f6538a0268bc64762be2fd6931b3a0071a86a8cc9d218cf AGENTS.md -1313e8e2301cfd6aff6c97bc50858bf9450210c83bd4166a74e61fd9c66c0498 CHANGELOG.md +31c3aebb287fe73bfb567db41b4539058f8ef074dae400405f7b7a44dc5b9cbc .github/workflows/tests.yml +85eada29c12706d55b78e4d8100899d1dadde4d9867406b8bac4eec22b81c6b6 .gitignore +b3df39256d3d6a2a955c6447365714ff4460d461cf31a714e841f97d5a4c2353 AGENTS.md +154b9568464a52226c3aa549b4b8f7eab09da3ed08f53e0eab3595584d11756f CHANGELOG.md e97e47c7585e81d9ec5fd32c0ca0b64699fd4610cd03e9d6575a91c30a10ca4e compatibility.py -4d62508f900af9f93ec320afb900c27cc9a300d1e0c0a94714258498c5ede5fc conditioning.py +16148b2175b371e082f2c623f6084bb45919d9eb5e4c478f882920c6761b5f6a conditioning.py 71e3df269e226b1ecad597f9831c2a10b2215c8a3783652e9e9f536e99ce46c9 constants.py cf255b8a635471229aebadc926acfdcacb65963adbcb9e0f9505d04eada2c6b5 continuation.py -f9375629fa1a2c4d3538442f0c3192d7ba2f46fe9544fb2e21f0c144b53d608c docs/AB_TEST_LOG_JA.md +23db6dadd0848345c74d066d421bdc6f695cd524cb6373078bcf105a10bb3830 docs/AB_TEST_LOG_JA.md c93a3e52e4deabe5ef0db7f34a7605856a543089574ba17227e697e9a2c0139a docs/ARCHITECTURE.md 7660570840229b6fcbe62f0fbb52966d0099d64d7e6f01a739fbf9899293c8e4 docs/FUTURE_ROADMAP.md 9a634b4ff6c9ca98285f6b250402a3d0e67d29f031e134d9bfcab54c119ed337 docs/images/comfyui-manager-h3-continuum.png @@ -27,8 +27,8 @@ ff8d901d05aa89f9b698c60b3d11534ef97982b3e22e9ede6255a85149a669c4 docs/images/v3 a53796f7a904d675e80a2276c20d68502f03a3958529278e6ce9465baaf1c4af docs/images/v35-hires-fix-node.png 5a23f232a8b795226e8255e6e2e3248b0130f1c7ce276d50370d0333d6a62ef0 docs/images/v35-second-pass-node.png 93f07aa727b34802bce3d333426b8ba2af522500882a6d222d00cf577ca82e49 docs/SEAM_TEST_SOURCE_JA.md -2c13aefd137db92a3dbf5576e9442d58012b1f0de1240c07d039ceeb702e7c1f docs/V2_1_4_UI_SIMPLIFICATION.md -b08022df068576c759c8bf80ac6b6519693f3c65c917f1822aeb06ea359aa5b1 docs/V2_1_5_UI_SERIALIZATION_STABILITY.md +90acddd795d84c5a24f79598670aec1655eaf58d45fd6d362dc758e2b880a071 docs/V2_1_4_UI_SIMPLIFICATION.md +61805ebbfa2bb2451c4fc8a2bed046073cc135b93ddc4b52dca61a0459c8d3d6 docs/V2_1_5_UI_SERIALIZATION_STABILITY.md a032738b0bc5acb136e92d8bf7694643a5f518b9c7fc0fc878d66d81ba8b1b04 docs/V2_1_6_UNIFIED_UI.md 384e3841603f7c6c8286ef147e93aaf7d056a286503a2a4fc21f397e4dec4876 docs/V34_DRIVING_AUDIO_VALIDATION.md 1840c81b4090ff3c86c0c1b0acc2cc10d3d9839e383c81f262a5c59a67504cd6 docs/V35_HIRES_FIX.md @@ -37,7 +37,7 @@ f0806bb2b999794ddda072e98424dbd1b613df1cd8a096b12d979f124e066d8a docs/VALIDATIO cedd7b07901d6065079ef37380f0062d535a39c98c8f614e1b26582f549d7183 driving_audio.py 6771c9905d35666121c4892d2ec26202505f96d244ce814ad9a87a02878952cd examples/H3_CONTINUUM_V1_WIRING.md f85ba3c69a473f0ac4bb96895c6d6532e8270121da65f858e364b19d31f05ef5 examples/H3_Continuum_V2_3x5s.json -be419d6c773784823af7b58a3423ef2e21d3cc3e23c40e60e274560895ca034b examples/H3_Continuum_V2_README.txt +9d88c187e80ab726afb4dc685dc2ac20039a2c6933f118caa23e2ba8e1c640cd examples/H3_Continuum_V2_README.txt 4b94f779a98bfc555f6999113a694da07746cc3cf400bfc70ebc580592034d52 examples/H3_Continuum_V2_reference.webp c3cefcdf50df9d6609f583a008453b587c011a0fb41e290d5f1196ce62f58877 examples/H3_CONTINUUM_V2_WIRING_JA.md 20f4e7c4ad085791f8b578f575d03e52ef09d0d4550aa58ad086c9857b59bf29 examples/H3_Continuum_V2.json @@ -46,36 +46,36 @@ f67febfdd7b2bfca2ad4e477c87a9a74dbe636231f9db3e1158b944d7b9f8397 examples/H3_Co 5a26408c770381cdb259cb710de7dab12d7ddecca262bdbf35ba1566056050f5 examples/recommended_settings_v2.json b8275c8cecde12aee0418cea456d1e7f4b875cbb1bce32f1f3d9e06a44dd0be1 examples/v2_prompt_list_example.txt 0e59ea821081cb93165aa3f88c6949736dd225837fe1cdcf1173aa5cd54c6d29 examples/v2_prompt_timeline_example.txt -55bc60447d6cd783b9df049d04b6cebb6e4a633981434ac2b28e5a1527d4f4b4 examples/workflows/MiniMax_H3_Continuum_V32_turbo.json -4e410aed8d7f6ebf11c98d4f71571e46855e4619c2bcbec921df70f29189b6b1 examples/workflows/MiniMax_H3_Continuum_V32.json -55bc60447d6cd783b9df049d04b6cebb6e4a633981434ac2b28e5a1527d4f4b4 examples/workflows/MiniMax_H3_Continuum_V33_turbo.json -4e410aed8d7f6ebf11c98d4f71571e46855e4619c2bcbec921df70f29189b6b1 examples/workflows/MiniMax_H3_Continuum_V33.json +c3a6345242c598caa64fafe68a5e304ede59ffe3092ee70a285995110253ad65 examples/workflows/MiniMax_H3_Continuum_V32_turbo.json +f69c9e9075bc3302dd91b1890b79e0e4d8f7b34c46da999bb51d92f81743664c examples/workflows/MiniMax_H3_Continuum_V32.json +c3a6345242c598caa64fafe68a5e304ede59ffe3092ee70a285995110253ad65 examples/workflows/MiniMax_H3_Continuum_V33_turbo.json +f69c9e9075bc3302dd91b1890b79e0e4d8f7b34c46da999bb51d92f81743664c examples/workflows/MiniMax_H3_Continuum_V33.json 5eab33c110e07ec08ac66f289f20c295a90ca026ea5231ad6121755a28a2ded8 examples/workflows/MiniMax_H3_Continuum_V34_turbo.json 660e955c983e41947f5abfd89e66fbe5759ffda01e6c1a7164d580b0c41b2120 examples/workflows/MiniMax_H3_Continuum_V34.json ed31ddd3d0af5e6f8dbd609e5ef51872322dbe52eaad8cae35e16342ac53dbfa examples/workflows/MiniMax_H3_Continuum_V35.json e8f41dee2240f1fcc6e8fd12448856513483ff3ae0427b2c554bb351f9ae8047 graph_contract.py -3d14acac341c63207995e2bd45cd407fdb3e2308273b1c90605adfe6f2e0bd8f hardening.py +79bd878b1c639c8ad77afe972a20810d1060f7903f0ae8ddc31ba22d84777ba1 hardening.py 6abdbc29472c7f9d447085b189fc47b69e110b94ef83192f9689d04000408843 INSTALL_JA.txt 23bddc5a41d2e997f4fbf789c7128e32f4f197f1405b2aef1c76794f57482446 install_windows.bat d74073e7ee292ebeba913af4288284f9f197cd91fceed6c62bf6c66b784c7cec install_windows.ps1 6aa3f5780baa7bb0c0672b5f01a2f77e5f209da93f6373468cb274ea2f643d4b layout_adapter.py -c44abbd789091bbead01250dbd5453e60539d2665c69f162335fdbd2936019c2 LICENSE +15fd1cdc62ffa959b49fd5088bdb1d4b5fa406fa8e420de64603e86458a1a3b8 LICENSE d3e213005670e94dee33a240349a4d245cf9a3b6602099f11ed30cf5a32e2c21 media.py -84cc75b4583a2851e657f3142a1ec4e099091cb7a960be7355e376269e4d3048 metadata.ini +6d9527ba9cf7fa411f46056c93ef662a1800fc0fc7bd2b7a12b9f72e9f81b892 metadata.ini ef705a476e3f5bbd05559e7a0e7d3dfb9275badef0f8f65fb1a36ce27fbcb537 model_patch.py 01ea71240361725972e41746f5a1c4ff90653e6ccc673085f46f427fbf65e4be nodes.py a230cd2f772021a683432e41f7028f6ea628e34dd19f617a3f98c174fdc97d58 PACKAGE_INFO_JA.txt -a7084bc1d12ab25a1ebe29a089dba72d6c1147e0f5556837e6321277562ad1f5 PACKAGE_VALIDATION.txt +59ac121d919a0c372979e4e7d6c8f55b28968d99f44ef26f2dc4490ea172dd0f PACKAGE_VALIDATION.txt b470819f16fc179654dc1600721a63f0a5a14e777f4c004d574b499da6886ba5 public_api.py -16bc48b9ef6127af7e0e3ddd96791640cedf5159cd7c06452d72604f41998a52 pyproject.toml +fe65a21c645b62ce3c03a80ef9146a36e5e30c4d3a715cd4842c2fd1bfb9d95f pyproject.toml 94fdc2d545b2d4077a4d70229fd22ba3ccac21d49d1097d2873f76d04e9a3c7a pytest.ini -3a3ab9f5b9860c4b5478e37e49c06b1b102d49a408c712a25e439b6a557d7071 README_JA.md -dfcaceb3a9ed4784ca0017f864011cc9904c15dc95d5b59dd39d8a429aee28bb README.md +e8d655533351f66268561cd215dff67c00cfab789bb6cf7d4115424c39dfb6d0 README_JA.md +bbb55aec2b7bbbae3ae4a77bffd8defd8966dabecba456930602392504363495 README.md 5d89c366b4f076fa73a2695557e0af749bf95df1dad0d55dbb2fe5b1c2519ad7 reference_audio.py 8f1744dc99f1a3a222b7d6e986f6dac1edcc0abbbe8b61a1d2606b1ca3569b3d reference_video.py -2995924fcb7bac27b548b01187d8276d2ab103c6f43416cf85400de3846c6297 reference.py +f45e2cd438125bbf4730d809118c3c007f742cc719cc458178275da8f6759fca reference.py 467edb2c188d024c2392aafe7423b3f835e16b10f570da76e2f7dda8a962c1c5 requirements.txt -e02b523b5b1c1272c912c16d547050cc9bb9feb6c348743015bb5d059a4ead06 run_storage.py +1c2b36c532552c71712a645a7c8524f09b3afe4179ec2cfbf69f853f1ac2952d run_storage.py 6056de6c0a5322a8a51ba5a114538dca2ef67788cd1afba10fedd483b95f6afa state_io.py 3a359a0467725cc292ccb4c86cf0c3d30bb6a114d01f5345792b09ea3d45441d state.py 43ec4023dc06c941e5d7a04db4b8a89fb58d744ceb986f6eb9bf534d4fdcb87b temporal.py @@ -100,19 +100,20 @@ d4c53d2c260b635d70fa211029d608f63776e0a56c20253475fa47c58363f8a7 tests/test_sta 912661d91c7f11f5fcaf0bd14d7d3ecf5c74c33b1507272f0ae72af6e5bffa6f tests/test_v2_decoder.py 36084a4f37e56786fa82200dad3e13a6a1a1ddde4f4eb5654117a88ef2659b99 tests/test_v2_prompts.py 5dfdd4b108ba7444c0f5f371c3b1e244b5735d23136127b9818fd60738c78b68 tests/test_v2_registration.py -0a520b34b12e1d2556d50480c43318de7eab4221afb96ef4760127c8bc90c890 tests/test_v2_seam.py +273188a69b3d39eb7e190c16c593db440c5427e51435ddfbfe4e1b71f00b414c tests/test_v2_seam.py 74e623120a963cb96b68651b44f47a836ea8449d30ce89d749c71ffad4766d4e tests/test_v2_seeds_motion.py b42bcc0983147462d96c6b71cc4a38e846995dafa6eebefc3ae0d9bb36caf359 tests/test_v2_sequence_orchestration.py 0b5b20a8318862d167f135720e0489b8d4f93406d67c6646e052e35b03dcb876 tests/test_v2_session.py 58438c3ed814adf40cefde098a37cae00ddcb703b7e5548bbbb295e54bed5a6d tests/test_v2_widget_migration.py -0410e2d10af76a83eee0e622d63b8d91662d9516c990aa657a15066e30604f58 tests/test_v217_stable_facade.py -78bc478a5e4edda902c80849c911782a99e75c06dfb04127391b6cc5b27b28e1 tests/test_v3_hardening.py +4e777a8c6456328a96f1647033e1d74e3791559b21852b2523c69ed46acc7ff7 tests/test_v217_stable_facade.py +7c81dd04af121e07fd63bac8e9f83c328219dc95c4939c021d75927c47cd3458 tests/test_v3_hardening.py eb5b27f8f0d79529c56ef344a5601703642c3cba5388c9768116223e2ed58a36 tests/test_v3_video_seam.py -eec67e2daddbbe4f5933a3ac0dd9c3188f750081d377b7d08fd6d5a02ff4a529 tests/test_v31_run_storage.py -3af78ab85c8e19dee8d0a98bfd11a2c0e88c30d87256da1f9699c49a19a684e9 tests/test_v32_reference.py +8747b9abfa58a1bdc2381c9c86628c2c44321071a79de63a5a46a13c7c5deeb8 tests/test_v31_run_storage.py +d66489f9ead30686ee82a4e1f24a7d7c4a36f835678812e1fca58f3bbf46ecaf tests/test_v32_reference.py f692476d0a7795b36bc5d9b97c10b7c6ba9686122b8f7987629948141e5dbab3 tests/test_v34_driving_audio.py +7fd13dd3e969b623f525e38753252b179d55988b8fb794326137899d1fe7c6b6 tests/test_v351_reference_audio.py 8b75c23dccfd1ac302596187f2fbbd1c9b71fddcb5e666aa4f9eedfd8b5b4b93 tests/test_v35_compact_ui_frontend.py -c5a122cb9510320820f6057fc29e6bef4b42e19f141d4d9090c817702e7d151e tests/test_v35_context_sampler.py +b7267778fd1e77bd12d7c6e71c200fd0a4367cd8ae3276823ddeba16e015cfa6 tests/test_v35_context_sampler.py c97d1323fa3d66c28dd1974340dbc17a3e6d5a79d4a5206b82d48bfb1a14b4ce tests/test_v35_hires_fix.py 9ceac8c3c6e4e57ec8b53b48f3b547c204df36a3f6281328aa9ab5ebc2e6a0b6 tests/test_v35_latent_resize.py 59a07f2172014dfdc0a447775324d7cd049f20b823276dfaf9b7b3f79628f5a8 tests/test_v35_pixel_vae_resize.py @@ -128,33 +129,33 @@ ffd61f3f31c9b6430e1169007ee906c8f5000eba63ee44e2976ad4f5f1112671 v2/__init__.py 2003902c87bba09cfa143f5a9e4248f3a78c0fb544449a75fd40ba2cacb35655 v2/context_diagnostics.py cde27db19b677e318cc4dfb4235be7a11429c19945f4083052a91fe117e74c82 v2/decoder.py 31012ec48a64c7467ad869c79982b7f8502c1785c33f51ee1b5727ce8b4243fb v2/diagnostics.py -87b054be8754ebfcd85e106a7b221604611d3bf05de03380565ee3562d1c823b v2/h3_builder.py +20b8132fb231c5b8ce61da2c1fbad310c22f332d66926a706523009deed54f65 v2/h3_builder.py aea01a48a8c03a25ed97ea05e5b137f89e388832d1be7d38f2da2be3d1b9830b v2/motion.py -080e9d597e2586eb88c448c7db32b9e3661f5d21a4c270f163696966ffa6c7e0 v2/nodes.py +a8432732548ae9521ee445a017e1d6d7f65b0e7bb120a89d6cfe1c18834f377c v2/nodes.py 3c2145d47924b53f8f6ec50806f1b7113120ac314142d8b7809c4f2064ad6aef v2/prompts.py 4080f1875b958b316e8e76852c4be5527a6de5c71d604e7642d3098478eb4a36 v2/sampling.py 2fd811794c4cc0f2ce050250b80484876454926b9f20fce6af3a97d728e5acdf v2/seam_guard.py be0d8585fa57e0ccd6d02577bbc7299629e5bfe20e186747f571fccc98b67d7e v2/seam_types.py 12cfcc0c71ca087fe39a5ce2922959a62b2bb311bfe664f05c4480affce03708 v2/seeds.py -e6c15105fe66b9d7786602c8e6d51dd256428d80635cee686b0e35d66ab3b794 v2/sequence.py +e1fa369acf61e17d25e7dfe24eb84a4a44dda1622f85a5f2e2b04210f1f38c85 v2/sequence.py 13213e7709fd02bb810af3c18e4cd7d010f8cdfb121a4b99866a9f2333331089 v2/session_io.py 3ea23dbce6fcd217b6e81235855479b9b16fed7a21693cf156f9014555c4fe13 v2/session.py 78c830cdf49034c6e3b2cd3da5914d5cfc5638eb63ec6dbd1bab13c50d6d4caf v3/__init__.py b3dc61503d35d9ef0a0dc7fed1c9b2fdc00fcb2072d4e39f64ae0826f9ec7dca v3/assembly_v35.py -7815230e0a9540bc2edeaf818e940b7a1fdd817fd217ba8a4f9cb21aaf6a308e v3/assembly.py -1465a4cd53e4a90788c7cdbbbef5f7bc0dee2a8be04cc4c707863837077d9a47 v3/driving_nodes.py +30e5ef19e182a288b21b76f644188cdb0763c367c8f468fad056bae65bc32f89 v3/assembly.py +5af29b8247319dbb5321c711318ead2e75baf12bd26d1460bb8a4c58f8e631c8 v3/driving_nodes.py 6cc7ed74666084c55beb9075304e92a9defafd81b9c6678239ca3859a08cddd7 v3/file_backed_buffer.py 897343a4845f4ed59828bbfcfb16a22fcfce2c22907548bb3234c98dabcefff6 v3/hires_fix_nodes.py 0858487e2b8c0060a856273ffc65d23165b2f253d183f506e27e419aea0da561 v3/latent_resize_nodes.py 45bd1945b984b56369234053be2edb8455d4cff7bf976f7d9c7bef77a762b7eb v3/memory_attribution.py -f8708118f70fa2aae22951e025ed3b9499951088988c817c28f6ef7f388f2570 v3/nodes.py +5bfa482eaae3fdc04601c6bd6ea41c175632b581f7a3e0dc80ff408cae275b0f v3/nodes.py b7c4a35a5e73f528492bc6946b97b687c412f1d3f5f976c19d45c6dc20288c9a v3/pixel_vae_resize.py -34ea38c03b6322288d88fc8595e3655a7a7afddb51709142a954eb7349f71ac2 v3/plan.py +60ac543e3a5ae9029ff2eeb5c91b72280869acdf3ee4808676650f213b3438c6 v3/plan.py 10eaab14eb8a70dea3345bf8bb20069d78ec5464aef5542a9a80f1ccfdeeb9b0 v3/refine_context.py 519586b1b3f48c73d329f7a2aaa8a1bfc6fe31ac2ecb64f2b1fdf9c19026001a v3/refine_sampling.py da5edf3b4392c41e12ef73a0cd21799be42a327b18bd5a6989447b75163dcab1 v3/second_pass_nodes.py 998d002c73c59ce88de1cf72afbb5f481a57cc31d365ba2fb4889ebf405dedc8 v3/second_pass.py 4178dcfa442abdb06ce276e05bd7bcbaa6da28469ba5e57d3da3c663de4e4a9d v3/video_seam_v35.py -2f07ace1462644f0bee553827b3571535de4d0c2d9ef847bd9e0ca73a4eed5cb v3/video_seam.py -343bf84d768b93a59c8a418635bcad4133961431c9c6f7975d7d65b0fac25eb4 version.py -ea79af984eb7d615f0d79384c8b505442af2b00cf7babfd53e82da2733927bcc web/project_id.js +f8824d6c9280b0af7723722e06a78c2ce84faa1da1a9ee2e41ee4b03cfda8d37 v3/video_seam.py +52173490b708846a794b625befde12952daf8aa070f762b2713aa8bfe660ebc8 version.py +760f4a77128b80107477a475d2ae0e5440475ff3095d9653ad7249c9a534daaa web/project_id.js diff --git a/tests/test_v31_run_storage.py b/tests/test_v31_run_storage.py index ef0e0c8..73e25b6 100644 --- a/tests/test_v31_run_storage.py +++ b/tests/test_v31_run_storage.py @@ -277,6 +277,15 @@ class _VideoVAE: self.upscale_ratio = 16 +class _AudioVAE: + def __init__(self): + self.first_stage_model = torch.nn.Linear(2, 2) + self.patcher = _Patcher(self.first_stage_model) + self.vae_dtype = torch.float32 + self.audio_sample_rate = 32000 + self.latent_channels = 32 + + def _sampling_contract( *, model=None, clip=None, video_vae=None, sampler=None, reroll_nonce=0, conditioning_mode="i2va", first_frame_hash="a" * 64, @@ -284,6 +293,8 @@ def _sampling_contract( upstream_graph_contract=None, upstream_graph_safe=None, upstream_graph_reasons=None, execution_semantics=None, + reference_audio_contract=None, + reference_audio_vae=None, ): return build_sampling_contract( model=model or _Model(), @@ -314,9 +325,63 @@ def _sampling_contract( upstream_graph_safe=upstream_graph_safe, upstream_graph_reasons=upstream_graph_reasons, execution_semantics=execution_semantics, + reference_audio_contract=reference_audio_contract, + reference_audio_vae=reference_audio_vae, ) +def test_reference_audio_revision_separates_changes_and_restores_on_disconnect(): + model = _Model() + clip = _Clip() + sampler = _Sampler() + audio_vae = _AudioVAE() + common = { + "model": model, + "clip": clip, + "sampler": sampler, + "conditioning_mode": "t2va", + "first_frame_hash": "", + } + disconnected, safe, reasons = _sampling_contract( + **common, + reference_audio_vae=audio_vae, + ) + assert safe, reasons + assert "reference_audio" not in disconnected["global"] + assert "reference_audio_vae" not in disconnected["global"] + + first_contract = { + "reference_audio_contract_version": 1, + "source_sha256": "a" * 64, + "resolved_vae_sample_rate": 32000, + } + first, safe, reasons = _sampling_contract( + **common, + reference_audio_contract=first_contract, + reference_audio_vae=audio_vae, + ) + assert safe, reasons + assert first["global"]["reference_audio"] == first_contract + assert "reference_audio_vae" in first["global"] + + changed_contract = dict(first_contract, source_sha256="b" * 64) + changed, safe, reasons = _sampling_contract( + **common, + reference_audio_contract=changed_contract, + reference_audio_vae=audio_vae, + ) + assert safe, reasons + restored, safe, reasons = _sampling_contract( + **common, + reference_audio_vae=audio_vae, + ) + assert safe, reasons + + assert revision_identity(disconnected) != revision_identity(first) + assert revision_identity(first) != revision_identity(changed) + assert revision_identity(restored) == revision_identity(disconnected) + + def test_terminal_seed_v2_revision_is_scoped_and_distinct(): old_contract, old_safe, old_reasons = _sampling_contract( conditioning_mode="fl2va", diff --git a/tests/test_v351_reference_audio.py b/tests/test_v351_reference_audio.py new file mode 100644 index 0000000..44a6c78 --- /dev/null +++ b/tests/test_v351_reference_audio.py @@ -0,0 +1,154 @@ +from __future__ import annotations + +import inspect +import json +from pathlib import Path + +import pytest +import torch + +from ComfyUI_H3_Continuum_Join.reference_audio import ( + ReferenceAudioError, + prepare_reference_audio_source, +) +from ComfyUI_H3_Continuum_Join.run_storage import automatic_project_key +from ComfyUI_H3_Continuum_Join.v3 import driving_nodes +from ComfyUI_H3_Continuum_Join.v3.driving_nodes import ( + H3ContinuumSamplerV34, + H3ContinuumSamplerV35, +) +from ComfyUI_H3_Continuum_Join.v3.nodes import H3ContinuumSamplerProduction + + +ROOT = Path(__file__).resolve().parents[1] + + +def test_v35_appends_reference_audio_sockets_without_changing_v34_schema(): + v34_optional = H3ContinuumSamplerV34.INPUT_TYPES()["optional"] + v35_optional = H3ContinuumSamplerV35.INPUT_TYPES()["optional"] + + assert "reference_audio_1" not in v34_optional + assert "reference_audio_vae" not in v34_optional + assert list(v35_optional)[:-2] == list(v34_optional) + assert list(v35_optional)[-2:] == ["reference_audio_1", "reference_audio_vae"] + assert v35_optional["reference_audio_1"][0] == "AUDIO" + assert v35_optional["reference_audio_1"][1]["display_name"] == ( + "Reference Audio" + ) + assert v35_optional["reference_audio_vae"][0] == "VAE" + assert v35_optional["reference_audio_vae"][1]["display_name"] == ( + "Reference Audio VAE" + ) + assert "Driving Audio" in v35_optional["reference_audio_1"][1]["tooltip"] + + +def test_v34_internal_reference_audio_parameters_are_appended_and_forwarded( + monkeypatch, +): + parameters = list(inspect.signature(H3ContinuumSamplerV34.run).parameters) + assert parameters[-4:] == [ + "capture_refine_context", + "reference_audio_1", + "reference_audio_vae", + "kwargs", + ] + + captured = {} + reference_audio = object() + reference_audio_vae = object() + + monkeypatch.setattr( + driving_nodes, + "prepare_driving_audio_source", + lambda *_args, **_kwargs: None, + ) + monkeypatch.setattr( + "ComfyUI_H3_Continuum_Join.reference_video.prepare_reference_video_source", + lambda *_args, **_kwargs: None, + ) + + def production_run(_self, **kwargs): + captured.update(kwargs) + return [], [], {}, "status" + + monkeypatch.setattr(H3ContinuumSamplerProduction, "run", production_run) + outputs = H3ContinuumSamplerV34().run( + reference_audio_1=reference_audio, + reference_audio_vae=reference_audio_vae, + chunks=1, + chunk_seconds=5.0, + width=640, + height=640, + ) + + assert captured["reference_audio_1"] is reference_audio + assert captured["reference_audio_vae"] is reference_audio_vae + assert outputs[-1] is None + + +def test_v35_run_forwards_reference_audio_without_duplicate_preparation(monkeypatch): + captured = {} + reference_audio = object() + reference_audio_vae = object() + + def v34_run(_self, *args, **kwargs): + captured.update(kwargs) + return [], [], {}, "status", None, {"groups": ()} + + monkeypatch.setattr(H3ContinuumSamplerV34, "run", v34_run) + H3ContinuumSamplerV35().run( + reference_audio_1=reference_audio, + reference_audio_vae=reference_audio_vae, + ) + + assert captured["reference_audio_1"] is reference_audio + assert captured["reference_audio_vae"] is reference_audio_vae + assert captured["capture_refine_context"] is True + assert captured["memory_attribution"] is True + + +def test_reference_audio_vae_is_ignored_without_audio_and_required_with_audio(): + vae = object() + assert prepare_reference_audio_source(None, vae) is None + audio = { + "waveform": torch.zeros((1, 2, 32000), dtype=torch.float32), + "sample_rate": 32000, + } + with pytest.raises(ReferenceAudioError, match="reference_audio_vae is required"): + prepare_reference_audio_source(audio, None) + + +def test_unused_reference_audio_vae_does_not_change_automatic_project_key(): + base = { + "1": {"class_type": "H3ContinuumSamplerV35", "inputs": {}}, + "2": {"class_type": "VAELoader", "inputs": {}}, + } + vae_only = { + **base, + "1": { + "class_type": "H3ContinuumSamplerV35", + "inputs": {"reference_audio_vae": ["2", 0]}, + }, + } + assert automatic_project_key(base, "1") == automatic_project_key(vae_only, "1") + + +def test_published_v35_template_keeps_existing_sampler_socket_routes(): + template = ROOT / "examples/workflows/MiniMax_H3_Continuum_V35.json" + if not template.exists(): + pytest.skip("published workflow template is not installed in this runtime copy") + workflow = json.loads( + template.read_text(encoding="utf-8") + ) + sampler = next( + node for node in workflow["nodes"] if node["type"] == "H3ContinuumSamplerV35" + ) + routes = {item["name"]: item.get("link") for item in sampler["inputs"]} + assert routes["reference_image_1"] == 321 + assert routes["reference_image_2"] == 320 + assert routes["reference_image_3"] == 318 + assert routes["reference_video_1"] == 322 + assert routes["driving_audio"] == 294 + assert routes["audio_vae"] == 295 + assert "reference_audio_1" not in routes + assert "reference_audio_vae" not in routes diff --git a/tests/test_v35_context_sampler.py b/tests/test_v35_context_sampler.py index de521ad..f23ece9 100644 --- a/tests/test_v35_context_sampler.py +++ b/tests/test_v35_context_sampler.py @@ -69,6 +69,7 @@ def _capture_sequence( monkeypatch, *, terminal: bool, + reference_audio: bool = False, session=None, diagnostics=DIAGNOSTICS_BASIC, memory_attribution=False, @@ -101,6 +102,27 @@ def _capture_sequence( "clone_model_for_chunk", lambda model, **_kwargs: model, ) + reference_audio_source = None + reference_audio_vae = None + if reference_audio: + from ComfyUI_H3_Continuum_Join import reference_audio as reference_audio_module + + reference_audio_source = SimpleNamespace( + combined_hash="reference-audio-hash", + contract={ + "reference_audio_contract_version": 1, + "source_sha256": "a" * 64, + }, + ) + reference_audio_vae = object() + reference_audio_assets = SimpleNamespace( + audio_latent=torch.arange(64, dtype=torch.float32).reshape(1, 32, 2, 1) + ) + monkeypatch.setattr( + reference_audio_module, + "encode_reference_audio", + lambda _vae, _source: reference_audio_assets, + ) chunks = 3 if terminal else 2 mode = PROMPT_MODE_LIST if terminal else PROMPT_MODE_FIXED script = "first\n---\nmiddle\n---\nlast" if terminal else "same prompt" @@ -133,6 +155,8 @@ def _capture_sequence( debug=False, session=session, latent_only=True, + reference_audio_source=reference_audio_source, + reference_audio_vae=reference_audio_vae, capture_refine_context=True, memory_attribution=memory_attribution, ) @@ -275,6 +299,33 @@ def test_capture_records_terminal_pair_as_one_physical_group(monkeypatch): assert validate_refine_context(context, assembly_plan) is context +def test_reference_audio_is_captured_in_every_normal_physical_group(monkeypatch): + outputs = _capture_sequence( + monkeypatch, + terminal=False, + reference_audio=True, + ) + groups = outputs[4]["groups"] + assert [group["logical_chunks"] for group in groups] == [(1,), (2,)] + for group in groups: + refs = group["conditioning"][0][1]["minimax_refs"] + assert [ref["kind"] for ref in refs].count("audio") == 1 + + +def test_reference_audio_is_captured_in_terminal_physical_group(monkeypatch): + outputs = _capture_sequence( + monkeypatch, + terminal=True, + reference_audio=True, + ) + groups = outputs[4]["groups"] + assert [group["logical_chunks"] for group in groups] == [(1,), (2, 3)] + assert groups[1]["prompt_policy"] == "paired_timeline_v1" + for group in groups: + refs = group["conditioning"][0][1]["minimax_refs"] + assert [ref["kind"] for ref in refs].count("audio") == 1 + + def test_reused_session_returns_incomplete_context_without_stopping(monkeypatch): first_outputs = _capture_sequence(monkeypatch, terminal=False) reused_outputs = _capture_sequence( diff --git a/v3/driving_nodes.py b/v3/driving_nodes.py index 8395265..c9279a9 100644 --- a/v3/driving_nodes.py +++ b/v3/driving_nodes.py @@ -151,6 +151,8 @@ class H3ContinuumSamplerV34(H3ContinuumSamplerProduction): reference_video_1=None, video_reference_size=REFERENCE_VIDEO_SIZE_EFFICIENT, capture_refine_context=False, + reference_audio_1=None, + reference_audio_vae=None, **kwargs, ): from ..reference_video import prepare_reference_video_source @@ -175,8 +177,8 @@ class H3ContinuumSamplerV34(H3ContinuumSamplerProduction): size_mode=str(video_reference_size), ) outputs = super().run( - reference_audio_1=None, - reference_audio_vae=None, + reference_audio_1=reference_audio_1, + reference_audio_vae=reference_audio_vae, driving_audio_source=source, driving_audio_vae=audio_vae, reference_video_source=reference_video_source, @@ -217,6 +219,33 @@ class H3ContinuumSamplerV35(H3ContinuumSamplerV34): ) OUTPUT_IS_LIST = (*H3ContinuumSamplerV34.OUTPUT_IS_LIST, False) + @classmethod + def INPUT_TYPES(cls): + schema = super().INPUT_TYPES() + optional = dict(schema.get("optional", {})) + optional["reference_audio_1"] = ( + "AUDIO", + { + "display_name": "Reference Audio", + "tooltip": ( + "Optional standalone audio reference for H3 conditioning. " + "Unlike Driving Audio, it does not replace the generated final audio." + ), + }, + ) + optional["reference_audio_vae"] = ( + "VAE", + { + "display_name": "Reference Audio VAE", + "tooltip": ( + "Required only when Reference Audio is connected. It encodes the " + "reference for H3 conditioning; generated audio remains the output." + ), + }, + ) + schema["optional"] = optional + return schema + def run(self, *args, **kwargs): kwargs.pop("capture_refine_context", None) kwargs.pop("memory_attribution", None)