Release V3.8X2 package 3.8.3

This commit is contained in:
ukr8b3g-cmyk
2026-09-19 17:39:28 +09:00
parent c38c616d54
commit 12e30c7e18
51 changed files with 7200 additions and 270 deletions
+8 -5
View File
@@ -24,17 +24,20 @@ MANIFEST.sha256
.gitattributes
pytest.ini
# Ship only current V3.8 public contracts. Historical validation notes,
# Ship only current V3.8X2 public contracts. Historical validation notes,
# version-specific design documents, and their screenshots stay in source.
docs/*
!docs/N2B_BRANCH_PROVENANCE_CONTRACT_V1.md
!docs/V38_OPEN_INTEGRATION_CONTRACT.md
!docs/V38_RELEASE_AND_MIGRATION.md
# One V3.8X user-supplied Spectrum graph, in JSON and ZIP forms. External custom-node
# dependencies are documented, not bundled. Historical examples stay in Git.
# Ship the two official V3.8X2 distribution names. They contain the same graph;
# the longer name makes the Decode Cache Helper connection explicit.
# External custom-node dependencies are documented, not bundled.
examples/*
!examples/workflows/
examples/workflows/*
!examples/workflows/MiniMax_H3_Continuum_V38x.json
!examples/workflows/MiniMax_H3_Continuum_V38x.zip
!examples/workflows/MiniMax_H3_Continuum_V38X2.json
!examples/workflows/MiniMax_H3_Continuum_V38X2.zip
!examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json
!examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip
+8 -5
View File
@@ -1,11 +1,13 @@
# Changelog
## 3.8.2 — Publication metadata and package-integrity sync (2026-09-15)
## 3.8.3 — V3.8X2 release preparation (2026-09-19)
- Synchronize the current README and package validation record with both source and Registry manifests after the post-3.8.1 documentation update.
- Preserve the accepted V3.8X R0–R6 runtime, seven-node public surface, supplied workflow bytes, Sampling, Review, and Run Storage contracts unchanged.
- Keep the immutable V3.8.1 and historical V3.8.0 releases available through their matching tags.
- Validate an external ComfyUI-Spectrum-MiniMax-H3 v0.2.27 Sage + Spectrum 3 x 5-second run. The previous `aimdo memory compile error` did not occur; decoded video/audio integrity and chunk-boundary checks passed. Spectrum's own v0.2.25+ AimDo malloc-graph workaround provides this compatibility; Continuum does not vendor or modify Spectrum.
- Vendor the previously standalone Decode Cache Helper implementation into Continuum as a separate `H3DecodeCacheHelper` public node. Preserve its node ID, inputs, outputs, list behavior, native Core Decode delegation, and process-local cache behavior.
- Add `H3 Continuum Reference Images` for optional Reference Images 4–9 while retaining the Sampler's direct Reference Images 1–3 and existing 0–3 image workflows.
- Keep Sampler, Finalize, Assembly Plan, Core Decode and existing V3.8X widget/socket contracts unchanged.
- Add the accepted workflow under two official distribution names: `MiniMax_H3_Continuum_V38X2` and `MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper`. The files contain the same graph and are not separate workflow variants.
- Document the nine-reference GPU/RAM gate and recommend pre-scaling large reference sources to about 0.30 MP when using all nine on a 16 GB GPU.
- Clarify that Decode Cache Helper speeds only repeated Decode of unchanged latents. It does not speed Sampling, a first MISS may be slower, and the measured 20%+ reductions are configuration-specific rather than a general guarantee.
## 3.8.1 — V3.8X release candidate (2026-09-15)
@@ -13,6 +15,7 @@
- Rename the current supplied Spectrum workflow to `MiniMax_H3_Continuum_V38x.json` and its matching ZIP. The JSON and ZIP remain byte-for-byte paired; the graph is unchanged.
- Preserve old V3.8.0 installation through the existing `v3.8.0` Git tag. Do not mix its workflow with V3.8X; use the matching tag/package for an older saved workflow.
- No new public node, socket, widget-order, Sampling, Review, or Run Storage contract is introduced by this release label.
- Compatibility note: validated V3.8X with external ComfyUI-Spectrum-MiniMax-H3 v0.2.27 in a Sage + Spectrum 3 x 5-second run. It completed without the previous `aimdo memory compile error`; decoded video/audio integrity and chunk-boundary checks passed. This relies on Spectrum's own v0.2.25+ AimDo malloc-graph fix; Continuum does not vendor or modify Spectrum.
## Unreleased — V3.8.x release hygiene (2026-09-14)
+175 -63
View File
@@ -1,16 +1,23 @@
dca65fb1393e67f59c6f81f9411e3e745eb8f1097e9a2adf7ffc6f4e3901ca9f __init__.py
3e7a1ec3380be2a222c8a3e9b8a6bb184d3a760478957f48186438f15235bdba branch_provenance.py
04900f7a7a89fc3c4f75dc4020c1e16ea353da2b24a959ae628e3f49ddae4ef3 .comfyignore
3d681ded5d4c50cc20c2382e29fdc98d8a48e76d552c41ad5a195d941e66e612 .gitattributes
8296f0afc7be47171e439c02fb2988cfeb0df904acbe3fc4f507f426d709157e .github/workflows/tests.yml
0a2f69d4cec89d440f5d5aa1ec68a7c9a741382d313f80dcddf96d13f70b3e68 .gitignore
34284acd7da6beacc26050072b6adec866ce934d1912c0ecd9410969404d8ce0 CHANGELOG.md
3e7a1ec3380be2a222c8a3e9b8a6bb184d3a760478957f48186438f15235bdba branch_provenance.py
0daa15310d98160261e3ff1fe689cc7a6db9e453891cd73e2a392da643ab576a CHANGELOG.md
c1ed3a0342730450958fb62fd21854a876991f3a4aefb24e5383b0c73cd2312d compatibility.py
4d62508f900af9f93ec320afb900c27cc9a300d1e0c0a94714258498c5ede5fc conditioning.py
64967f4987e3ad9316f3a47f0dcf582eeff39ee0c3485f4184d3532d495534ae constants.py
294251c40b1be2e296c5e5f627b68091d087bdb39179e3a0c3cebd2ee8a344f5 constants.py
cf255b8a635471229aebadc926acfdcacb65963adbcb9e0f9505d04eada2c6b5 continuation.py
bf0556b076dbaca67c3405a7d86c333ca7fdf3d4381529b0a9edc906519943e9 guide_timeline.py
51f1d211dfc36602a006fe5d14f4ebb08182694ad464aa9176340ff7e2bd1e41 decode_cache/__init__.py
647f55a9253976c059502dec13c7f64d7f7df1ecbe619d543c973f92f7f36776 decode_cache/identity.py
5e599feee3199ee5dbe00e9dfb05c159cb6fe4c0c1ab19677971ce6b1cf4e34c decode_cache/nodes.py
986cc7a3dc153ff1b41c427a86756e505ea6e17d8b065df1ab15b8ff904f090e decode_cache/service.py
8b79ad007488a085284c401f8c1bb99ca6ee58cf736ec9c029548220e2d8adb9 decode_cache/store.py
f9375629fa1a2c4d3538442f0c3192d7ba2f46fe9544fb2e21f0c144b53d608c docs/AB_TEST_LOG_JA.md
c93a3e52e4deabe5ef0db7f34a7605856a543089574ba17227e697e9a2c0139a docs/ARCHITECTURE.md
b30fe4640359bebfcdeeb94dbeec94cb346c8e3646509e1dcdb87d7021ba04ff docs/N2B_BRANCH_PROVENANCE_CONTRACT_V1.md
1d60cf5d4ef9c45885d4f90289c3b17aa70a6a2752c6b288288322a5e0568050 docs/FAILURE_SEMANTICS_BASELINE.md
c6ea788a03c5f29f32fb6a4fd62db92f108e604493d818b9729e9d7fb967526e docs/FAILURE_SEMANTICS_DELTA_R5.md
7660570840229b6fcbe62f0fbb52966d0099d64d7e6f01a739fbf9899293c8e4 docs/FUTURE_ROADMAP.md
9a634b4ff6c9ca98285f6b250402a3d0e67d29f031e134d9bfcab54c119ed337 docs/images/comfyui-manager-h3-continuum.png
6c72d9a9e35648355c4dd4c8f060a6b7667e322f4b6c86690df9d6769ba182b7 docs/images/h3-continuum-advanced.png
@@ -37,12 +44,43 @@ ed189c7f16ba1f6e48f557312066fdb5e1313b5ea7df853a99467fd0d7532ef5 docs/images/v3
925898dfe741fdbcc9b429133cfcbfb8ff718a3b476b368a063b46d39511e2f9 docs/images/v36-sampler-node.png
edf8bcf1e9d76609a4e54ecd14a0ef6e82c9446c64355ff6ce5e25682e95a932 docs/images/v37-sampler-node.png
a8defccf63167a1bbd5db3bcba56781887f6ac5ee3f41de29683e0266d850198 docs/images/v37-tail6-second-pass.png
950daefc3ff8e71739b44a3bffe61d0566877409e8fceb1f6725908b3b169814 docs/images/v38-manual/continue-selected.png
bf14822fc2cd87ad68ef212209731befdf8962737066f9a4db16d836f554d9af docs/images/v38-manual/first-last-image-bypass.png
c90b35cd916b03d4fe65b6d835121fab7c17bb893ca44e913847f51aa42f4994 docs/images/v38-manual/full-video-progress.png
12814fe8dbde1c5efa8b33eb941dabf61a753bfe985ea7536670b5df7df2234a docs/images/v38-manual/h3-continuum-v38-civitai.png
5e4b876585fac3a2d580cdaf99b83ec3e10da90036b7923b4dffdcf0240560bd docs/images/v38-manual/h3-continuum-v38-whats-new.png
6fa8d44285dccbe84e0c24182abe4c5c87a37ae56b74d22d46131c773b5d33f4 docs/images/v38-manual/input-video-audio-bypass.png
57c024c59bdd378c3e1c97f1e0c698a2f3972b70f6336e051cc145f04ae00727 docs/images/v38-manual/live-continue-selected-steps4.png
ffef61c5ffddd3bcc014e23a66137d2d884b358d8d9d195a107c66859f9a1895 docs/images/v38-manual/live-execute-button.png
800651b2db21f69e1a7c659893208b9ce4a5d3b711a35981e11c43ca0d4c4196 docs/images/v38-manual/live-first-review.png
0ee318f1ce44d0215627a1593f696b719fa028c78cf5c01847e6b010e4479147 docs/images/v38-manual/live-regenerate-from-chunk2.png
c775220802f4c5dc43b79a047e5b921a0ba8c30d121eec201803748f66d973bd docs/images/v38-manual/live-render-history-steps4.png
c35a68cb853d23b13749144398696d575eb1ba818f771e6cd280a458b3d127f4 docs/images/v38-manual/live-retry-selected.png
05ab6bc5a54207020f708d092ade2754508b086f973b8007cc2541adc5ea90f2 docs/images/v38-manual/live-review-actions-steps4.png
0f8b4ed98acd29e83c5f1c147529bc1e306ce0d82f0602708c8e10175f9dcdc0 docs/images/v38-manual/live-review-settings.png
a0cbb625e19952fe7f3b0cdaefb11b47af6ba1b81afcd01fa1c089f6d23d398b docs/images/v38-manual/live-sequence-complete-steps4.png
84d74cda77a70edc62b869455f276c40c8587ea5785d8d97476b64b6efedcb3c docs/images/v38-manual/live-settings-complete-steps4.png
6a8421cc869fa3ec1273851cd2447e9bb38d002c4765cf0a2e08c2b38a8fd209 docs/images/v38-manual/reference-images-three-bypass.png
0be5086a48673dc79bb06027d4472022b67aacd24e1759074a39c3a0022070b9 docs/images/v38-manual/return-to-review.png
4f5a57e9a3b3d660771a9313e5231842052cd1c88f73ee21b2415858270e87ac docs/images/v38-manual/review-actions.png
5d967bc03034942d3b43061dade25a18367f81f0e1144fe03a02d8f43fc813c7 docs/images/v38-manual/review-settings.png
43d3ffe4d1f82b5f1c2876f57fd3bf9fdb99da6cfa8d02cee896862f8cf81ab3 docs/images/v38-manual/sampler-size-first-image-draft.png
c12bd55db2a25092e7c29d6d3a43d8a69452373c13e9a7559ad61c87ed4025ba docs/images/v38-manual/seed-fixed.png
04d935d4f183b14f2d25dfc7e22c2647ab47aef7826320c127dab2c1952e0de0 docs/images/v38-manual/size-source-first-image-tooltip.png
552dba25b13788d1202047b8504b8ee6447f5d99608c62741109e4f6914a46e2 docs/images/v38-manual/size-source-manual-640.png
b2b5a0736a07b9825df58fa3bc3b18f210679d16f041b1b40d984d325074c68d docs/images/v38-manual/turbo-lora-choices.png
b30fe4640359bebfcdeeb94dbeec94cb346c8e3646509e1dcdb87d7021ba04ff docs/N2B_BRANCH_PROVENANCE_CONTRACT_V1.md
a884c0bb08fca1f3a2f2b8f0e607f5d2c9ea27feec902fdce720743026fae019 docs/R0_RUNTIME_CHARACTERIZATION.md
e6b8cc3250776868f473357cd97ce299fcea31ae18b879ec6e6466f47dbf704e docs/R6_NODE_FACADE_DELTA.md
93f07aa727b34802bce3d333426b8ba2af522500882a6d222d00cf577ca82e49 docs/SEAM_TEST_SOURCE_JA.md
2c13aefd137db92a3dbf5576e9442d58012b1f0de1240c07d039ceeb702e7c1f docs/V2_1_4_UI_SIMPLIFICATION.md
b08022df068576c759c8bf80ac6b6519693f3c65c917f1822aeb06ea359aa5b1 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
ca9f1aecd1032f0f0b237948c7fc1e4e693440dff35f5f17fd5e6d5ca4dab7f9 docs/V38_BEGINNER_MANUAL_PLAN_AND_CAPTURE_SCRIPT_JA.md
717577efdec5e61600504b77bc2a099ef022c4fe2333e936c3310c7182d8f2a0 docs/V38_OPEN_INTEGRATION_CONTRACT.md
b08159178c999c4c97df6aed67c6cf48b5032548a1d370dc4a0cf7e293ab8031 docs/V38_RELEASE_AND_MIGRATION.md
f0806bb2b999794ddda072e98424dbd1b613df1cd8a096b12d979f124e066d8a docs/VALIDATION_JA.md
3fec541a675c1e4e5e287cc8e498036001f34f7a62460321e16f9ba27b5e4c18 docs/VALIDATION_RESULTS.md
cedd7b07901d6065079ef37380f0062d535a39c98c8f614e1b26582f549d7183 driving_audio.py
@@ -55,7 +93,15 @@ c3cefcdf50df9d6609f583a008453b587c011a0fb41e290d5f1196ce62f58877 examples/H3_CO
b8275c8cecde12aee0418cea456d1e7f4b875cbb1bce32f1f3d9e06a44dd0be1 examples/v2_prompt_list_example.txt
0e59ea821081cb93165aa3f88c6949736dd225837fe1cdcf1173aa5cd54c6d29 examples/v2_prompt_timeline_example.txt
26bbca92b5f7cac4cbde89290b3f801b7a895df76a07493ca6f65c18d5b1154a examples/workflows/MiniMax_H3_Continuum_V38x.json
df4e0e355020d2e731932cff86a4b00932b4f193ec7ed513be0db994ec0e71bb examples/workflows/MiniMax_H3_Continuum_V38x.zip
6c445d62979632bc1a801b1c28dbd639c23b51cc156ebae18837baaa757e592b examples/workflows/MiniMax_H3_Continuum_V38X2.json
29e8ea19cf7c7e8a8a5e98577905d8fd01fc800bb8edb4f4218a638fe39e69d0 examples/workflows/MiniMax_H3_Continuum_V38X2.zip
6c445d62979632bc1a801b1c28dbd639c23b51cc156ebae18837baaa757e592b examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json
f770bcc7de63851ab32f8d8fea23e5df9f7c44b8e3c0115a555b57ea82a28550 examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip
7861fac4c8fe82372c5459aa574d35ea003bdb4fd846d567bd891c2e38571b3d graph_contract.py
bf0556b076dbaca67c3405a7d86c333ca7fdf3d4381529b0a9edc906519943e9 guide_timeline.py
6e889c42490ccb5f376694b5944c693a84e7febedf38e631d687e96bc1e76376 H3-Continuum-LLM-System-Prompt-v1.zip
144324850d4ba086938da5f4ed7b02ff0668dec554f092695328240e43fec3ec H3-Continuum-Skill-v1.zip
1473c384082700f422f2cf9141e0d012d87d2b43ac8a8a433edc7172e6ca7bf6 hardening.py
de0da5590691554cbf7f6318ac539a160e639bc3e20ee0752ae189dc31e979ce INSTALL_JA.txt
23bddc5a41d2e997f4fbf789c7128e32f4f197f1405b2aef1c76794f57482446 install_windows.bat
@@ -63,30 +109,51 @@ de0da5590691554cbf7f6318ac539a160e639bc3e20ee0752ae189dc31e979ce INSTALL_JA.txt
6aa3f5780baa7bb0c0672b5f01a2f77e5f209da93f6373468cb274ea2f643d4b layout_adapter.py
c44abbd789091bbead01250dbd5453e60539d2665c69f162335fdbd2936019c2 LICENSE
d3e213005670e94dee33a240349a4d245cf9a3b6602099f11ed30cf5a32e2c21 media.py
04085ae86f40a6118da3972cfe740ddbfc9a8fd4a76b4937ede853f5de835bd7 metadata.ini
1970342c93f0189ade437cbfc278900713f043882933789cb8c54f35cf2ec96b metadata.ini
fd23c7f32810788aaaf1709c4959c40ec72303aecc6f6afa5fa68d824cca97a8 minimax-h3-continuum-dance-director.zip
2d611f7201889851eac6459f8aa2b37baf342b345241979ca6042b61b252dff9 model_patch.py
a4ce23167b83e8d72b86a802dfde4f4045828433c7c13aab799bd64831dc04a4 nodes.py
11ea3942e460d8b4ec729611371b52ec5ad202c894c5e9ec7b151b906559bfd8 nodes.py
2b8c19f9474beabfebe1802cdf4a89780dce3c351c48d65e1ce8bb77d2fb9ba9 PACKAGE_INFO_JA.txt
bc4ba900d5b71b09fa0ce9a0a203c6ddd8f8de6b270026a4eef04d7790c5acf5 PACKAGE_VALIDATION.txt
4852ad216f85c22f008abe18464eab2c913bd88baa7db35764df2de9cf401d6d PACKAGE_VALIDATION.txt
b470819f16fc179654dc1600721a63f0a5a14e777f4c004d574b499da6886ba5 public_api.py
56c2aecfe43feab4fbb95d47387f8925236124429fe580075d47dd9960266503 pyproject.toml
15a3925218e0c5f968795d7d11e4783c3c6868917447274bc700328851b3fbfb pyproject.toml
94fdc2d545b2d4077a4d70229fd22ba3ccac21d49d1097d2873f76d04e9a3c7a pytest.ini
3200813f2a2a8b0c6fd13048369fcdae8c6690559c5c1416e5e2b7fc7062a214 README_JA.md
50b20efcfe6fd9cea92494c2e50cc904a0f7d8c9b3618f4ae5ab5ab876d0a3c1 README.md
8f06f56597185fcb24331b038b20e921c02557da42f5ef5ba79fb7e768766974 README_JA.md
4e44ff1e28f2f408c41631eb76922bfbe31147bb6d36846a1b73e05279f5dda3 README.md
44127adcfa30ee84bff9cd4b2d0c695355209550e76982d374122008728aa5bc reference_audio.py
5cb9bfd6810d3a93a637451980a4cc5c1436e5b84cfd1c7a111cd192e876351b reference_video.py
131bdfbb7a7173c9e7826859c0e648bfb69bd18bf20fa5528c0e18a63f888b26 reference.py
c7b14ed6f8cfc2a1f0a21db4fe56fba75a93ffcb0be0c22bbd2e691c45cd0e2d reference.py
6a943937d0e19686d365c9db5b771493172874c5772bb96f6c3a437d83402b04 REGISTRY_MANIFEST.sha256
467edb2c188d024c2392aafe7423b3f835e16b10f570da76e2f7dda8a962c1c5 requirements.txt
92e22d0e5413ce7755f380b914a6cf7f2b0a10eba65a2fb928aac3f950d60fb9 run_storage.py
8bfa113a2ec11325619be300b4d2b53a157b1d2c1ef7855057a4b3bbd05aeef3 run_storage.py
6056de6c0a5322a8a51ba5a114538dca2ef67788cd1afba10fedd483b95f6afa state_io.py
3a359a0467725cc292ccb4c86cf0c3d30bb6a114d01f5345792b09ea3d45441d state.py
43ec4023dc06c941e5d7a04db4b8a89fb58d744ceb986f6eb9bf534d4fdcb87b temporal.py
db08ce77cc5c5835f2403d4d589394090fa5d25ff3b1840312b2808e1bc203b7 tests/fixtures/v38_a3c_selective_refine_saved_workflow.json
e6506f7ee87f59c25e05156f6b9a835ef78443dcf6f0435c48675dda0c0dd63d tests/conftest.py
7f34c43ea74c43cfc4f9453848c69c8ed7546de5b78c7c7d063d643f2c483c36 tests/decode_cache/conftest.py
8d0cced8c945c4333ef78688b51a988d7e1d560e5f9e6cceec8310b17c98ad53 tests/decode_cache/helpers/cache_process_worker.py
a41a4de12e6fe5690845f9f0795fa82c4907f0afe2551034fa2a4c95617ac39c tests/decode_cache/test_adapter_nodes.py
19d47f94ed2bc56d79b4345f820de3cbb3191e47a5034363a141dd7af500408e tests/decode_cache/test_identity.py
549698d35918b611adc4e8f3aa2f0568c19291b4825cc3c593f3f63e77ec5844 tests/decode_cache/test_process_isolation.py
7e627131904dc6d6f58021fad396185c531858b62dd6febf12c3f95fd1391138 tests/decode_cache/test_store.py
db08ce77cc5c5835f2403d4d589394090fa5d25ff3b1840312b2808e1bc203b7 tests/fixtures/v38_a3c_selective_refine_saved_workflow.json
ee4b2da3dd858d99aacd9053251ffc638ad408cdac2d3a04b1fc2a2af62a60d5 tests/frontend_decode_cache_helper.mjs
94b11903eff9a1805001617477d9066b47f856e4e102b381d8d528c0a100e0d2 tests/frontend_review_queue.cjs
36f74c03a40c4b62b90eede070d976bcd1b7f0ea828983d1e61a6cb6d80a0ea8 tests/helpers/r5_process_crash_worker.py
706029af8c8d979b2b700f5bc2b96a3064fe7c728f487698d9f079abb02e9409 tests/terminal_merge_diagnostics.py
fe23752312d62ddc8c23a3c598ed2f92f2d46e2e4460f06aea91921659092451 tests/test_audit_boundary_repairs.py
041289556cc621ea1857cbb8931ae41d817f69e084b2e8a7622e184a3197b61b tests/test_compatibility.py
875ac33b5458ec5e8d845850ed495707c394436aaadb668a44f36f6a1b73764d tests/test_conditioning_modes.py
2be669b6d21ec40a8b0e172b8ab431f82681f3c97c7de0935d87ad43b0ae8b4e tests/test_context_diagnostics.py
61484ca0552e8341301a481a87e12e44279dbeed68d4b841f4301a4f87ce4a29 tests/test_easy_load_audio.py
4405c94cf190534fdabf5af3fd2ae9cc7cd1b2af6eb8b0d4ab73327cbcd455b9 tests/test_easy_load_image.py
8ba1b07a4d2cdb21aba16a6c05791ec3e35ec7f4f3651e6de5e961be464b7074 tests/test_easy_load_video.py
326a97499ffe51935dd3259dbab4ed71fb02955cd3ddb5a52b5c6558a7efc872 tests/test_gpu_diagnostic_runner.py
4926706cb171e4e36e8d7ed46b592b0ed6c9c2e100072feeba497b651e52653b tests/test_issue13_r2_tools.py
aaed0385281e1782edc96f1d084fa84bc4e7ec9e0055ec35aaf9a9f8b6e5bfce tests/test_issue13_r25_tools.py
ff2e865fb49f0c9f73f3f82eff78ff15373ce8e843514d610b73231dd6217a93 tests/test_issue13_r28_tools.py
c058f189d8e58fd48a80c20c0a857969737a8b13960eee60e5c17db2b9288bc1 tests/test_layout_adapter.py
ab1ea95e363ad0effb9459bcbe713838f12e3501515871203672ea91e7fd4c32 tests/test_m3_conditioning_display.py
2dddf05bbb91b7aa803959a7a8ed78489792ea9c35c5634bfb7d5b1a6c81880f tests/test_model_patch.py
45e8839cd82fd955df344b3bc6efa20092b8870ea378b0c898b073665d3e47d7 tests/test_nodes_logic.py
b635d404ca67df69894c4fcf80d8782cc5699e946bfb55ae4c44fff9d930b018 tests/test_p20_file_backed_tensor_poc.py
@@ -94,14 +161,28 @@ b635d404ca67df69894c4fcf80d8782cc5699e946bfb55ae4c44fff9d930b018 tests/test_p20
2b097971258dd10f0df33e0f8cb5843ee6cd3e9ef9e7abb80b890c66baf22908 tests/test_p22_file_backed_buffer.py
d09d2bae2fac04a058ebce22fa0e761d90b267107923ab8cd01a99cc547624e6 tests/test_p23_assembly_v35.py
d2a02c120e01d360ddca17a92d5bc53b12c9f0734d06440b3fc2fad2e754e549 tests/test_p23_video_seam_patches.py
e2b000c1033f7942f21d667f20e88a17618b90ab7beaacce44ca57862d7a2f7b tests/test_p24_comfy_integration.py
c2560cbafc5962bce5f063e262cf6a173dd8df18f7b58035ec326f616617d61c tests/test_p25_gpu_acceptance_probe.py
114530f8bc4b0a6cd416581636c85d494a07e5dcca93afe9c82f4a5aaaed9dc7 tests/test_p31_prompt_conditioning_cache.py
3597bec1af56114111d778dacb05b4d0f90dbce492ee64dada704d22f566a827 tests/test_p32_api_runner.py
2e183c09d05dea5b3696d2b6a6b1811fb00c385dbb2d4b1f3dc6058af7f27971 tests/test_p32_gpu_profile_probe.py
701cb4c8b43719fac054536fc110b82dcb46939d2135d0a99313993abfc5635d tests/test_p32_profile_server_static.py
403a0ff300330ac1f97642bf0681e80b83eec18e8911c03952ddf203ce794e5a tests/test_p46a_reference_video_memory.py
1ae0369943ba2fb13f21ad0cf56ee58621ba09bf20174379595e157a1775c7fd tests/test_public_api.py
892d3e3e022a527652dd995508c8bbb650c370caf9ee66fa3eb1f7fd288bba38 tests/test_public_workflow_integrity.py
fb84bfa19a09197c3a454ba142be3ba013f6299e6ccf7903c02349b370103317 tests/test_release_metadata.py
b3363add9a08864afbb26a52e0124156f089e95b710c95676f358c9a16f4a64e tests/test_release_metadata.py
5f6caf1814052798f20571ebb863c098bec23d8f2e091fc1f30ce1ef9c58675a tests/test_review_identity_lifecycle.py
5f7d3e01bc78fa076ecb17f8532b6d3f3137545da4028032ad6769407d80be07 tests/test_review_provenance_reroll.py
ed81cc9c969f8402bf4286954e2848df5f38bd4fe16dcff2ac0b4d894a70138b tests/test_runtime_redesign_r0_characterization.py
cda09feb111efb8961e56c5f378f7925d63d0143b084c8248a9bc8be7f33ce6f tests/test_runtime_redesign_r2_validated_prefix.py
88ab786b7d45fe0b28a645da1e25213d6f971250208e7df197ecae862ab32058 tests/test_runtime_redesign_r3_pure_planner.py
5f701a84f43a04c85d6f68627defd958e7dc9a1c0023632265dd2b1d19635b87 tests/test_runtime_redesign_r4_coordinator.py
4b03e1a9140ba32b3c24e1a2567ccbe90ecbe54f1b4e1ed760bc45da5fe9fb5b tests/test_runtime_redesign_r5_transactions.py
fdaf52fbcaea3f85f4e568f4fbb217d33069d6de8b5537bd97d53fcbc3e169a0 tests/test_runtime_redesign_r6_node_facade.py
d4c53d2c260b635d70fa211029d608f63776e0a56c20253475fa47c58363f8a7 tests/test_state_io.py
5af6a16a2337e3483bb0f9197fe04756decd309e4737520c5557b527d68d51bb tests/test_state.py
a1f60f01e9d86c1f2a010752612e373e85112c7054ffc31185b9b459eb2b34a5 tests/test_temporal.py
7f518caa4d95fefd9794b7dafdb8b747963c98dad8473be73a00dff65f3c8ea4 tests/test_terminal_merge_diagnostics.py
f175e9ebf39d6fcaac578b640422676d7f7a54bfdf0f77ec44a3da6aafefd7cd tests/test_timeline_video.py
dc8b9cf0e77b4983ee4eecc60f4acde7d0e063f3b7569402feca8a56165107fd tests/test_v2_decoder.py
3cc94a6a7957ef285f58d373fbab001d926d2b43a754d60bb00bfce98675f32d tests/test_v2_prompts.py
@@ -110,13 +191,16 @@ dc8b9cf0e77b4983ee4eecc60f4acde7d0e063f3b7569402feca8a56165107fd tests/test_v2_
74e623120a963cb96b68651b44f47a836ea8449d30ce89d749c71ffad4766d4e tests/test_v2_seeds_motion.py
b42bcc0983147462d96c6b71cc4a38e846995dafa6eebefc3ae0d9bb36caf359 tests/test_v2_sequence_orchestration.py
0b5b20a8318862d167f135720e0489b8d4f93406d67c6646e052e35b03dcb876 tests/test_v2_session.py
b5c320279fd38d2038e39951a3d016aa9b80741523d2816e01ceda1bdecb71b8 tests/test_v2_terminal_merge.py
e22486ac62c53132c275614e4e161c78e6dce09dd0d1a7cf64f641a3b7052b99 tests/test_v2_widget_migration.py
9bedaefd09ee743c8827f2cc5540880976874284ded371705b9e5142ad8b6c29 tests/test_v217_stable_facade.py
4cb8ed59bab9580b7bdb955d21086c31108d9e4f218e0a57ad357b2c917f5b16 tests/test_v217_stable_facade.py
473abac48a57aa5f297c6e141a94de17ddcb9424a8744bae1c46e6a6a734a0ab tests/test_v3_hardening.py
9242f74663ccb04020ad2fb1199990c84433c9b4c5cf0560e93416c7b15e1913 tests/test_v3_physical_decode_groups.py
35b26c8cade7acb2eec35375d7dfa9a4a112f67a5cec6a842d61c69039de0d84 tests/test_v3_video_seam.py
cc954e0cb40f093b03f8a5b655993ab82375f23b624af995fbdb330f1facf1da tests/test_v31_run_storage.py
3af78ab85c8e19dee8d0a98bfd11a2c0e88c30d87256da1f9699c49a19a684e9 tests/test_v32_reference.py
43aef01fc587c9f9e87baf312eb4d588975aaaacab161a36bfcb638a4c11e31c tests/test_v34_driving_audio.py
aa1f36601489c360d2f1f989c10c5424bd85bd2115df2427afe696758eefd239 tests/test_v34_hybrid_reference.py
4279354d9ed046588d3a685f5150f1cd1891575ddbdcdba870062d8000c64f30 tests/test_v35_compact_ui_frontend.py
75dbdd0d9694d82fab7da23f5cc03bc118c024abc865f6c282799aa8c57427fc tests/test_v35_conditioning_bridge.py
f9e191b2262030f988b6230e2a1f32484df03568fa43ac46d2c34adb61b6dffa tests/test_v35_context_sampler.py
@@ -127,56 +211,102 @@ f9e191b2262030f988b6230e2a1f32484df03568fa43ac46d2c34adb61b6dffa tests/test_v35
8ae5173eaec35adf9efcde2c464c95651c848248bdbdd6396ed2e3c3c1ac7965 tests/test_v35_refine_sampling.py
98a9006ebc4cab2b61b38904e0043fab24e088a25b28ffd38012c29991b8550c tests/test_v35_second_pass_contract.py
a11956a22f373d96f13b395971f39187d6bb12cdc153ce794b4729d258ce9725 tests/test_v35_second_pass_sampling.py
1c2ef5ba0c24819d6365f75f1a263e8320d61f5eb31fda8e4c2266273ec21099 tests/test_v351_reference_audio_ui.py
5003c5f5ce1a4b4c77deb47011431e4a15fe0cecaeb6d689e0d0878567c42f5a tests/test_v351_reference_audio.py
1c317c3443435e71bc3d874d1f1ef80aca6c50263ad5e9e393923ccadd3758f7 tests/test_v351_reference_audio_ui.py
3e9a79079823bd85b0e8848c8421a71ae7aa6ad2e5d47c05c7a5cc12ef9b2101 tests/test_v351_reference_audio.py
5f70cf8bd5248120ffcbe75ff3a54e23030fa6eb318ab0de6e0b08ee20e25a87 tests/test_v36_chunk_duration.py
bf69d1ac3fc30f963b6fed6cbd661f273593904b03275467427a954fbdc0a03f tests/test_v36_masked_video_prefix.py
19631b4abfdf2bd3c187ba4febbd23dd2bc6a0c5027f22c4adb8c1c4f1328926 tests/test_v36_public_sampler.py
324c213aba761e8989a78eadc0cfdcc54d098f50ed1fe84a5ea7aec26f0dc595 tests/test_v37_guide_production.py
14ce0c7f78bcba9948e9e9930c4de5a8c7e8c453fcb6172066d43f593f7175ea tests/test_v37_guide_timeline.py
70b2413ad779bdde05bb131ef19db881c48e02004287d99626467303e23f8af6 tests/test_v37_refine_schedule.py
61484ca0552e8341301a481a87e12e44279dbeed68d4b841f4301a4f87ce4a29 tests/test_easy_load_audio.py
4405c94cf190534fdabf5af3fd2ae9cc7cd1b2af6eb8b0d4ab73327cbcd455b9 tests/test_easy_load_image.py
8ba1b07a4d2cdb21aba16a6c05791ec3e35ec7f4f3651e6de5e961be464b7074 tests/test_easy_load_video.py
b7da41d7654aefaa06997720f7cbbaa7ddc3827b41ed365efd5992e399aa779c tests/test_v38_adaptive_continuity_observer.py
1a24a0cb040a4effba3fcd2974df093597c1686923f0a84f0cd267305a96f7a5 tests/test_v38_audio_only_refine.py
ee4dd8f6eb8114706b2625b4471b041a0ea66198f9f825c63e913c896ed87530 tests/test_v38_branch_provenance.py
e813b5d21af2963a325862acd344b33caa124d0cd3940a940c58118cf27742e0 tests/test_v38_chunk_boundary_diagnostics.py
8cdd5e14487a59ef333cf675fe3da52eb319480e69c5a6262377533cf7d0b160 tests/test_v38_chunk_scoped_refine.py
7344eda4f112901995341ea748781920cb0ae925a665e64d9b28bbdcc810459c tests/test_v38_completed_review_ui.py
c9577e9b2d430c9435a287bf679a920020192d51f780e02b47f286e2e4b6a615 tests/test_v38_easy_mode.py
bb5a1530c890d357dc48ea74039340d746e876e8f85e06d4d9a19369f8ff5961 tests/test_v38_hover_help.py
98eb59407741dd187dc22d94b4f433f341294d05cc38106fde15b580b1465001 tests/test_v38_memory_action_policy.py
9aad999f61c6b9110e58eb762866d5243622e43db4f718c0d23431eeb255ce8f tests/test_v38_public_workflow.py
4338c932fc8a00328c3145b276e0f58a783c721a683b43aa6c24337b05a878ab tests/test_v38_multi_reference_audio.py
623d528a02b6712cba28c374ba3ad979bc84e2ac5318640692589a04ba6ab15f tests/test_v38_open_integration_contract.py
12337a491fa67b38b32aaeb16e0b209393960dbc46db2a8bf968b8c3902855ef tests/test_v38_packed_row_planner.py
8968588b0a999c6443f60da999be99db59ca3b6cf321bfc45c0a5b754d3ee954 tests/test_v38_public_surface_cleanup.py
ac59e1c021dd2b4e617fd87eb5de3e199d31136884754556ba46e6a1a0c5e03d tests/test_v38_public_workflow.py
14ff6561a127287d0a20887790a978612ef9d291f1d3be7d5e85b37b2c74760e tests/test_v38_ref_encode_cache.py
8b376f45261d045b584f02b4d14cd70c2d6269b9c814d4e62b5c612f6e30e36f tests/test_v38_refine_target.py
0b2b1280a1217816984a99c0f948a52a8e2e6fdf924b5c4f2f578719b12b01ed tests/test_v38_video_audio_refine.py
072c9b30a5edefacb4cd682808b9b04dd088f5b7bafce2c090def8dab0efc037 tests/test_v38_reliability.py
cff84ae0562ba5fc48f3608ecaa433e74c0af9b689d7dca94ec8c3c4e9dc232f tests/test_v38_resolution_preset.py
a67a52da8828bdff5d349c40d48c102271d7c9e388120565f50e76941b01f91c tests/test_v38_reliability.py
d512b0b277c7f1e53c3512b00055e237468e2f0f904639dfa4307ef28d39665a tests/test_v38_resolution_preset.py
2ac395009e49f9554af8d1a251d93fc5d5e7070bf80f5a0b7b3f7e00cde15077 tests/test_v38_review_cache.py
ee4dd8f6eb8114706b2625b4471b041a0ea66198f9f825c63e913c896ed87530 tests/test_v38_branch_provenance.py
72a0e3cb334049b66dd36f52c826931067c242fa63557933fd667138b38d6e8d tests/test_v38_review_control.py
ed81cc9c969f8402bf4286954e2848df5f38bd4fe16dcff2ac0b4d894a70138b tests/test_runtime_redesign_r0_characterization.py
cda09feb111efb8961e56c5f378f7925d63d0143b084c8248a9bc8be7f33ce6f tests/test_runtime_redesign_r2_validated_prefix.py
88ab786b7d45fe0b28a645da1e25213d6f971250208e7df197ecae862ab32058 tests/test_runtime_redesign_r3_pure_planner.py
5f701a84f43a04c85d6f68627defd958e7dc9a1c0023632265dd2b1d19635b87 tests/test_runtime_redesign_r4_coordinator.py
f62daa235117a3041c66ebb17adedb13c0452c3a2fc0acdd51006d7aa0078a9b tests/test_v38_review_execution_cap.py
483735a87ffd67b5d5e3d8cebca5d3c4be00b1bc50c0ab4dba3e5e06f6a2ca98 tests/test_v38_review_run_storage.py
2011ca4fc8b5b0cea7cb8df313f89ccc071396b9121ca27e988f6d7df45016bb tests/test_v38_review_ui.py
75697036f361a9b8ea74f69b15e408670f686c8c0e8a6c1d48fe059cc837d12a tests/test_v38_selective_second_pass_node.py
8026a241301dfc4de518649305458a538ef17a0b1567b113877a2af377738528 tests/test_v38_temporal_window_refine.py
0b2b1280a1217816984a99c0f948a52a8e2e6fdf924b5c4f2f578719b12b01ed tests/test_v38_video_audio_refine.py
af32ec4a8b2c729c97ca56bcb1dd4b2cb672528ef14ffe37ee63843bbde644b3 tests/test_v38x2_decode_cache_integration.py
0dbe8a5f71c92f3523942343b40787104c8b96781461ba3ba82934a6bdbe5834 THIRD_PARTY_NOTICES.md
f218e1a93c42467c6057c5c1d04d57cc82f6331b97ec9257e4e2dfb9c831876a timeline_video.py
0bc369ee428b8a5bc8e370a81fbab427262a1fdb7805a78c442c91698d65efba tools/__init__.py
3d5f29d1e446b94eb16bb02fea98a171c1b29248cbb4de66339030e3a7cea1c3 tools/a2_audio_only_canary_node/__init__.py
2e5a4f468c8dc70b16a083c0fac0aadc6e1e80968fcd80a3241275efbd69c669 tools/a3c_selective_refine_probe_node/__init__.py
58ed8a3e2818f5dbd2214849dc7d105fd399ec8c0b2b7c63f62102c1e18757f1 tools/audio_continuity_output_analyze.py
ea0040b510f748bc69f0c8aa4cc6aa1893e292af620ddd6e76e7847dccac1f8c tools/audio_continuity_research_runner.py
2876dc0f2760d6bffb0138ab4d6ef84da6f2db2d726cc442d7a6f732b7bc2061 tools/g4_sampling_diagnostic_node/__init__.py
9062a3b9e2d03551c8e230a34779ccd74b7e9e38aa18d19939900f0072919f82 tools/g4_sampling_diagnostic_node/node.py
3c17d031c7f5c2a2449a0fa1e4b955b71663b043f072455350d3d25ee8e1c779 tools/gpu_diagnostic_node/__init__.py
3f9a6fb0d2f78d9b5d771b400d02c1c111a65e55ca6991da0b9dbf641a474aec tools/gpu_diagnostic_node/capture.py
f6dcddedf39be823e58dcd034e0fd583116d81f2f827860f714cb11356b9a1a4 tools/gpu_diagnostic_node/continuation_policy.py
92be5f45e1b4b3acf466d2cff24dfa119f64cdbbd5d0e22972c0a7ea9a4e4822 tools/gpu_diagnostic_node/nodes.py
0184162bf563e15b2681096732064e265c83696294e248c8a6981beb8255b568 tools/gpu_diagnostic_node/README.md
5021c682783be19007ecb63775413a1272a246c128c26f314fdaff8acc2bc748 tools/gpu_diagnostic_node/soft_reanchor.py
892804c81c18249348775d233c08508c298edecabc9ff151883053f350c44906 tools/install_gpu_diagnostic_node.ps1
68e3862e52bae7e98ee0db29f9c138db3e21007bbf4e27f1e8407c900a172df4 tools/issue13_drift_analyze.py
e922c8737c8e4a1d62299d27391c0496ecec83c0e9f26600b2039f83b8272b18 tools/issue13_drift_gate_runner.py
653d7204e48edef6caec14b57a539b54fe6fd32cb5659c0d7c43726b711a4487 tools/issue13_r2_analyze.py
55caa8df2cd57289bf39c0b9a9a43440e7c3aa2e5bb89176cb5238c15884bd8d tools/issue13_r2_gate_runner.py
c315aacb3fbe6dc8a38c50cfb336760ee2fd3c293d80617360c3f3b639ae2053 tools/issue13_r25_gate_runner.py
f03916a76a1c1489fd7a23d234a04d0f26fa8afb49a409e0fea779b9fac71a11 tools/issue13_r28_analyze.py
ab4b007df62fc09a6d346dcb8c5171c8ea8b6e56e487720ef9fb91ddf19014d3 tools/issue13_r28_gate_runner.py
e5a84569953ee63b9625f4f2e3195ec368204fddcfc746564cfbd0e8449bb8e9 tools/p20_file_backed_tensor_poc.py
3bf6dfddb9a0e5276613e505465d0f01442035940c0806a3ca64daf7753a8592 tools/p24_comfy_integration_probe.py
6277e2aad67ddc9b446c9883a33e72b5194a053e5b814a9a935ce7a7770d8793 tools/p25_gpu_acceptance_probe.py
5d59c7a9c83639e1a0dc1b52ceb439586c778fbb241edd552c0f165013308bdd tools/p32_api_runner.py
46376e10e01bc7d268334d4d5be77008151b2f848fc70cc1bdab6f097e24f15a tools/p32_gpu_profile_probe.py
48503f4a81e0d1fba870a3126a7fe57e4558f0ec517b6a1369050d845e6038db tools/p32_profile_server.py
ec51ad02e69eaecfa338fe801f017ebe9d5149aa9d0f81bc0980cfd0d9374c1d tools/snapshot.ps1
e0bddeb01d3a64e554a7db844686e6a1888d1f82232493ecf0cd931af160c73f tools/v36_fl2va_combined_gate_runner.py
48e800b407adbf96baa024ee99667d6b309f97771c0bfdf1a6e485cce7c4c3a4 tools/v36_pig3_reference_gate_runner.py
1c31c0a1d9ee9339fa91a802aed2e330ca3abdbc2bbf75268af40787fa821754 tools/v36_production_integration_gate_runner.py
a4ed2c51acf6cdb7518be9a4902ae08e6cb8c51f64dddc732cc1ed094d9ea248 tools/v36_r1_api_runner.py
79cd8ac0537c575fef40285d729e499b5ea1824706b80be7772121150fa193cf tools/v36_r1_stress_gate_analyze.py
016d8dc0d4c312632160c43e4db5a46902a91decfec01271fee46c5ba5c28452 tools/v36_r1_stress_gate_runner.py
6bbe745abe6307515ce511283d5f94321c024f1494dc1e29efd1faf6466c6fbf tools/v36_r2_audio_boundary_analyze.py
a74ebadd2f843bd11a7d3f70c0739c2ef97337040b1e54b34309d528a332df41 tools/v36_r2_cached_seam_probe.py
90662f701e7d06f32d6be7d3d1308903e497d8227ddfb74cb38103e80e6b7784 tools/v36_r2_gpu_gate_runner.py
2688126517873ebc63bc3a92151d33949e2bc3a03a56d4646176f753d3b6a9a9 tools/v38_a2_audio_only_gpu_canary.py
5d9a4a107860726548aad4e91c55807b29306f572ddffa164f3436b73e970bdc tools/v38_a3c_selective_refine_gpu_matrix.py
93e23199d1aca25402e6501abf56df17844ac6f8a0dc896a15164bc1c6410f82 tools/v38_a4_chunk_scoped_refine_gpu_matrix.py
88a8fdb844fbfbcb8e4e42f711f454cae6905a0d405a7cc5b25572aabf5d5e14 tools/v38_a6_temporal_window_refine_gpu_matrix.py
57bbb1666f09e24358ff1570f74105356c51e86d934022e6d5ea5e4c9abb0b65 tools/v38_a7a_packed_row_gpu_matrix.py
abd9ae134d78ab935cde635cae2e815e68a608add8051aaafa4e780980c23e4c tools/v38_a7b_memory_action_gpu_matrix.py
41529fa50b0a2fe0b5b318d10cfdaf63b9c670836f3b7df60ada38a432a427dd tools/v38_a8a_adaptive_continuity_gpu_matrix.py
cf9eaee6730fb15aa757b13d9a3c5775f398d845e4c7cb4be66f88f620f6a7e8 tools/v38_easy_driving_audio_gpu_gate_runner.py
c4b01f7a064490ff58d6b6d9cf599dcd29b972a5559d680073c4265e2581627e tools/v38_easy_gpu_gate_runner.py
97659b64de37568e1916699d7486aa112b94d1e2da6a1eed8fecc196b1c89459 tools/v38_g4_conditioning_determinism_gate.py
6150084050d36aad35296c3518c94f584e2de04359e2969e87fbfacf423de084 tools/v38_g4_sampling_determinism_gate.py
cc247c01a01efaf594c24c7ce36ca3357c092fc28dd742c7577093ee9d5efdef tools/v38_resolution_gpu_gate_runner.py
ad8609a45ba818fb74245b30cb0a3a221d6b345c20671092cafd714d8b07aaea tools/v38_review_phase_f_gpu_gate_runner.py
60e9bf2c7c40ef9dd71f08ec2ec8c25f7ae9b08e74c3b7be5964e1138848ae82 tools/v38_review_phase_f_recovery_runner.py
556bce17d14303d1e8a36a85dc13da24c46eedd86f3eacdb102289574faf0626 tools/verify_runtime.py
a18136a4decfeef344635bbe9bb18502231c2503b034ce1d21cc2e5e77cc5e2f tools/validate.ps1
087f4f727e9f76bb2b0061e26e0b49065370aa352a1ebebc7f253774b3be22ed tools/verify_runtime.py
ffd61f3f31c9b6430e1169007ee906c8f5000eba63ee44e2976ad4f5f1112671 v2/__init__.py
2003902c87bba09cfa143f5a9e4248f3a78c0fb544449a75fd40ba2cacb35655 v2/context_diagnostics.py
cde27db19b677e318cc4dfb4235be7a11429c19945f4083052a91fe117e74c82 v2/decoder.py
31012ec48a64c7467ad869c79982b7f8502c1785c33f51ee1b5727ce8b4243fb v2/diagnostics.py
2ebff4502381f675d06bba4b127b81bc3201e7579ddcd46fa5051cbdf3facd55 v2/h3_builder.py
aea01a48a8c03a25ed97ea05e5b137f89e388832d1be7d38f2da2be3d1b9830b v2/motion.py
fed4bc3cbff47bd0b16b6e99385680dc2253c745f30b7f686afafbb25f77efb1 v2/motion.py
aefa29b9d51a05f9a972d75404fd786300202251887e67f55530e97ccd9519f5 v2/nodes.py
dc2b901789e4b024dbcbc4024c63eb8cbc564d77003ce8c35c0584851ba6dfbd v2/prompts.py
4080f1875b958b316e8e76852c4be5527a6de5c71d604e7642d3098478eb4a36 v2/sampling.py
@@ -191,31 +321,32 @@ ea2922567df90436dd6fa21696833a49dd0cbfeee142a5fedc3a7c303824d473 v3/adaptive_co
b3dc61503d35d9ef0a0dc7fed1c9b2fdc00fcb2072d4e39f64ae0826f9ec7dca v3/assembly_v35.py
7815230e0a9540bc2edeaf818e940b7a1fdd817fd217ba8a4f9cb21aaf6a308e v3/assembly.py
3f62fdb35e804f42d7cbf0828b4e87e69a2b99246c3f7467fe4fa698f1d803c9 v3/conditioning_bridge_nodes.py
bb4567770db74d4d8a286e3eb2da2230987d5a3bf35747c0815960d18049bc06 v3/driving_nodes.py
b230500f37783ab2cba124f3be20ef93a70da37c45db37ea4ab45589c910d1a5 v3/node_facade.py
aa044669259df440a384b5e839f75fa9665790da0c210a427375fdd5c76af779 v3/driving_nodes.py
2f395da6a41981713f99ba40b73d14f2274b8ca34a73cf2b275a444993765b99 v3/easy_audio_nodes.py
64b3e54b42e5156642f9957ccc374fd190d9fc7145637984e702534fb1bf80b4 v3/easy_image_nodes.py
ac859cb1a6e23b8ceae300d818c24fe1346b649a0d663017a9b3ac64aa96fca3 v3/easy_nodes.py
bf6bae0c9e14883728860470af86e14395dba40a7377cd874d4dc4548ae53c65 v3/easy_video_nodes.py
fe03ae0aa0dbbbe5f950bb7da34c18a078d841547992c374ea8beda5e3ad4715 v3/execution_planner.py
6cc7ed74666084c55beb9075304e92a9defafd81b9c6678239ca3859a08cddd7 v3/file_backed_buffer.py
cb53e1b104415032ec79b7e7aa1c99848e63da3eedaa251eeba102970e4172b5 v3/hires_fix_nodes.py
0858487e2b8c0060a856273ffc65d23165b2f253d183f506e27e419aea0da561 v3/latent_resize_nodes.py
5b8a54e67a608e757a505abc712effb33312636e3bb235835a485a506e80eeee v3/masked_continuation.py
91a868d2e392b018b01d0396209849c146b0d560ceb109fcdd87dea7f3d786aa v3/memory_action_policy.py
85477badd85281cfb77582fdd5b34228a9f6b68376f1b7743af2ca7d4b55aa36 v3/memory_attribution.py
fe03ae0aa0dbbbe5f950bb7da34c18a078d841547992c374ea8beda5e3ad4715 v3/execution_planner.py
473dc26ba53010c53e6273ebe04a071ccc6758201a06df46cd2ef4bee4263246 v3/nodes.py
2a03bfd7dae9856c0f4be77130f318b95f8c2f2130a0c9122479bcdef70bb7ec v3/node_facade.py
185e15373609d810f1ac57b46a823d44c6e098386f18c65b39dfa06afe9ea893 v3/nodes.py
a3411c7a295308d21623551cf4aeca5bef511eb5f063f31ac84032e3bdf4e16d v3/packed_row_planner.py
b7c4a35a5e73f528492bc6946b97b687c412f1d3f5f976c19d45c6dc20288c9a v3/pixel_vae_resize.py
b139843ccfc826937c80f118920bbee2609c37d45ef88291f80f491744fd5e76 v3/plan.py
0e3dd69d6d2bec6d9491c2fb806c25f0c62629b1eb5f9e4f77ae8d27a5b19cfc v3/planning_types.py
a3411c7a295308d21623551cf4aeca5bef511eb5f063f31ac84032e3bdf4e16d v3/packed_row_planner.py
ec71e3965f445756d54d005c0e27bea520e26dbac44e1ee3d3867bfe2da100b0 v3/ref_encode_cache.py
057921bf2b05e88c2cbc08c16e2ac483aea905b8a144fbadf4a21d6ae8252427 v3/reference_video.py
9076c47aa5145c81f34793d6c90410656065248f37d9990a92a6a4061b358811 v3/refine_context.py
43f33f989eb70ca87b916fc33267732a2be3dd4581fc72af17c53f840b53ca49 v3/refine_schedule.py
519586b1b3f48c73d329f7a2aaa8a1bfc6fe31ac2ecb64f2b1fdf9c19026001a v3/refine_sampling.py
43f33f989eb70ca87b916fc33267732a2be3dd4581fc72af17c53f840b53ca49 v3/refine_schedule.py
afc149dc347b4c1502ddf32ea4229e633799cd34d2b2c6f98bf8a47910a9ef77 v3/refine_scope.py
ac373d9783d3a7bb968e8117843d246d6a090b66a819015348bff84e7747442c v3/refine_target.py
45ae91f13e8f71405d2f46045c8acc6eabbc9500c194cf5d0ba541bb085cd135 v3/refine_window.py
afc149dc347b4c1502ddf32ea4229e633799cd34d2b2c6f98bf8a47910a9ef77 v3/refine_scope.py
ae909b43ad17934c85881d3b0bea81e7b45c215eeb4d1f9f6a9ea72faf633ddf v3/reliability_v38.py
520a4ae849f83450855ce0023c582db5f91d29d8694a99aa8cf491351c837cff v3/resolution.py
3f03d8659305d2def41939205d21cdc6f35e32943274e87afe539d15b9635f9b v3/review_control.py
@@ -227,32 +358,13 @@ d0a004aa3030c8adaa5ea788f9acc758fcb4a556f203f9a3f63fa4e4b5772063 v3/sampling_en
5a044bdd70c546e4446e0c26af92aae88049ffa2e0e2d01b52033a83a3152d0e v3/targeted_second_pass.py
4178dcfa442abdb06ce276e05bd7bcbaa6da28469ba5e57d3da3c663de4e4a9d v3/video_seam_v35.py
2f07ace1462644f0bee553827b3571535de4d0c2d9ef847bd9e0ca73a4eed5cb v3/video_seam.py
b2eae7de1c9658f508dfec737478e42a6604cbfe2e6381644651340112c8a2a9 version.py
453c98485ec55cca959aa5863ac35ae3b86c4781ae95c9e52ac9f1d9115c9eed version.py
c32b57a979071974662c36f27967b65b01fa2cae552a094df4731de9d3522751 web/decode_cache_helper.js
c2883272b05a9a9146b5c6cf614ddae8a3e6893cd910902023aae61360195289 web/easy_bypass_toggle.js
092088096307d33ac016b82b4774ca38845a2ff2f63b97ac6da8c5aca4fea413 web/easy_load_audio.js
9db0aa94f634578a962d5db49e5c70356040a59df968e3a2e531b327a623081f web/easy_load_image.js
873efcbd15c2d9fa10c9d5fc51a796ad3a18c0c6acceecf499c4b956aa845c6c web/easy_load_video.js
0c68d13a1f8beb7431a32b471f8b0612c42fcc4bf72dd97611a025d158008662 web/easy_v38.js
1db955b555367ec8cad26e35b8ad9a23b808db6ea86ba746d41a3af3b9e336e9 web/project_id.js
dfd195c1f59078f8438bceb7472673abc28c89b183ee4045a9fad27280a9663c .comfyignore
b08159178c999c4c97df6aed67c6cf48b5032548a1d370dc4a0cf7e293ab8031 docs/V38_RELEASE_AND_MIGRATION.md
8c2ec7cdbb2d55536a4c14d7518165c976ae22428f373a4e1ed21959dfcab4a9 tests/test_v38_public_surface_cleanup.py
0cf8d49bcb71b30437dc893f6218dc4cfb1cd244b647e4fbc2861dea2271a33a web/reference_audio_ui.js
a2379349b7a0d5de3f1c8cc2cdd29304f18ebcb879bda8a5721542e89ac080c2 REGISTRY_MANIFEST.sha256
717577efdec5e61600504b77bc2a099ef022c4fe2333e936c3310c7182d8f2a0 docs/V38_OPEN_INTEGRATION_CONTRACT.md
623d528a02b6712cba28c374ba3ad979bc84e2ac5318640692589a04ba6ab15f tests/test_v38_open_integration_contract.py
0bc369ee428b8a5bc8e370a81fbab427262a1fdb7805a78c442c91698d65efba tools/__init__.py
5960c6feb10df5b79d51711d46de55f2f850be69e4943b6c5d12df38b0cedd26 tests/test_v38_multi_reference_audio.py
bb5a1530c890d357dc48ea74039340d746e876e8f85e06d4d9a19369f8ff5961 tests/test_v38_hover_help.py
3d681ded5d4c50cc20c2382e29fdc98d8a48e76d552c41ad5a195d941e66e612 .gitattributes
df4e0e355020d2e731932cff86a4b00932b4f193ec7ed513be0db994ec0e71bb examples/workflows/MiniMax_H3_Continuum_V38x.zip
3c42647d3719ad6d7d6a102ab04df58ce51c54968ec1f6eaae2390b54e0ac2cc tests/frontend_review_queue.cjs
7344eda4f112901995341ea748781920cb0ae925a665e64d9b28bbdcc810459c tests/test_v38_completed_review_ui.py
fe23752312d62ddc8c23a3c598ed2f92f2d46e2e4460f06aea91921659092451 tests/test_audit_boundary_repairs.py
36f74c03a40c4b62b90eede070d976bcd1b7f0ea828983d1e61a6cb6d80a0ea8 tests/helpers/r5_process_crash_worker.py
4b03e1a9140ba32b3c24e1a2567ccbe90ecbe54f1b4e1ed760bc45da5fe9fb5b tests/test_runtime_redesign_r5_transactions.py
d6bac16cb0b794ea9d8836a73d3189a879fb5a96dd2e6fcd974c0de2ebb4ab23 tests/test_runtime_redesign_r6_node_facade.py
1d60cf5d4ef9c45885d4f90289c3b17aa70a6a2752c6b288288322a5e0568050 docs/FAILURE_SEMANTICS_BASELINE.md
a884c0bb08fca1f3a2f2b8f0e607f5d2c9ea27feec902fdce720743026fae019 docs/R0_RUNTIME_CHARACTERIZATION.md
c6ea788a03c5f29f32fb6a4fd62db92f108e604493d818b9729e9d7fb967526e docs/FAILURE_SEMANTICS_DELTA_R5.md
e6b8cc3250776868f473357cd97ce299fcea31ae18b879ec6e6466f47dbf704e docs/R6_NODE_FACADE_DELTA.md
ec591d1b8f7587594397b995b9584809435f10fa3de6bf8f8df204c34809aa43 web/project_id.js
ecdcd27528f6f1e80f758c608cbc42f747163ea4c39abd77576b91c627423d12 web/reference_audio_ui.js
46c9f75c9462bf26300332448f4431cca801f38964ca0a49bc2c50a88a7cc40f web/reference_image_ui.js
+44 -41
View File
@@ -1,8 +1,9 @@
ComfyUI-H3-Continuum V3.8X / package 3.8.2 — package validation record
ComfyUI-H3-Continuum V3.8X2 / package 3.8.3 — package validation record
Status: local source and Release Candidate validation PASS. Package 3.8.2 synchronizes publication metadata and package-integrity manifests after the post-3.8.1 README update. GitHub Actions and Comfy Registry publication are post-commit gates and are not claimed by this source-tree record.
Status: local commit/push preparation PASS. No commit, push, tag, GitHub Release,
or Registry publication is authorized or performed by this record.
Public surface: exactly seven nodes
Public surface: exactly nine nodes
- H3 Continuum Sampler V3.8
- H3 Continuum Reference Audios
- H3 Continuum Finalize
@@ -10,46 +11,48 @@ Public surface: exactly seven nodes
- H3 Continuum Load Audio
- H3 Continuum Load Video
- H3 Continuum Second Pass
- H3 Continuum Reference Images
- Decode Cache Helper
Protected contracts
- Sampling Contract v5
- Run Storage v3
- State, Session, Assembly Plan, Driving Audio, and Second Pass/O1
- Existing six public node IDs, sockets, and widget order
- AUDIO-R1 adds only the Reference Audios helper and the Sampler's optional bundle socket
Official V3.8X2 workflows
- MiniMax_H3_Continuum_V38X2.json / .zip
- MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json / .zip
- Both names contain the same graph. Each ZIP contains only its correspondingly
named JSON. The JSON SHA-256 is
6c445d62979632bc1a801b1c28dbd639c23b51cc156ebae18837baaa757e592b.
Accepted V3.8X evidence (2026-09-15)
- Runtime Redesign R0-R6: PASS
- Local Release Candidate Gate: PASS
- Full CPU suite: 1261 passed, 1 skipped, 0 failed
- Final GPU Functional Gate: PASS for a 3 x 5 second Review Each Chunk run
- Resume / prefix reuse and AV integrity: PASS; Q4 reused 3 groups and generated 0 groups
- Q3/Q4 decoded RGB and PCM SHA-256 values: identical
- Full subjective image and audio quality: not graded by that functional Gate
- Public workflow JSON SHA-256: 26bbca92b5f7cac4cbde89290b3f801b7a895df76a07493ca6f65c18d5b1154a
- Public workflow ZIP SHA-256: df4e0e355020d2e731932cff86a4b00932b4f193ec7ed513be0db994ec0e71bb
Reference Image 1–9 resource gate
- Tested system: NVIDIA GeForce RTX 5060 Ti 16 GB / RAM 64 GB.
- Tested run: 512 x 608, 3 x 5 seconds, Full Run, Spectrum Off, LoRA Off,
Sage Attention, Balanced 22-frame continuity.
- Nine test references were reduced to about 0.30 MP each.
- Sampling used about 15.0–15.5 GiB of the available 16,311 MiB VRAM.
- This is a high-resource configuration with little 16 GB headroom. Pre-resize
source-image copies to about 0.30 MP before loading all nine. Larger inputs,
output sizes, wrappers, or concurrent workloads may require more VRAM/RAM.
Package 3.8.2 integrity requirements
- README, package version metadata, CHANGELOG, tests, and validation record must reach their final state before either manifest is generated.
- MANIFEST.sha256 and REGISTRY_MANIFEST.sha256 must verify with missing = 0 and mismatch = 0.
- The supplied V3.8X workflow JSON and ZIP bytes must remain unchanged.
- Production runtime, Sampling, Review, Run Storage, public node schema, sockets, and widget order must remain unchanged.
- The immutable V3.8.1 release and historical V3.8.0 release remain available through their matching Git tags.
Decode Cache Helper boundary
- It can reuse Decode only when latent contents, shape, dtype, decode metadata,
VAE identity, and a process-local cache entry all match.
- It does not accelerate Sampling. A first MISS can be slower.
- The measured 20%+ reductions are configuration-specific observations, not an
unconditional speed guarantee.
Preparation verification
- Full CPU suite: 1,367 passed / 1 skipped / 0 failed.
- Frontend Review Queue: 46/46 PASS.
- Workflow JSON structure: 32 nodes / 38 links / zero broken saved links.
- Workflow aliases: byte-identical JSON; ZIP payload parity required.
- Development and Registry manifests: regenerated after documentation and
workflow bytes were finalized; final hash verification is part of the
commit-ready Gate.
Registry package policy
- Include production runtime modules, the two runtime-required tools modules, and tools/verify_runtime.py for package verification.
- Exclude tests, runner/probe/diagnostic tools, internal state/worklog documents, development manifests, Labs assets, and historical workflows.
- Include examples/workflows/MiniMax_H3_Continuum_V38x.json and examples/workflows/MiniMax_H3_Continuum_V38x.zip as one identical user-supplied V3.8X graph in two formats.
- Spectrum, rgthree, and KJNodes are external requirements and are not bundled. ComfyUI-Easy-Use is not required.
- Preserve the supplied workflow bytes. Exclude unrelated backup ZIPs without deleting them.
- REGISTRY_MANIFEST.sha256 must cover the exact staged archive files with zero missing, extra, or mismatched paths.
Post-commit publication sequence
1. Push the ordinary Git commit to main.
2. Confirm the exact pushed commit passes GitHub Actions.
3. Build an isolated Registry stage from that commit.
4. Run official comfy-cli validate and pack.
5. Re-expand the archive and prove source/stage/archive payload parity.
6. Publish package 3.8.2 to Comfy Registry only after all preceding gates pass.
This record describes evidence and required gates. It does not itself perform or authorize a GitHub tag, GitHub Release, or Registry publication.
- Include production runtime modules and only the explicitly re-included tools,
documents, and four V3.8X2 workflow files from .comfyignore.
- Exclude tests, internal AGENTS/PROJECT_STATE/WORKLOG files, development
MANIFEST.sha256, historical workflow files, caches, and unrelated ZIPs from
the Registry payload.
- MANIFEST.sha256 covers the prepared source tree except itself and the three
internal project-state files. REGISTRY_MANIFEST.sha256 covers the actual
Registry payload except itself.
+80 -27
View File
@@ -1,12 +1,51 @@
# ComfyUI-H3-Continuum 3.8.2 — V3.8X
<img width="1536" height="1024" alt="exec-7cbb1899-cece-4794-b94f-c287dc62b2a9" src="https://github.com/user-attachments/assets/bfc4fa85-bd45-48df-87c5-e45fa6d065b1" />
> This is the current **V3.8X / package 3.8.2 guide**. It documents the supported seven-node surface and the supplied V3.8X workflow. The immutable V3.8.1 release remains available from tag [`v3.8.1`](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/tree/v3.8.1), and the older V3.8.0 package remains available from tag [`v3.8.0`](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/tree/v3.8.0). Do not combine workflows or instructions from different release tags.
**Download V3.8X workflow: [JSON](examples/workflows/MiniMax_H3_Continuum_V38x.json) | [ZIP](examples/workflows/MiniMax_H3_Continuum_V38x.zip)** — [Latest release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/latest)
# ComfyUI-H3-Continuum 3.8.3 — V3.8X2
> **V3.8X2** is the product and workflow label for package `3.8.3`. It keeps the V3.8 production sampler and adds optional Reference Images 4–9 plus the built-in Decode Cache Helper. The older V3.8.0 package remains available from tag [`v3.8.0`](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/tree/v3.8.0).
## Official V3.8X2 workflows
- **Standard name:** [JSON](examples/workflows/MiniMax_H3_Continuum_V38X2.json) | [ZIP](examples/workflows/MiniMax_H3_Continuum_V38X2.zip)
- **Helper-explicit name:** [JSON](examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json) | [ZIP](examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip)
The two names contain the **same official graph**; they are distribution aliases, not different configurations. Both include the built-in Decode Cache Helper with its saved `Auto / RAM 256MB / Disk 8GB / reset_token 0` settings and the nine-reference helper connection. Each ZIP contains only the correspondingly named JSON. Older V3.8X workflows remain available for existing projects.
## Nine Reference Images: memory warning
Reference Images 1–3 connect directly to the Sampler. Optional images 4–9 connect through `H3 Continuum Reference Images` and then to `Reference Images (Optional)`. Using all nine is a high-resource configuration, not the normal minimum requirement.
The acceptance run completed on an **RTX 5060 Ti 16 GB / 64 GB system** only after the nine source references were kept near **0.30 MP each**. With `512 × 608` output, `3 × 5 seconds`, Spectrum Off, LoRA Off, Sage Attention, and Balanced 22-frame continuity, Sampling used about **15.0–15.5 GiB of 16,311 MiB VRAM**. There was little 16 GB headroom.
When using many references, especially all nine, resize copies of the source images to about 0.30 MP before loading or connecting them. The Sampler still performs its normal conditioning resize, but smaller source files reduce input and preprocessing pressure. Larger references, larger output sizes, extra wrappers, or concurrent GPU work may require a higher-spec GPU and more system RAM. Nine references are optional and are not guaranteed to improve quality over three.
## Built-in Decode Cache Helper
### Important: this is not an unconditional new-generation speedup
**Manual cache clear:** normally no action is needed. Press the Helper's "キャッシュをクリア" (Clear cache) button to discard that Helper's cache on the next Queue and run native Decode again. It does not delete immediately or queue automatically. The internal `reset_token` remains serialized for workflow/API compatibility and increments once per click (wrapping to 0 at the INT limit). Creating, loading, or cloning a node does not change it. Without JavaScript, or in API workflows, change `reset_token` through the traditional numeric input.
**The Helper saves time only when unchanged latents are decoded again. It does not accelerate Sampling.** A first MISS runs native Decode and stores the result; hashing and storage can make that run slower. Generating different latents with a new random seed each time normally produces MISS, so this feature should not be expected to speed up that usage.
Concrete reuse scenarios:
- **Continue by adding chunks:** when existing chunk latents are retained and decoded again for output, cached existing chunks can HIT; newly generated chunks initially MISS.
- **Fix / partial regeneration:** unchanged chunk latents can HIT when submitted again; regenerated chunks whose latent contents changed MISS.
- **Complete / Resume output:** decoding retained latents again without resampling can benefit. Merely playing an existing video file is not a cache use case.
- **Retry from Decode onward, or change Finalize/output settings:** reuse applies when the same latents and decode-related metadata reach the Helper and Decode runs again.
- **Regenerate with a fixed seed:** reuse requires identical resulting latent contents. The same seed alone does not guarantee HIT.
The action names themselves do not enable reuse. **Each Video/Audio entry must match in latent contents, shape, dtype, decode-related metadata, and VAE identity, and its cache entry must still exist in that Helper.** If ComfyUI reuses an existing output without executing Decode, there is no additional Decode saving attributable to this Helper. Connect the Helper and select `Auto` or `RAM`. In its report, `hit` means reuse, `miss` means native Decode, and `off` / `bypass` mean no cache reuse.
Cache reuse is process-local and does not survive Python restarts. Eviction and VAE identity changes can also cause MISS. Changing mode, RAM/Disk budgets, or `reset_token` clears this implementation's Helper cache. Keeping `reset_token = 0` does not reset it on every Queue.
V3.8X2 ships `H3DecodeCacheHelper` inside this Continuum package. It remains a separate public node under `MiniMax H3/Continuum/Helpers`; no second custom-node addon is needed. The nine public node IDs are the seven V3.8X IDs plus Reference Images and this helper. Sampler, Finalize, Assembly Plan, Core Decode, and saved Sampler widget/socket contracts are unchanged.
Connect Sampler `video_latents` and `audio_latents` plus their native Video/Audio VAE inputs to the Helper, then connect Helper `images` and `audio` to Finalize. Keep the Sampler `assembly_plan` directly connected to Finalize. The [official V3.8X2 workflow](examples/workflows/MiniMax_H3_Continuum_V38X2.json) preserves its saved graph and settings. It contains no Core VAE Decode nodes, so returning to Core direct Decode requires adding those two Core nodes and reconnecting Finalize, or loading a prior Core-direct V3.8X workflow. Do not simply remove the Helper and expect automatic rewiring.
`Auto` caches full physical Video decodes on private process-local disk and small Audio decodes in bounded RAM. `Off` delegates native Decode and clears the Helper cache. Cache failure falls back to native Decode; native Decode, OOM and queue interruption are not retried. Files are not reused across Python restarts. Keep only one provider of the `H3DecodeCacheHelper` node ID: the previous standalone addon must be disabled or removed during the migration, after a verified built-in installation.
At 736×416 (0.306MP), 3×5 seconds, Euler/simple 6 steps, Turbo FL2V v1.2, a warm backend and three Video HITs, one measured configuration produced a **mechanistic estimate of about 47 seconds / 24.5% less Full Run Total**. One direct A/B pair observed 50.887 seconds / 26.46%, and two Complete/Resume re-decode pairs averaged 46.309 seconds / 79.826% less Total. These are narrow observations, not repeated universal averages or an unconditional 20%+ speed promise. The first MISS can be slower, new Sampling is not accelerated, and a changed latent or VAE identity produces a MISS.
**Historical V3.8X workflow: [JSON](examples/workflows/MiniMax_H3_Continuum_V38x.json) | [ZIP](examples/workflows/MiniMax_H3_Continuum_V38x.zip)** — [Published releases](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases)
✅ V3.8X on `main` includes the September 8, 2026 Review hotfix: Review Each Chunk continuation, stale `Regenerate From` state, completed-sequence extension, and Render History queue handling are repaired. Update with `git pull --ff-only origin main` (or ComfyUI Manager **Update**), restart ComfyUI, and hard-refresh the browser if the old UI remains. Existing saved Takes are preserved. Issue #13 remains a separate open long-continuation quality issue and is not part of this hotfix.
@@ -40,7 +79,7 @@ git clone --branch v3.8.0 --single-branch https://github.com/ukr8b3g-cmyk/ComfyU
Use only one Continuum checkout at a time. ComfyUI Manager **Update** tracks `main`; it does not select historical tags.
Download the current V3.8X workflow: [JSON](examples/workflows/MiniMax_H3_Continuum_V38x.json) or [ZIP containing the same JSON](examples/workflows/MiniMax_H3_Continuum_V38x.zip). This is one Spectrum-capable graph, also usable with [LightX2V Turbo](https://github.com/ModelTC/Minimax-H3-Turbo); both Spectrum and all Turbo LoRA entries are saved disabled. Install its external Spectrum, rgthree, and KJNodes nodes before opening it. ComfyUI-Easy-Use is not required. See [Spectrum and Turbo setup](#turbo-lora-and-spectrum-in-supplied-workflows) below.
Download the current V3.8X2 workflow: [JSON](examples/workflows/MiniMax_H3_Continuum_V38X2.json) or [ZIP containing the same JSON](examples/workflows/MiniMax_H3_Continuum_V38X2.zip). This is one Spectrum-capable graph, also usable with [LightX2V Turbo](https://github.com/ModelTC/Minimax-H3-Turbo); both Spectrum and all Turbo LoRA entries are saved disabled. Install its external Spectrum, rgthree, and KJNodes nodes before opening it. ComfyUI-Easy-Use is not required. See [Spectrum and Turbo setup](#turbo-lora-and-spectrum-in-supplied-workflows) below.
## Prompt and skill downloads
@@ -67,7 +106,7 @@ AI products, plans, and repository-reading behavior change frequently. If a URL
## V3.8 supported surface
V3.8 exports exactly seven searchable nodes:
This local package exposes nine searchable nodes: the original seven V3.8 nodes plus Decode Cache Helper and Reference Images.
- **H3 Continuum Sampler V3.8** — the Main sampler
- **H3 Continuum Finalize** — decoded Video/Audio assembly with optional seam handling
@@ -76,20 +115,22 @@ V3.8 exports exactly seven searchable nodes:
- **H3 Continuum Load Video**
- **H3 Continuum Second Pass** — the Advanced bridge for external latent processing or upscaling
- **H3 Continuum Reference Audios** — an ordered Reference Audio 1/2/3 bundle helper
- **H3 Continuum Reference Images** — optional additional Reference Images 4–9
- **Decode Cache Helper** — the existing optional decoded-result cache
The current frontend uses `Show Advanced Settings` / `Hide Advanced Settings` to change presentation without changing generation values. Saved drafts that still contain the former frontend-only `H3 Continuum View` property are migrated to the matching collapsed/expanded view and the legacy property is removed. If the frontend extension is unavailable, the complete Python-defined interface remains visible and executable.
The supported flow is:
The official V3.8X2 workflow uses the Helper path:
```text
H3 Continuum Sampler V3.8
-> Core Video/Audio Decode
-> Decode Cache Helper
-> H3 Continuum Finalize
-> Create Video
-> Save Video
```
Core Decode, Save, and upscaling remain external. Hi-Res Fix is not part of the V3.8 standard workflow; use Second Pass as the bridge when an external latent processor or upscaler is needed. External processors may change only Video LATENT spatial geometry while preserving physical groups, B/C/T, finite values, first-pass Audio, and the original Assembly Plan. Finalize accepts public `IMAGE`/`AUDIO` outputs and does not require a specific decoder class. SageAttention, Sol-Attn, and Spectrum remain external MODEL wrappers. See the [V3.8 Open Integration Contract](docs/V38_OPEN_INTEGRATION_CONTRACT.md).
The Helper delegates cache MISS entries to native Core Video/Audio Decode. A manually wired direct Core Decode path remains supported, but it has no decoded-result cache. Save and upscaling remain external. Hi-Res Fix is not part of the V3.8X2 standard workflow; use Second Pass as the bridge when an external latent processor or upscaler is needed. External processors may change only Video LATENT spatial geometry while preserving physical groups, B/C/T, finite values, first-pass Audio, and the original Assembly Plan. Finalize accepts public `IMAGE`/`AUDIO` outputs and does not require a specific decoder class. SageAttention, Sol-Attn, and Spectrum remain external MODEL wrappers. See the [V3.8 Open Integration Contract](docs/V38_OPEN_INTEGRATION_CONTRACT.md).
## Complete V3.8 UI reference
@@ -115,11 +156,12 @@ The Sampler returns six outputs: a list of `video_latents`, a list of `audio_lat
| `first_frame` | First Image for I2VA or FL2VA | Can also supply the output aspect ratio when `Size Source = First Image` |
| `last_frame` | Optional final-image constraint for FL2VA | Can trigger a Long Terminal Merge; the final pair may become one atomic review unit |
| `reference_image_1`–`reference_image_3` | Ordered appearance, identity, subject, or scene references | They never become the implicit size source |
| `Reference Images (Optional)` | Additional images 4–9 bundled by `H3 Continuum Reference Images` | Empty inputs are skipped; encoding remains in the Sampler |
| `Video Guide Frames` | A video loader's IMAGE frame batch, applied as a persistent guide | It does not carry the source video's audio; frames are interpreted at 24 fps |
| `Driving Audio` + `Driving Audio VAE` | Original audio timeline used as native guide conditioning | The selected source audio becomes final audio; generated audio and Audio Seam are bypassed |
| `Reference Audio (Optional)` + `Reference Audio VAE (Optional)` | Legacy single conditioning-only audio reference | Generated audio remains final audio |
| `Audio References (Optional)` | Ordered bundle from `H3 Continuum Reference Audios` | Do not connect this together with the legacy single Reference Audio path |
| `Still Image Guide (Optional)` | Compatibility socket inherited from the V3.7 guide contract | Experimental; not part of the seven-node V3.8 standard workflow |
| `Still Image Guide (Optional)` | Compatibility socket inherited from the V3.7 guide contract | Experimental; not part of the V3.8X2 official workflow |
#### First Image, Last Image, and Reference Images
@@ -127,11 +169,13 @@ The Sampler returns six outputs: a list of `video_latents`, a list of `audio_lat
- **First Image** establishes the opening image and is the normal visual starting point for I2VA/FL2VA. It is also the only media input that can drive `Size Source = First Image`.
- **Last Image** constrains the sequence ending. Leave it `OFF` for T2VA and ordinary I2VA. With a connected Last Image, extending or regenerating the sequence may rebuild the terminal pair.
- **Reference Images 1–3** guide identity or appearance throughout generation. Their prompt order follows their connected order; they do not replace First Image or Last Image.
- **Reference Images 1–9** guide identity or appearance throughout generation. Inputs 1–3 remain on the Sampler; optional inputs 4–9 are on `H3 Continuum Reference Images`, connected to the Sampler's `Reference Images (Optional)` socket. The helper only bundles images: resizing, hashing, and VAE encoding remain in the existing Sampler path. Empty slots are skipped; Picture numbers follow active slot order after any First/Last Image. Existing three-loader templates still work unchanged.
Saved workflows with the earlier direct image 4/5 inputs migrate those links into a bundle after graph loading. Migration preserves the original source links and only removes a legacy input after its new link is verified. If a source is unavailable or its destination is occupied, the legacy link is retained with a warning. Old API prompts remain accepted; supplying both legacy and bundle images for the same slot is an explicit input conflict.
![Three optional Reference Image loaders](docs/images/v38-manual/reference-images-three-bypass.png)
Every `H3 Continuum Load Image` has `Enable Image`. `ON` loads through ComfyUI Core. `OFF` uses native node bypass and makes that optional path behave as unconnected without deleting the node or cable. This is why one reusable workflow can expose First, Last, and three Reference Image slots without forcing every slot to be active.
Every `H3 Continuum Load Image` has `Enable Image`. `ON` loads through ComfyUI Core. `OFF` uses native node bypass and makes that optional path behave as unconnected without deleting the node or cable. First, Last, and up to nine Reference Image inputs can therefore be connected without forcing every input to be active. An empty image bundle returns no reference and does not change the zero-to-three-image sampling/reuse contract.
| Public loader | Controls | Outputs |
|---|---|---|
@@ -285,7 +329,7 @@ The four MiniMax H3 Turbo files shown in the example come from the LightX2V Mini
The number in a Turbo filename is its distilled NFE target. Use the matching upstream recommendation unless a provided workflow explicitly documents a tested exception. In particular, using a 4-step LoRA with `Steps = 6` is a workflow-specific experiment, not the LightX2V default. `Euler`/`simple`, the actual Steps value, and the selected LoRA must be recorded together when comparing results.
`Power Lora Loader (rgthree)`, KJNodes SageAttention, and Spectrum are external components. Continuum does not install, enable, or tune them. The [V3.8X workflow](examples/workflows/MiniMax_H3_Continuum_V38x.json) is the single supplied graph, distributed unchanged as JSON and ZIP. Its saved default has Spectrum disabled, no Turbo LoRA enabled, `res_multistep`, `simple`, and `Steps = 20`. These three custom-node packages are required to open the complete graph, including when switching it to Turbo. ComfyUI-Easy-Use is not required.
`Power Lora Loader (rgthree)`, KJNodes SageAttention, and Spectrum are external components. Continuum does not install, enable, or tune them. The [V3.8X2 workflow](examples/workflows/MiniMax_H3_Continuum_V38X2.json) is the supplied graph, distributed under two official filename aliases as matching JSON and ZIP pairs. Its saved default has Spectrum disabled and no Turbo LoRA enabled. These three custom-node packages are required to open the complete graph, including when switching it to Turbo. ComfyUI-Easy-Use is not required.
The supplied prompt, media selections, and node titles have deliberately been preserved. Choose files available on your computer, disable unused optional inputs, and enter your own prompt before generating. Models, LoRAs, images, and audio are not included. A custom title such as `Save 3x5s Video` is only a saved label: actual duration follows the Sampler's `Chunks` and `Seconds per Chunk`, not that title.
@@ -297,7 +341,7 @@ The same graph can be used as the quick Turbo path: disable Spectrum, enable exa
An experimental prefix-amplitude renormalization produced a strong improvement in one `6 × 5 s` run, but a later frozen `4 × 8 s` A/B/C gate did not reproduce the target drift and therefore applied gains of `1.0`; Standard and the experimental arm were bit-exact. The older Compatibility route did not justify replacing Standard and raised a separate boundary-audio concern. The accurate release statement is therefore: **the issue is not proven fixed, the current Standard path is unchanged, and experimental mitigation stays Default Off**. Report the first and worst affected chunk, workflow JSON, prompt, seed, model/LoRA, Steps/SIGMAS, size, Continuity, and Audio Continuity when reproducing it.
> **V3.8 support boundary:** V3.8 exports only the seven public nodes listed above. Some retain earlier IDs, including Finalize (`H3ContinuumAssembleSeamV35`) and Second Pass (`H3ContinuumSecondPassV35`); this does not make all older workflows compatible. A saved workflow that uses an ID outside the current seven-node surface can load as an unknown node. Use the matching historical GitHub Release/tag for that workflow instead of restoring its unsupported IDs in V3.8. See [V3.8 Release and Migration Policy](docs/V38_RELEASE_AND_MIGRATION.md).
> **Support boundary:** The original V3.8 launch surface had seven nodes; this local package also exports Reference Images and Decode Cache Helper. Some retain earlier IDs, including Finalize (`H3ContinuumAssembleSeamV35`) and Second Pass (`H3ContinuumSecondPassV35`); this does not make all older workflows compatible. Use the matching historical Release/tag for unsupported node IDs. See [V3.8 Release and Migration Policy](docs/V38_RELEASE_AND_MIGRATION.md).
The accepted 16GB GPU gates reached about `15.5-15.6 GiB` in the most complex cases. Actual use varies by GPU, driver, backend, model precision, resolution, and connected nodes; this is not a universal 16GB guarantee.
@@ -654,7 +698,7 @@ Prompt/CLIP figures measure only the conditioning subphase, not total generation
The measured Sage-only production baselines on the tested RTX 5060 Ti 16 GB / 64 GB system were 168.069 seconds for 1×5-second 576×576 T2VA and 379.765 seconds for 3×5-second 640×640 FL2VA Long Terminal Merge. These are configuration-specific baselines, not universal speed guarantees. Sampling remained the dominant cost; Continuum Assemble + Seam stayed below 1%.
> **V3.8.0 is the historical release baseline.** The current package is V3.8X / 3.8.2; the immutable V3.8.1 release remains available from its matching tag. Historical implementation modules remain in source because V3.8X reuses them internally. Only the seven current public nodes are exported, including the earlier IDs retained for those nodes. Use the matching historical Release/tag for workflows requiring other IDs. Still Image Guide remains Experimental.
> **V3.8.0 is the historical release baseline.** The current publication target is V3.8X2 / package 3.8.3. Historical implementation modules remain in source because V3.8X2 reuses them internally. Only the nine current public nodes are exported, including the earlier IDs retained for those nodes. Use the matching historical Release/tag for workflows requiring other IDs. Still Image Guide remains Experimental.
## V3.5.1 Reference Audio & Compatibility Update
@@ -808,7 +852,7 @@ For the failed 3 x 5s case, First Pass and the 37T Second Pass group completed.
## V3.4 compatibility baseline
The historical V3.5 package retained V3.4 nodes for saved workflows; it did not replace their Node IDs, public sockets, Sampling, Conditioning, Terminal Merge, Assembly, Seam, or Run Storage behavior. Those historical workflows remain available through the corresponding Release/tag. V3.8 does not export IDs outside its current seven public nodes, even when their implementation modules remain in source.
The historical V3.5 package retained V3.4 nodes for saved workflows; it did not replace their Node IDs, public sockets, Sampling, Conditioning, Terminal Merge, Assembly, Seam, or Run Storage behavior. Those historical workflows remain available through the corresponding Release/tag. V3.8X2 does not export IDs outside its current nine public nodes, even when their implementation modules remain in source.
![H3 Continuum V3.4 workflow overview](docs/images/v34-workflow-overview.png)
@@ -837,8 +881,9 @@ This is a usability and reliability decision, not a claim that the experimental
## Example workflow
- [V3.8X workflow JSON](examples/workflows/MiniMax_H3_Continuum_V38x.json) — Spectrum disabled by default; switch the same graph to LightX2V Turbo as described above
- [V3.8X workflow ZIP](examples/workflows/MiniMax_H3_Continuum_V38x.zip) — contains exactly the same JSON, not another variant or a custom-node installer
- [V3.8X2 workflow JSON](examples/workflows/MiniMax_H3_Continuum_V38X2.json) — current official graph; Spectrum is disabled by default
- [V3.8X2 workflow ZIP](examples/workflows/MiniMax_H3_Continuum_V38X2.zip) — contains exactly the correspondingly named JSON, not another variant or a custom-node installer
- [V3.8X2 Helper-explicit JSON](examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json) and [ZIP](examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip) — the same graph under an explicit distribution name
The declared Registry payload includes this one graph in both formats; it is **not dependency-free**. Spectrum, rgthree, and KJNodes must be installed separately; ComfyUI-Easy-Use is not required. Historical workflow files remain in GitHub source but are excluded from the Registry payload. For an older saved workflow, use its matching historical Release/tag as described in the [migration policy](docs/V38_RELEASE_AND_MIGRATION.md). Registry packaging validation/publication is separate from this GitHub source update.
@@ -946,7 +991,7 @@ git pull --ff-only origin main
Restart ComfyUI after the update. If the node was installed with ComfyUI Manager, use its **Update** action instead of running `git pull` manually. Do not mix Manager updates and a separate Git checkout for the same installation.
After the backend restart, search for `H3 Continuum Sampler V3.8`. The complete V3.8X search surface contains the seven nodes listed above. If they are missing, check the startup console for the `H3 Continuum 3.8.2 loaded` message and any `ComfyUI-H3-Continuum` import error.
After the backend restart, search for `H3 Continuum Sampler V3.8`. The complete V3.8X2 search surface contains the nine nodes listed above. If they are missing, check the startup console for the `H3 Continuum 3.8.3 loaded` message and any `ComfyUI-H3-Continuum` import error.
Search for H3 Continuum or Continuum in ComfyUI Manager, or install manually:
@@ -1256,9 +1301,17 @@ Use a 24 fps source for `Video Guide Frames`. `Load Video (Upload)` may accept f
## Current validation status
The V3.8 public-surface suite checks the exact seven-node export, the supplied Spectrum graph and matching ZIP payload, declared external dependencies, Registry exclusions, preserved V3.8 widget/socket order, and presentation-only `Show Advanced Settings` / `Hide Advanced Settings` behavior. Registry payload hashes are recorded in `REGISTRY_MANIFEST.sha256`; source integrity is recorded in `MANIFEST.sha256`.
**Latest local RC evidence:** the full CPU suite passed **1,261 passed / 1 skipped / 0 failed**. The final dedicated GPU Functional Gate passed a `3 × 5 second` Review Each Chunk run: Q1–Q3 generated one physical group at a time, and Q4 reused all three groups with `3 reused / 0 generated`. Q3 and Q4 had identical decoded RGB and PCM SHA-256 values. This confirms functional execution, prefix reuse, and AV reconstruction; it is not a full subjective image- or audio-quality rating.
The V3.8X2 public-surface suite checks the exact nine-node export, both official workflow names and matching ZIP payloads, declared external dependencies, Registry exclusions, preserved V3.8 widget/socket order, and presentation-only `Show Advanced Settings` / `Hide Advanced Settings` behavior. Registry payload hashes are recorded in `REGISTRY_MANIFEST.sha256`; source integrity is recorded in `MANIFEST.sha256`.
**Latest V3.8X2 preparation evidence:** the full CPU suite passed **1,367 passed / 1 skipped / 0 failed**. The prior dedicated GPU Functional Gate passed a `3 × 5 second` Review Each Chunk run: Q1–Q3 generated one physical group at a time, and Q4 reused all three groups with `3 reused / 0 generated`. Q3 and Q4 had identical decoded RGB and PCM SHA-256 values. The separate nine-reference Gate is recorded below. These checks confirm functional execution, prefix reuse, AV reconstruction, and the tested nine-reference path; they are not a full subjective image- or audio-quality rating.
### Nine-reference input gate (0.3 MP reference images)
On the tested NVIDIA GeForce RTX 5060 Ti 16 GB / 64 GB RAM system, a `3 × 5 second` Full Run completed with Reference Images 1–9, `512 × 608` output, Spectrum Off, LoRA Off, Sage Attention, Balanced 22-frame continuity, and test reference images sized to about `0.30 MP` each. Sampling used approximately `15.0–15.5 GiB` of the available `16,311 MiB` VRAM, so this is a high-resource configuration with little headroom on a 16 GB GPU.
Use the nine-reference bundle when the extra appearance or pose evidence is needed and the system has enough VRAM headroom. This single-seed gate confirms execution and basic visual continuity; it does not establish that nine references are universally higher quality than three, nor guarantee operation with higher-resolution references, larger output sizes, different models, or other concurrent GPU workloads.
For nine-reference use on a 16 GB GPU, pre-resize copies of the source images to around 0.30 MP before loading them. Internal conditioning resize remains active, but it should not be treated as a substitute for controlling the memory pressure of nine large source images.
Validation results apply to the tested local source and environment. They do not guarantee that an installed copy is current, that all models/wrappers fit every GPU, or that a different prompt will have the same visual quality.
+71 -13
View File
@@ -1,6 +1,49 @@
# ComfyUI-H3-Continuum 3.8.2 — V3.8X
# ComfyUI-H3-Continuum 3.8.3 — V3.8X2
> これは現在の**V3.8X/パッケージ3.8.2向けガイド**です。ここでは公開7ノードと同梱V3.8X Workflowだけを案内します。固定済みV3.8.1は[`v3.8.1`タグ](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/tree/v3.8.1)、旧V3.8.0は[`v3.8.0`タグ](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/tree/v3.8.0)から引き続き導入できます。異なるrelease tagのWorkflowや説明は混在させないでください。
> **V3.8X2**はpackage `3.8.3`の製品名・Workflow名です。V3.8 Production Samplerを維持し、任意のReference Image 4~9と内蔵Decode Cache Helperを追加しています。旧V3.8.0は[`v3.8.0`タグ](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/tree/v3.8.0)から導入できます。
## V3.8X2 公式Workflow
- **標準名:** [JSON](examples/workflows/MiniMax_H3_Continuum_V38X2.json)/[ZIP](examples/workflows/MiniMax_H3_Continuum_V38X2.zip)
- **Helper明示名:** [JSON](examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json)/[ZIP](examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip)
2つの名称は**同じ公式graph**を収録した配布上の別名で、異なる設定のWorkflowではありません。どちらも内蔵Decode Cache Helperと9枚Reference Image用の接続を含み、Helperの保存値は`Auto / RAM 256MB / Disk 8GB / reset_token 0`です。各ZIPには、対応する名前のJSONだけを収録します。既存projectでは従来のV3.8X Workflowも引き続き使用できます。
## Reference Image 9枚使用時のメモリ注意
Reference Image 1~3はSamplerへ直接接続し、任意の4~9は`H3 Continuum Reference Images`を経由して`Reference Images (Optional)`へ接続します。9枚すべてを使う構成は高負荷であり、通常の最低要件ではありません。
受入テストでは、**RTX 5060 Ti 16 GB/RAM 64 GB**環境で、9枚の元画像を各**約0.30 MP**に抑えた条件で完走しました。`512 × 608`出力、`3 × 5秒`、Spectrum Off、LoRA Off、Sage Attention、Balanced 22-frame continuityで、Sampling中のVRAMは`16,311 MiB`中の約**15.0~15.5 GiB**でした。16 GB環境では余裕がほとんどありません。
多数、特に9枚を使う場合は、読み込み・接続前に元画像のコピーを約0.30 MPへ縮小してください。Sampler内の通常のconditioning用Resizeは引き続き行われますが、小さい入力ファイルにすることで読み込み・前処理時の負荷を抑えられます。高解像度参照、大きな出力、追加wrapper、同時GPU処理では、より高性能なGPUと多いシステムRAMが必要になる可能性があります。9枚は任意であり、3枚より常に高画質になる保証はありません。
## 内蔵 Decode Cache Helper
### 重要:新規生成が一律に速くなる機能ではありません
**キャッシュの手動クリア**:普段は操作不要です。Helperの「キャッシュをクリア」ボタンを押すと、次回QueueでこのHelperのキャッシュを破棄し、通常Decodeからやり直します。ボタンは即時削除や自動Queueを行いません。内部の`reset_token`は保存・API互換用に残り、押すたびに1増えます(INT上限では0へ戻ります)。作成・読込・複製だけでは変更しません。JavaScriptが使えない環境やAPI版では、従来どおり`reset_token`の値を変更してください。
**短縮するのは、変更していないlatentを再びデコードする時間です。Sampling(生成計算)自体は高速化しません。** 初回は通常Decodeとキャッシュ保存を行うためMISSとなり、保存・照合の負荷で遅くなる場合があります。毎回ランダムシードで異なるlatentを新規生成する使い方では、基本的にMISSとなり、この機能による短縮は期待できません。
具体的に再利用できる場面:
- **Continueでチャンクを追加**:既存チャンクのlatentを保持し、出力時にもう一度Decodeする場合、保存済みの既存部分だけを再利用します。追加チャンクは初回MISSです。
- **Fix/部分再生成**:変更していないチャンクのlatentがそのまま再入力される場合、その部分だけを再利用します。再生成してlatentが変わった部分はMISSです。
- **Complete/Resumeで再出力**:Samplingをやり直さず、保存済みlatentから全体を再Decodeする場合に有効です。単なる既存動画ファイルの再生ではありません。
- **Decode以降のリトライ、Finalizeや出力設定の変更**:Helperへ同じlatent・Decode関連情報が再入力され、Decodeが再実行される場合に有効です。
- **固定シードで同条件を再生成**:生成後のlatentが完全に一致した場合だけ再利用できます。同じシードだけではHITを保証しません。
これらの操作名そのものが有効条件ではありません。**各Video/Audioの入力latentの内容・shape・dtype、Decode関連メタデータ、VAE識別情報が一致し、そのHelperにキャッシュが残っていること**がHITの条件です。ComfyUIが上流/出力をそのまま再利用してDecode自体を実行しない場合、Helperによる追加のDecode短縮はありません。Helperを接続し、`Auto`または`RAM`で使ってください。レポートの`hit`は再利用、`miss`は通常Decode、`off`/`bypass`はキャッシュ再利用なしを表します。
キャッシュはPythonプロセス内の利用に限られ、再起動後は再利用しません。上限による退避・破棄やVAE識別情報の変化でもMISSになります。モード、RAM/Disk予算、`reset_token`を変更すると、この実装ではHelperキャッシュをクリアします。`reset_token = 0`を維持することは、毎回リセットする意味ではありません。
`H3DecodeCacheHelper`をContinuumパッケージ内に収録し、UI上は`MiniMax H3/Continuum/Helpers`の独立公開ノードとして残します。インストール対象はContinuumだけです。公開IDはV3.8Xの7件にReference ImagesとHelperを加えた計9件です。Sampler、Finalize、Assembly Plan、Core Decode、Samplerの保存済みwidget/socket契約は変更しません。
Samplerの`video_latents`/`audio_latents`と同じVideo/Audio VAEをHelperへ接続し、Helperの`images`/`audio`をFinalizeへ接続します。Samplerの`assembly_plan`はFinalizeへ直接接続したままです。[公式V3.8X2 Workflow](examples/workflows/MiniMax_H3_Continuum_V38X2.json)は保存済みgraphと設定を維持します。このgraphにはCore VAE Decodeノードがないため、Core直結へ戻すにはCore Video/Audio Decodeを追加してFinalizeへ再配線するか、旧V3.8XのCore直結graphを開いてください。Helperを単に削除しても自動では戻りません。
`Auto`は全physical groupのVideo Decodeをプロセス専用Diskへ、小さなAudio Decodeを上限付きRAMへ保存します。`Off`はnative Decodeを使い、Helper Cacheを破棄します。Cache障害時はnative Decodeへ戻りますが、native DecodeのOOMやQueue中断は再試行しません。Python再起動後にCacheファイルを再利用しません。移行時は同じ`H3DecodeCacheHelper` IDを提供する旧単独addonと内蔵版を同時登録しないでください。内蔵版の導入確認後に旧addonを無効化または撤去します。
736×416(0.306MP)、3×5秒、Euler/simple 6 steps、Turbo FL2V v1.2、ウォーム、Video 3/3 HITの1条件では、Full Run Totalの**機構推定中心値は約47秒/約24.5%短縮**でした。直接A/Bの1ペアは50.887秒/26.46%、Samplingを伴わないComplete/Resumeの2ペアは平均46.309秒/79.826%短縮でした。これは限定条件の観測値で、反復された一般平均や無条件の20%以上高速化保証ではありません。初回MISSは遅くなる場合があり、新規Samplingは高速化せず、latentまたはVAE識別情報が変わればMISSになります。
MiniMax H3を複数チャンクで連続生成し、直前チャンク末尾の**映像latent / 音声latentを直接**次チャンクへ継承するComfyUIカスタムノードです。チャンク間でVideo/Audio VAEのDecode→Encodeは行いません。
@@ -31,7 +74,7 @@ git clone --branch v3.8.0 --single-branch https://github.com/ukr8b3g-cmyk/ComfyU
Continuumのcheckoutは同時に1つだけ有効にしてください。ComfyUI Managerの**Update**は`main`を更新するため、過去tagの選択には使いません。
V3.8X Workflow:[JSON](examples/workflows/MiniMax_H3_Continuum_V38x.json)/[同じJSONを含むZIP](examples/workflows/MiniMax_H3_Continuum_V38x.zip)。Spectrum対応の1本で、保存状態ではSpectrumとTurbo LoRAはどちらもOFFです。[LightX2V Turbo](https://github.com/ModelTC/Minimax-H3-Turbo)にも切り替えられます。完全なgraphを開くにはSpectrum・rgthree・KJNodesが必要です。ComfyUI-Easy-Useは不要です。
V3.8X2 Workflow:[JSON](examples/workflows/MiniMax_H3_Continuum_V38X2.json)/[同じJSONを含むZIP](examples/workflows/MiniMax_H3_Continuum_V38X2.zip)。Spectrum対応の1本で、保存状態ではSpectrumとTurbo LoRAはどちらもOFFです。[LightX2V Turbo](https://github.com/ModelTC/Minimax-H3-Turbo)にも切り替えられます。完全なgraphを開くにはSpectrum・rgthree・KJNodesが必要です。ComfyUI-Easy-Useは不要です。
## プロンプト・スキルのダウンロード
@@ -45,7 +88,7 @@ V3.8X Workflow:[JSON](examples/workflows/MiniMax_H3_Continuum_V38x.json)/[
H3 Continuumは、長尺映像を最初からやり直さずに生成・確認・部分再生成・再開するProduction Samplerです。V3.8は`Main / Production`と`Advanced`の2層に整理しました。
V3.8で検索可能な公開ノードは次の7つです。
このローカル版で検索可能なノードは、元のV3.8の7ノードにReference ImagesとDecode Cache Helperを加えた次の9つです。
- `H3 Continuum Sampler V3.8`
- `H3 Continuum Finalize`
@@ -54,19 +97,25 @@ V3.8で検索可能な公開ノードは次の7つです。
- `H3 Continuum Load Video`
- `H3 Continuum Second Pass`
- `H3 Continuum Reference Audios`
- `H3 Continuum Reference Images`
- `Decode Cache Helper`
Main Sampler内の`Show Advanced Settings`/`Hide Advanced Settings`で詳細設定を開閉します。旧node property `H3 Continuum View`を含む保存Workflowは対応する開閉状態へ移行し、旧propertyを削除します。これは表示状態だけの変更です。Python input、widget順、保存済みwidget値、backend引数、Sampling identity、Run Storage identityは変更しません。Frontend extensionが読み込まれない場合も、Python定義の全widgetが表示された状態で実行できます。
標準経路は`Sampler V3.8 -> Core Video/Audio Decode -> Finalize -> Create Video -> Save Video`です。Finalizeの`IMAGE`/`AUDIO`出力をCoreの`Create Video`で`VIDEO`へまとめてから保存します。Core Decode、Save、Upscalerは外付けとし、外部latent processorやupscalerはSecond Passをbridgeとして接続します。外部processorが変更できるのはVideo LATENTの空間解像度だけで、physical group、B/C/T、finite値、First Pass Audio、元のAssembly Planを維持する必要があります。Finalizeは公開`IMAGE`/`AUDIO`型を受け取り、特定decoder classへ依存しません。SageAttention、Sol-Attn、Spectrumは外部MODEL wrapperのままです。詳細は[V3.8 Open Integration Contract](docs/V38_OPEN_INTEGRATION_CONTRACT.md)を参照してください。旧Hi-Res FixはV3.8標準Workflowに含めません。
V3.8X2公式Workflowの標準経路は`Sampler V3.8 -> Decode Cache Helper -> Finalize -> Create Video -> Save Video`です。HelperはMISSしたentryをCore Video/Audio Decodeへ委譲します。Core Decodeへ直接つなぐ手動構成も使用できますが、Decode結果のcacheはありません。Finalizeの`IMAGE`/`AUDIO`出力をCoreの`Create Video`で`VIDEO`へまとめてから保存します。Save、Upscalerは外付けとし、外部latent processorやupscalerはSecond Passをbridgeとして接続します。外部processorが変更できるのはVideo LATENTの空間解像度だけで、physical group、B/C/T、finite値、First Pass Audio、元のAssembly Planを維持する必要があります。Finalizeは公開`IMAGE`/`AUDIO`型を受け取り、特定decoder classへ依存しません。SageAttention、Sol-Attn、Spectrumは外部MODEL wrapperのままです。詳細は[V3.8 Open Integration Contract](docs/V38_OPEN_INTEGRATION_CONTRACT.md)を参照してください。旧Hi-Res FixはV3.8X2標準Workflowに含めません。
### Reference Audio 1/2/3
`H3 Continuum Reference Audios`は、最大3本の単独Reference Audioを1本の`Audio References (Optional)` socketへまとめます。入力は間を空けずに接続し、Promptでは接続順どおりに`<Audio 1>`、`<Audio 2>`、`<Audio 3>`を使用します。共通のCore Audio VAEで各Audioを個別encodeします。生成後の最終Audioを置換せず、Driving Audio契約も変更しません。既存Workflowは従来の単数`Reference Audio (Optional)`をそのまま使用できますが、単数経路とbundle経路は同時接続しないでください。
> **V3.8の対応範囲:** V3.8からexportするのは上記7ノードだけです。Finalizeの`H3ContinuumAssembleSeamV35`、Second Passの`H3ContinuumSecondPassV35`など、公開ノードの一部は旧IDを維持していますが、すべての旧Workflowに互換性があるという意味ではありません。現在の7ノード以外のIDを含む保存Workflowはunknown nodeになる場合があります。その場合は対応するhistorical Release/tagを使用してください。詳細は[V3.8 Release/Migration Policy](docs/V38_RELEASE_AND_MIGRATION.md)を参照してください。
> **対応範囲:** 元のV3.8は7ノード、このローカル版はReference ImagesとDecode Cache Helperを加えた9ノードです。Finalizeの`H3ContinuumAssembleSeamV35`、Second Passの`H3ContinuumSecondPassV35`などは旧IDを維持しますが、すべての旧Workflowに互換性があるという意味ではありません。未対応のnode IDには対応するhistorical Release/tagを使用してください。詳細は[V3.8 Release/Migration Policy](docs/V38_RELEASE_AND_MIGRATION.md)を参照してください。
複雑な16GB GPU受入Gateでは約`15.5~15.6 GiB`を使用しました。GPU、driver、backend、model精度、解像度、接続ノードで変動するため、すべての16GB GPUでの動作保証ではありません。
Reference Imageは最大9枚です。Samplerの直入力1~3を維持し、追加4~9は`H3 Continuum Reference Images`のoptional IMAGE入力へ接続して、出力をSamplerの`Reference Images (Optional)`へ渡します。補助ノードは画像を束ねるだけで、Resize・hash・VAE Encodeは既存Sampler経路で実行します。未接続を除き1→9の順に使い、Picture番号はFirst/Last Imageの後に連番で割り当てます。空のbundleは参照なしとなり、旧0~3枚の生成・再利用契約は変わりません。
以前の4・5直入力を含む保存Workflowは、グラフ読み込み後に元の画像接続をbundleへ移します。新接続を検証した後だけ旧接続口を削除し、接続元が不明・移行先が使用中の場合は警告して元の線を残します。旧API入力も維持しますが、同じ番号の画像を旧直入力とbundleの両方から指定すると入力競合として明示します。既存の3枚loaderテンプレートは上書きせず、そのまま利用できます。
### サイズの決め方を直接選択
| Preset | 目安 |
@@ -243,7 +292,7 @@ Prompt/CLIPの数値はconditioning区間だけで、総生成時間ではあり
RTX 5060 Ti 16 GB/RAM 64 GBの検証環境で測定したSage-only Production baselineは、576×576 T2VA 1×5秒が168.069秒、640×640 FL2VA Long Terminal Merge 3×5秒が379.765秒です。環境・設定固有の測定値であり、すべての環境に対する速度保証ではありません。Samplingが最大コストで、Continuum Assemble + Seamは1%未満でした。
**V3.8.0はhistorical release baselineです。現在のpackageはV3.8X/3.8.2で、固定済みV3.8.1は対応するtagから引き続き利用できます。** V3.8Xが内部利用する旧module/classはsourceへ維持します。exportするのは現在の公開7ノードだけで、その一部は旧IDを維持しています。それ以外のIDを必要とする旧保存Workflowは、対応するhistorical Release/tagを使用してください。Still Image Guideは引き続きExperimentalです。
**V3.8.0はhistorical release baselineです。現在の公開対象はV3.8X2/package 3.8.3です。** V3.8X2が内部利用する旧module/classはsourceへ維持します。exportするのは現在の公開9ノードだけで、その一部は旧IDを維持しています。それ以外のIDを必要とする旧保存Workflowは、対応するhistorical Release/tagを使用してください。Still Image Guideは引き続きExperimentalです。
## V3.5.1 Reference Audio/互換性更新
@@ -364,8 +413,9 @@ Hi-Res Fixを接続しなければV3.4 Sampling経路は変わりません。強
## 公開テンプレートワークフロー
- [V3.8X Workflow JSON](examples/workflows/MiniMax_H3_Continuum_V38x.json) — Spectrum OFF初期設定の現行graph 1本
- [V3.8X Workflow ZIP](examples/workflows/MiniMax_H3_Continuum_V38x.zip) — 同じJSONのみを格納。カスタムノードのインストーラーではありません
- [V3.8X2 Workflow JSON](examples/workflows/MiniMax_H3_Continuum_V38X2.json) — 現行公式graph。Spectrumは初期状態でOFF
- [V3.8X2 Workflow ZIP](examples/workflows/MiniMax_H3_Continuum_V38X2.zip) — 対応する同名JSONだけを格納。カスタムノードのインストーラーではありません
- [V3.8X2 Helper明示名JSON](examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json)/[ZIP](examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip) — 同じgraphを説明的な配布名で収録
Registry配布予定の対象もこのJSONとZIPです。依存なしのテンプレートではなく、Spectrum・rgthree・KJNodesが必要です。ComfyUI-Easy-Useは不要です。Turboへ切り替えてもgraph内の外部ノードは残ります。SpectrumをOFFにし、用途に合うLightX2V Turbo LoRAを1本だけONにしてsampler/Stepsを合わせます。保存状態はSpectrum OFF、Turbo LoRA OFF、res_multistep/simple/20 Stepsです。
@@ -375,7 +425,7 @@ Registry配布予定の対象もこのJSONとZIPです。依存なしのテン
## V3.4互換
V3.4の実装moduleは内部継承とhistorical testのためsourceへ保持しています。V3.8からexportするのは現在の公開7ノードに含まれるIDだけです。それ以外のIDを必要とするV3.4保存Workflowは、対応するhistorical packageを使用してください。
V3.4の実装moduleは内部継承とhistorical testのためsourceへ保持しています。V3.8X2からexportするのは現在の公開9ノードに含まれるIDだけです。それ以外のIDを必要とするV3.4保存Workflowは、対応するhistorical packageを使用してください。
## V3.4.0 Stable
@@ -491,15 +541,23 @@ V3.8はComfyUI 0.34.2で検証しています。以下の歴史的な受入記
ZIPを展開して、`ComfyUI-H3-Continuum`フォルダーを`ComfyUI/custom_nodes/`へ置き、ComfyUIを再起動します。
再起動後は`H3 Continuum Sampler V3.8`を検索してください。V3.8の検索面は上記7ノードだけです。
再起動後は`H3 Continuum Sampler V3.8`を検索してください。V3.8X2の検索面は上記9ノードです。
旧`ComfyUI-H3-Continuum-Join`が残っている場合は同時ロードを避けるため削除または退避してください。同梱`install_windows.bat`は旧名・新名の既存フォルダーを日時付きでバックアップします。
## 検査
現在のV3.8 Public Surface suiteは、正確な7 ID export、Spectrum graph 1本とZIP内JSONの同一性、外部依存、Registry除外、既存V3.8 widget/socket順、`Show Advanced Settings`/`Hide Advanced Settings`による表示切替を確認します。Registry配布対象のハッシュは`REGISTRY_MANIFEST.sha256`、source側の整合性は`MANIFEST.sha256`で管理します。
現在のV3.8X2 Public Surface suiteは、正確な9 ID export、公式Workflow 2名称と各ZIP内JSONの同一性、外部依存、Registry除外、既存V3.8 widget/socket順、`Show Advanced Settings`/`Hide Advanced Settings`による表示切替を確認します。Registry配布対象のハッシュは`REGISTRY_MANIFEST.sha256`、source側の整合性は`MANIFEST.sha256`で管理します。
**最新のローカルRC証拠:** Full CPU suiteは**1,261 passed / 1 skipped / 0 failed**です。最終GPU Functional Gateでは`3 × 5秒`のReview Each Chunkを実行し、Q1~Q3はphysical groupを1つずつ生成、Q4は`3 reused / 0 generated`で3 groupすべてを再利用しました。Q3とQ4の復号後RGBおよびPCM SHA-256は一致しています。これは実行、prefix再利用、AV再構築の確認であり、画像・音声の総合的な主観品質評価ではありません。
**最新のV3.8X2準備証拠:** Full CPU suiteは**1,367 passed / 1 skipped / 0 failed**です。従来の最終GPU Functional Gateでは`3 × 5秒`のReview Each Chunkを実行し、Q1~Q3はphysical groupを1つずつ生成、Q4は`3 reused / 0 generated`で3 groupすべてを再利用しました。Q3とQ4の復号後RGBおよびPCM SHA-256は一致しています。9枚Reference Imageの別Gateは下記に記録しています。これは実行、prefix再利用、AV再構築、テストした9枚経路の確認であり、画像・音声の総合的な主観品質評価ではありません。
### 9枚Reference Image入力Gate(0.3 MP参照画像)
テストしたNVIDIA GeForce RTX 5060 Ti 16 GB/RAM 64 GB環境では、Reference Image 1~9、`512 × 608`出力、`3 × 5秒` Full Run、Spectrum Off、LoRA Off、Sage Attention、Balanced 22-frame continuity、各約`0.30 MP`のテスト参照画像で完走しました。Sampling中のVRAM使用量は、利用可能な`16,311 MiB`のうち約`15.0~15.5 GiB`であり、16 GB GPUでは余裕の小さい高負荷構成です。
9枚bundleは、追加の外観・ポーズ情報が必要で、十分なVRAM余裕を確保できる環境で使用してください。このsingle-seed Gateは実行と基本的な視覚的連続性を確認したものです。9枚が3枚より常に高画質であること、高解像度参照・大きな出力・別model・同時GPU負荷でも動作することを保証するものではありません。
16 GB GPUで9枚を使う場合は、読み込む前に元画像のコピーを約0.30 MPへ縮小してください。内部のconditioning用Resizeは継続しますが、9枚の大きな元画像によるメモリ負荷を管理する代わりにはなりません。
検証結果はテストしたローカルsourceと環境に限られます。導入済み環境が最新版であること、すべてのmodel/wrapperが任意のGPUに収まること、別のpromptでも同じ画質になることを保証するものではありません。
+32 -23
View File
@@ -1,16 +1,24 @@
dca65fb1393e67f59c6f81f9411e3e745eb8f1097e9a2adf7ffc6f4e3901ca9f __init__.py
dfd195c1f59078f8438bceb7472673abc28c89b183ee4045a9fad27280a9663c .comfyignore
04900f7a7a89fc3c4f75dc4020c1e16ea353da2b24a959ae628e3f49ddae4ef3 .comfyignore
3e7a1ec3380be2a222c8a3e9b8a6bb184d3a760478957f48186438f15235bdba branch_provenance.py
34284acd7da6beacc26050072b6adec866ce934d1912c0ecd9410969404d8ce0 CHANGELOG.md
0daa15310d98160261e3ff1fe689cc7a6db9e453891cd73e2a392da643ab576a CHANGELOG.md
c1ed3a0342730450958fb62fd21854a876991f3a4aefb24e5383b0c73cd2312d compatibility.py
4d62508f900af9f93ec320afb900c27cc9a300d1e0c0a94714258498c5ede5fc conditioning.py
64967f4987e3ad9316f3a47f0dcf582eeff39ee0c3485f4184d3532d495534ae constants.py
294251c40b1be2e296c5e5f627b68091d087bdb39179e3a0c3cebd2ee8a344f5 constants.py
cf255b8a635471229aebadc926acfdcacb65963adbcb9e0f9505d04eada2c6b5 continuation.py
51f1d211dfc36602a006fe5d14f4ebb08182694ad464aa9176340ff7e2bd1e41 decode_cache/__init__.py
647f55a9253976c059502dec13c7f64d7f7df1ecbe619d543c973f92f7f36776 decode_cache/identity.py
5e599feee3199ee5dbe00e9dfb05c159cb6fe4c0c1ab19677971ce6b1cf4e34c decode_cache/nodes.py
986cc7a3dc153ff1b41c427a86756e505ea6e17d8b065df1ab15b8ff904f090e decode_cache/service.py
8b79ad007488a085284c401f8c1bb99ca6ee58cf736ec9c029548220e2d8adb9 decode_cache/store.py
b30fe4640359bebfcdeeb94dbeec94cb346c8e3646509e1dcdb87d7021ba04ff docs/N2B_BRANCH_PROVENANCE_CONTRACT_V1.md
717577efdec5e61600504b77bc2a099ef022c4fe2333e936c3310c7182d8f2a0 docs/V38_OPEN_INTEGRATION_CONTRACT.md
b08159178c999c4c97df6aed67c6cf48b5032548a1d370dc4a0cf7e293ab8031 docs/V38_RELEASE_AND_MIGRATION.md
cedd7b07901d6065079ef37380f0062d535a39c98c8f614e1b26582f549d7183 driving_audio.py
26bbca92b5f7cac4cbde89290b3f801b7a895df76a07493ca6f65c18d5b1154a examples/workflows/MiniMax_H3_Continuum_V38x.json
6c445d62979632bc1a801b1c28dbd639c23b51cc156ebae18837baaa757e592b examples/workflows/MiniMax_H3_Continuum_V38X2.json
29e8ea19cf7c7e8a8a5e98577905d8fd01fc800bb8edb4f4218a638fe39e69d0 examples/workflows/MiniMax_H3_Continuum_V38X2.zip
6c445d62979632bc1a801b1c28dbd639c23b51cc156ebae18837baaa757e592b examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json
f770bcc7de63851ab32f8d8fea23e5df9f7c44b8e3c0115a555b57ea82a28550 examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip
7861fac4c8fe82372c5459aa574d35ea003bdb4fd846d567bd891c2e38571b3d graph_contract.py
bf0556b076dbaca67c3405a7d86c333ca7fdf3d4381529b0a9edc906519943e9 guide_timeline.py
1473c384082700f422f2cf9141e0d012d87d2b43ac8a8a433edc7172e6ca7bf6 hardening.py
@@ -20,20 +28,20 @@ de0da5590691554cbf7f6318ac539a160e639bc3e20ee0752ae189dc31e979ce INSTALL_JA.txt
6aa3f5780baa7bb0c0672b5f01a2f77e5f209da93f6373468cb274ea2f643d4b layout_adapter.py
c44abbd789091bbead01250dbd5453e60539d2665c69f162335fdbd2936019c2 LICENSE
d3e213005670e94dee33a240349a4d245cf9a3b6602099f11ed30cf5a32e2c21 media.py
04085ae86f40a6118da3972cfe740ddbfc9a8fd4a76b4937ede853f5de835bd7 metadata.ini
1970342c93f0189ade437cbfc278900713f043882933789cb8c54f35cf2ec96b metadata.ini
2d611f7201889851eac6459f8aa2b37baf342b345241979ca6042b61b252dff9 model_patch.py
a4ce23167b83e8d72b86a802dfde4f4045828433c7c13aab799bd64831dc04a4 nodes.py
11ea3942e460d8b4ec729611371b52ec5ad202c894c5e9ec7b151b906559bfd8 nodes.py
2b8c19f9474beabfebe1802cdf4a89780dce3c351c48d65e1ce8bb77d2fb9ba9 PACKAGE_INFO_JA.txt
bc4ba900d5b71b09fa0ce9a0a203c6ddd8f8de6b270026a4eef04d7790c5acf5 PACKAGE_VALIDATION.txt
4852ad216f85c22f008abe18464eab2c913bd88baa7db35764df2de9cf401d6d PACKAGE_VALIDATION.txt
b470819f16fc179654dc1600721a63f0a5a14e777f4c004d574b499da6886ba5 public_api.py
56c2aecfe43feab4fbb95d47387f8925236124429fe580075d47dd9960266503 pyproject.toml
3200813f2a2a8b0c6fd13048369fcdae8c6690559c5c1416e5e2b7fc7062a214 README_JA.md
50b20efcfe6fd9cea92494c2e50cc904a0f7d8c9b3618f4ae5ab5ab876d0a3c1 README.md
15a3925218e0c5f968795d7d11e4783c3c6868917447274bc700328851b3fbfb pyproject.toml
8f06f56597185fcb24331b038b20e921c02557da42f5ef5ba79fb7e768766974 README_JA.md
4e44ff1e28f2f408c41631eb76922bfbe31147bb6d36846a1b73e05279f5dda3 README.md
44127adcfa30ee84bff9cd4b2d0c695355209550e76982d374122008728aa5bc reference_audio.py
5cb9bfd6810d3a93a637451980a4cc5c1436e5b84cfd1c7a111cd192e876351b reference_video.py
131bdfbb7a7173c9e7826859c0e648bfb69bd18bf20fa5528c0e18a63f888b26 reference.py
c7b14ed6f8cfc2a1f0a21db4fe56fba75a93ffcb0be0c22bbd2e691c45cd0e2d reference.py
467edb2c188d024c2392aafe7423b3f835e16b10f570da76e2f7dda8a962c1c5 requirements.txt
92e22d0e5413ce7755f380b914a6cf7f2b0a10eba65a2fb928aac3f950d60fb9 run_storage.py
8bfa113a2ec11325619be300b4d2b53a157b1d2c1ef7855057a4b3bbd05aeef3 run_storage.py
6056de6c0a5322a8a51ba5a114538dca2ef67788cd1afba10fedd483b95f6afa state_io.py
3a359a0467725cc292ccb4c86cf0c3d30bb6a114d01f5345792b09ea3d45441d state.py
43ec4023dc06c941e5d7a04db4b8a89fb58d744ceb986f6eb9bf534d4fdcb87b temporal.py
@@ -41,13 +49,13 @@ b470819f16fc179654dc1600721a63f0a5a14e777f4c004d574b499da6886ba5 public_api.py
f218e1a93c42467c6057c5c1d04d57cc82f6331b97ec9257e4e2dfb9c831876a timeline_video.py
0bc369ee428b8a5bc8e370a81fbab427262a1fdb7805a78c442c91698d65efba tools/__init__.py
e5a84569953ee63b9625f4f2e3195ec368204fddcfc746564cfbd0e8449bb8e9 tools/p20_file_backed_tensor_poc.py
556bce17d14303d1e8a36a85dc13da24c46eedd86f3eacdb102289574faf0626 tools/verify_runtime.py
087f4f727e9f76bb2b0061e26e0b49065370aa352a1ebebc7f253774b3be22ed tools/verify_runtime.py
ffd61f3f31c9b6430e1169007ee906c8f5000eba63ee44e2976ad4f5f1112671 v2/__init__.py
2003902c87bba09cfa143f5a9e4248f3a78c0fb544449a75fd40ba2cacb35655 v2/context_diagnostics.py
cde27db19b677e318cc4dfb4235be7a11429c19945f4083052a91fe117e74c82 v2/decoder.py
31012ec48a64c7467ad869c79982b7f8502c1785c33f51ee1b5727ce8b4243fb v2/diagnostics.py
2ebff4502381f675d06bba4b127b81bc3201e7579ddcd46fa5051cbdf3facd55 v2/h3_builder.py
aea01a48a8c03a25ed97ea05e5b137f89e388832d1be7d38f2da2be3d1b9830b v2/motion.py
fed4bc3cbff47bd0b16b6e99385680dc2253c745f30b7f686afafbb25f77efb1 v2/motion.py
aefa29b9d51a05f9a972d75404fd786300202251887e67f55530e97ccd9519f5 v2/nodes.py
dc2b901789e4b024dbcbc4024c63eb8cbc564d77003ce8c35c0584851ba6dfbd v2/prompts.py
4080f1875b958b316e8e76852c4be5527a6de5c71d604e7642d3098478eb4a36 v2/sampling.py
@@ -62,25 +70,26 @@ ea2922567df90436dd6fa21696833a49dd0cbfeee142a5fedc3a7c303824d473 v3/adaptive_co
b3dc61503d35d9ef0a0dc7fed1c9b2fdc00fcb2072d4e39f64ae0826f9ec7dca v3/assembly_v35.py
7815230e0a9540bc2edeaf818e940b7a1fdd817fd217ba8a4f9cb21aaf6a308e v3/assembly.py
3f62fdb35e804f42d7cbf0828b4e87e69a2b99246c3f7467fe4fa698f1d803c9 v3/conditioning_bridge_nodes.py
bb4567770db74d4d8a286e3eb2da2230987d5a3bf35747c0815960d18049bc06 v3/driving_nodes.py
b230500f37783ab2cba124f3be20ef93a70da37c45db37ea4ab45589c910d1a5 v3/node_facade.py
aa044669259df440a384b5e839f75fa9665790da0c210a427375fdd5c76af779 v3/driving_nodes.py
2f395da6a41981713f99ba40b73d14f2274b8ca34a73cf2b275a444993765b99 v3/easy_audio_nodes.py
64b3e54b42e5156642f9957ccc374fd190d9fc7145637984e702534fb1bf80b4 v3/easy_image_nodes.py
ac859cb1a6e23b8ceae300d818c24fe1346b649a0d663017a9b3ac64aa96fca3 v3/easy_nodes.py
bf6bae0c9e14883728860470af86e14395dba40a7377cd874d4dc4548ae53c65 v3/easy_video_nodes.py
fe03ae0aa0dbbbe5f950bb7da34c18a078d841547992c374ea8beda5e3ad4715 v3/execution_planner.py
6cc7ed74666084c55beb9075304e92a9defafd81b9c6678239ca3859a08cddd7 v3/file_backed_buffer.py
cb53e1b104415032ec79b7e7aa1c99848e63da3eedaa251eeba102970e4172b5 v3/hires_fix_nodes.py
0858487e2b8c0060a856273ffc65d23165b2f253d183f506e27e419aea0da561 v3/latent_resize_nodes.py
5b8a54e67a608e757a505abc712effb33312636e3bb235835a485a506e80eeee v3/masked_continuation.py
91a868d2e392b018b01d0396209849c146b0d560ceb109fcdd87dea7f3d786aa v3/memory_action_policy.py
85477badd85281cfb77582fdd5b34228a9f6b68376f1b7743af2ca7d4b55aa36 v3/memory_attribution.py
fe03ae0aa0dbbbe5f950bb7da34c18a078d841547992c374ea8beda5e3ad4715 v3/execution_planner.py
473dc26ba53010c53e6273ebe04a071ccc6758201a06df46cd2ef4bee4263246 v3/nodes.py
2a03bfd7dae9856c0f4be77130f318b95f8c2f2130a0c9122479bcdef70bb7ec v3/node_facade.py
185e15373609d810f1ac57b46a823d44c6e098386f18c65b39dfa06afe9ea893 v3/nodes.py
a3411c7a295308d21623551cf4aeca5bef511eb5f063f31ac84032e3bdf4e16d v3/packed_row_planner.py
b7c4a35a5e73f528492bc6946b97b687c412f1d3f5f976c19d45c6dc20288c9a v3/pixel_vae_resize.py
b139843ccfc826937c80f118920bbee2609c37d45ef88291f80f491744fd5e76 v3/plan.py
0e3dd69d6d2bec6d9491c2fb806c25f0c62629b1eb5f9e4f77ae8d27a5b19cfc v3/planning_types.py
ec71e3965f445756d54d005c0e27bea520e26dbac44e1ee3d3867bfe2da100b0 v3/ref_encode_cache.py
057921bf2b05e88c2cbc08c16e2ac483aea905b8a144fbadf4a21d6ae8252427 v3/reference_video.py
9076c47aa5145c81f34793d6c90410656065248f37d9990a92a6a4061b358811 v3/refine_context.py
519586b1b3f48c73d329f7a2aaa8a1bfc6fe31ac2ecb64f2b1fdf9c19026001a v3/refine_sampling.py
43f33f989eb70ca87b916fc33267732a2be3dd4581fc72af17c53f840b53ca49 v3/refine_schedule.py
@@ -93,18 +102,18 @@ ae909b43ad17934c85881d3b0bea81e7b45c215eeb4d1f9f6a9ea72faf633ddf v3/reliability
be6610fb9427546d9485a17015cfbdc8786715e6a0967f3e4c1dee35d8768385 v3/runtime_coordinator.py
d0a004aa3030c8adaa5ea788f9acc758fcb4a556f203f9a3f63fa4e4b5772063 v3/sampling_engine.py
452022107cea233aa84d5366ec4943ac5aadbd5fcf786113f1d542a641eac8f7 v3/second_pass_nodes.py
057921bf2b05e88c2cbc08c16e2ac483aea905b8a144fbadf4a21d6ae8252427 v3/reference_video.py
66501234756c2b558ce84f887bd540e7f843ed574c8a8b2522950bd1985d7acc v3/second_pass.py
6e71e944313339f14e14e11cec682593159ca5542aa5d38095371da781d60224 v3/targeted_refine_sampling.py
5a044bdd70c546e4446e0c26af92aae88049ffa2e0e2d01b52033a83a3152d0e v3/targeted_second_pass.py
4178dcfa442abdb06ce276e05bd7bcbaa6da28469ba5e57d3da3c663de4e4a9d v3/video_seam_v35.py
2f07ace1462644f0bee553827b3571535de4d0c2d9ef847bd9e0ca73a4eed5cb v3/video_seam.py
b2eae7de1c9658f508dfec737478e42a6604cbfe2e6381644651340112c8a2a9 version.py
453c98485ec55cca959aa5863ac35ae3b86c4781ae95c9e52ac9f1d9115c9eed version.py
c32b57a979071974662c36f27967b65b01fa2cae552a094df4731de9d3522751 web/decode_cache_helper.js
c2883272b05a9a9146b5c6cf614ddae8a3e6893cd910902023aae61360195289 web/easy_bypass_toggle.js
092088096307d33ac016b82b4774ca38845a2ff2f63b97ac6da8c5aca4fea413 web/easy_load_audio.js
9db0aa94f634578a962d5db49e5c70356040a59df968e3a2e531b327a623081f web/easy_load_image.js
873efcbd15c2d9fa10c9d5fc51a796ad3a18c0c6acceecf499c4b956aa845c6c web/easy_load_video.js
0c68d13a1f8beb7431a32b471f8b0612c42fcc4bf72dd97611a025d158008662 web/easy_v38.js
1db955b555367ec8cad26e35b8ad9a23b808db6ea86ba746d41a3af3b9e336e9 web/project_id.js
0cf8d49bcb71b30437dc893f6218dc4cfb1cd244b647e4fbc2861dea2271a33a web/reference_audio_ui.js
df4e0e355020d2e731932cff86a4b00932b4f193ec7ed513be0db994ec0e71bb examples/workflows/MiniMax_H3_Continuum_V38x.zip
ec591d1b8f7587594397b995b9584809435f10fa3de6bf8f8df204c34809aa43 web/project_id.js
ecdcd27528f6f1e80f758c608cbc42f747163ea4c39abd77576b91c627423d12 web/reference_audio_ui.js
46c9f75c9462bf26300332448f4431cca801f38964ca0a49bc2c50a88a7cc40f web/reference_image_ui.js
+28
View File
@@ -58,6 +58,34 @@ DEFAULT_STATE_CAPACITY_FRAMES = 39
V2_CONTINUITY_AUTO = "Auto — conservative"
V2_CONTINUITY_OPTIONS = (V2_CONTINUITY_AUTO,) + CONTINUITY_OPTIONS
# Older saved workflows and frontend help text used ASCII hyphens in these
# labels. Keep the public labels canonical while accepting those persisted
# aliases when a saved Run Storage session is resumed.
_CONTINUITY_ALIASES = {
"Auto - conservative": V2_CONTINUITY_AUTO,
"Balanced - 22 frames": CONTINUITY_OPTIONS[0],
"Fast - 5 frames": CONTINUITY_OPTIONS[1],
"Strong - 39 frames (Experimental)": CONTINUITY_OPTIONS[2],
}
def normalize_continuity_mode(value: str) -> str:
"""Return the canonical continuity label for current and legacy saves."""
raw = str(value).strip()
return _CONTINUITY_ALIASES.get(raw, raw)
def continuity_storage_mode(value: str) -> str:
"""Return the stable ASCII label used in persisted contracts.
Persisted V3.8 runs used ASCII hyphens. Keeping that storage spelling
makes old manifests compatible while the runtime continues to accept and
expose the public em-dash labels.
"""
return normalize_continuity_mode(value).replace("—", "-")
PROMPT_MODE_FIXED = "Fixed — one prompt"
PROMPT_MODE_LIST = "List — split with ---"
PROMPT_MODE_TIMELINE = "Timeline — [0-5s] sections"
+2
View File
@@ -0,0 +1,2 @@
"""H3 Decode Cache Helper implementation; imports do not load ComfyUI models."""
__version__ = "3.8.3"
+212
View File
@@ -0,0 +1,212 @@
"""Content keys for already-selected decode entries; no model or storage mutation."""
from __future__ import annotations
import hashlib
import itertools
import json
import math
import threading
import weakref
from collections.abc import Mapping
from typing import Any, Iterator
import torch
CONTRACT = "h3-decode-helper-v1"
BLOCK_BYTES = 8 * 1024 * 1024
class CacheBypass(Exception):
"""The native decoder may run, but cache identity is not safely available."""
class ObjectTokens:
"""Monotonic process-local identities, without retaining model objects."""
def __init__(self):
self._refs = {}
self._next = itertools.count(1)
self._lock = threading.RLock()
def token(self, obj):
address = id(obj)
with self._lock:
record = self._refs.get(address)
if record is not None and record[0]() is obj:
return record[1]
token = next(self._next)
def expired(ref, address=address):
with self._lock:
current = self._refs.get(address)
if current is not None and current[0] is ref:
self._refs.pop(address, None)
try:
ref = weakref.ref(obj, expired)
except TypeError as exc:
raise CacheBypass("object does not support a weak identity") from exc
self._refs[address] = (ref, token)
return token
TOKENS = ObjectTokens()
def tensor_blocks(tensor: torch.Tensor, block_bytes=BLOCK_BYTES) -> Iterator[memoryview]:
"""Yield C-order bytes, including BF16, with bounded contiguous scratch space."""
if not isinstance(tensor, torch.Tensor) or tensor.layout != torch.strided:
raise CacheBypass("only dense strided tensors are cacheable")
if tensor.device.type != "cpu" or tensor.is_nested or tensor.is_quantized:
raise CacheBypass("non-CPU/nested/quantized payload is delegated without cache")
tensor = tensor.detach()
if tensor.is_conj():
tensor = tensor.resolve_conj()
if tensor.is_neg():
tensor = tensor.resolve_neg()
size = tensor.numel() * tensor.element_size()
if size == 0:
return
if size <= block_bytes:
raw = tensor.contiguous().reshape(-1).view(torch.uint8).numpy()
yield memoryview(raw).cast("B")
return
# All earlier dimensions are singleton, preserving logical C-order.
for axis, length in enumerate(tensor.shape):
if length > 1:
per_slice = size // length
step = max(1, block_bytes // max(1, per_slice))
for start in range(0, length, step):
yield from tensor_blocks(tensor.narrow(axis, start, min(step, length-start)), block_bytes)
return
raise CacheBypass("unrepresentable tensor block")
def tensor_digest(tensor, interrupt=None):
h = hashlib.sha256()
for block in tensor_blocks(tensor):
if interrupt is not None:
interrupt()
h.update(block)
return h.hexdigest()
def canonical(value: Any, interrupt=None, depth=0):
"""Reject opaque objects instead of using an unreliable repr or pointer key."""
if depth > 16:
raise CacheBypass("metadata nesting limit")
if value is None or type(value) in (str, bool, int):
return value
if type(value) is float:
if not math.isfinite(value):
raise CacheBypass("non-finite metadata")
return value
if isinstance(value, (torch.dtype, torch.device)):
return str(value)
if isinstance(value, torch.Tensor):
return ["tensor", str(value.dtype), list(value.shape), tensor_digest(value, interrupt)]
if isinstance(value, Mapping):
if len(value) > 256 or any(not isinstance(k, str) for k in value):
raise CacheBypass("unsupported metadata mapping")
return {k: canonical(value[k], interrupt, depth+1) for k in sorted(value)}
if isinstance(value, (tuple, list)) and len(value) <= 4096:
return [canonical(x, interrupt, depth+1) for x in value]
raise CacheBypass(f"opaque metadata: {type(value).__name__}")
def selected_latent(samples, stream):
latent = samples["samples"]
if getattr(latent, "is_nested", False):
parts = latent.unbind()
latent = parts[0 if stream == "video" else -1]
if not isinstance(latent, torch.Tensor):
raise CacheBypass("unknown latent payload")
return latent
def _callable_token(function):
function = getattr(function, "__func__", function)
return TOKENS.token(function)
def _empty_option_tree(value):
if value is None:
return True
if isinstance(value, Mapping):
return all(_empty_option_tree(v) for v in value.values())
if isinstance(value, (tuple, list)):
return all(_empty_option_tree(v) for v in value)
return False
def vae_signature(vae, stream, delegate):
"""Supported native H3 inference VAE only; unknown wrappers still decode normally.
This is not a model-file hash. Unsupported in-place .data changes require
reset_token or a reloaded VAE. No weights are copied or read onto the CPU.
"""
model = getattr(vae, "first_stage_model", None)
patcher = getattr(vae, "patcher", None)
if type(vae).__module__ != "comfy.sd" or not type(model).__module__.startswith("comfy.ldm.minimax."):
raise CacheBypass("unrecognized VAE identity; native decode only")
if patcher is None or not hasattr(patcher, "patches_uuid"):
raise CacheBypass("VAE patch version unavailable")
if bool(getattr(model, "training", True)):
raise CacheBypass("training-mode VAE")
if "decode" in vars(vae) or "decode" in vars(model):
raise CacheBypass("instance-patched decoder")
if getattr(patcher, "object_patches", None):
raise CacheBypass("VAE object patches require cache bypass")
if not _empty_option_tree(getattr(patcher, "model_options", None)):
raise CacheBypass("non-default VAE patcher options")
if any(getattr(patcher, field, None) for field in ("forced_hooks", "hook_patches")):
raise CacheBypass("VAE hook state requires cache bypass")
if any(getattr(part, "_forward_hooks", None) or getattr(part, "_forward_pre_hooks", None)
for part in model.modules()):
raise CacheBypass("VAE forward hooks require cache bypass")
config = {}
for name in ("vae_dtype", "device", "output_device", "audio_sample_rate", "audio_sample_rate_output",
"latent_channels", "disable_offload", "output_channels"):
if hasattr(vae, name):
config[name] = canonical(getattr(vae, name))
# Native H3 tiling/temporal configuration is scalar, not model weights.
model_config = {k: v for k, v in vars(model).items()
if not k.startswith("_") and type(v) in (str, bool, int, float, type(None))}
# Model residency can replace buffer objects without changing their values.
# Logical names/versions + Core patch UUID are used, not buffer pointers.
# Reloading weights through raw .data (outside Core) requires reset_token.
versions = []
for name, value in itertools.chain(model.named_parameters(), model.named_buffers()):
try:
version = value._version
except RuntimeError: # inference tensors intentionally have no counter
version = None
versions.append((name, version, str(value.dtype), tuple(value.shape)))
identity = (
TOKENS.token(vae), TOKENS.token(model), TOKENS.token(patcher),
str(patcher.patches_uuid), _callable_token(vae.decode), _callable_token(model.decode),
_callable_token(delegate),
_callable_token(vae.process_output) if callable(getattr(vae, "process_output", None)) else None,
config, model_config, versions,
str(torch.get_default_dtype()), torch.get_float32_matmul_precision(),
bool(torch.backends.cuda.matmul.allow_tf32), bool(torch.backends.cudnn.allow_tf32),
bool(torch.backends.cudnn.benchmark), bool(torch.backends.cudnn.deterministic),
bool(torch.are_deterministic_algorithms_enabled()),
bool(torch.is_grad_enabled()), bool(torch.is_inference_mode_enabled()),
bool(torch.is_autocast_enabled("cpu")), str(torch.get_autocast_dtype("cpu")),
bool(torch.is_autocast_enabled("cuda")), str(torch.get_autocast_dtype("cuda")),
)
payload = json.dumps(identity, sort_keys=True, separators=(",", ":"), allow_nan=False)
return hashlib.sha256(payload.encode()).hexdigest(), (weakref.ref(vae), weakref.ref(model), weakref.ref(patcher))
def make_key(samples, stream, signature, reset_token=0, interrupt=None):
latent = selected_latent(samples, stream)
# Only the chosen AV stream is hashed. Other decode-relevant metadata,
# notably samples['sample_rate'], is included, conservatively, as well.
metadata = {k: v for k, v in samples.items() if k != "samples"}
payload = [CONTRACT, stream, signature, int(reset_token), str(latent.dtype), list(latent.shape),
tensor_digest(latent, interrupt), canonical(metadata, interrupt)]
return hashlib.sha256(json.dumps(payload, sort_keys=True, separators=(",", ":")).encode()).hexdigest()
+118
View File
@@ -0,0 +1,118 @@
"""One independent helper; existing Continuum node IDs and schemas are untouched."""
from __future__ import annotations
import json
import logging
import threading
from .service import DecodeService, reraise_control
from .store import MiB, GiB
class H3DecodeCacheHelper:
CATEGORY = "MiniMax H3/Continuum/Helpers"
FUNCTION = "decode"
RETURN_TYPES = ("IMAGE", "AUDIO", "STRING")
RETURN_NAMES = ("images", "audio", "report")
INPUT_IS_LIST = True
OUTPUT_IS_LIST = (True, True, False)
DESCRIPTION = (
"Optional V3.8X2 helper: reuse complete physical VAE decode entries. "
"Auto stores video in a private process-local disk cache, audio in bounded RAM. "
"Connect the unchanged Assembly Plan directly to Finalize. No model unload or sampling changes."
)
SEARCH_ALIASES = ["Decode Cache Helper", "H3 cached decode", "video audio cache"]
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"cache_mode": (["Auto", "RAM", "Off"], {"default": "Auto", "tooltip":
"Auto: disk-backed video + small RAM audio. RAM: bounded RAM only. Off: native decoding, clear helper cache."}),
"ram_budget_mb": ("INT", {"default": 256, "min": 0, "max": 8192, "step": 128, "advanced": True,
"tooltip": "Additional private RAM retention limit (MiB), not total process memory. Low headroom disables RAM retention."}),
"disk_budget_gb": ("INT", {"default": 8, "min": 0, "max": 128, "step": 1, "advanced": True,
"tooltip": "Process-local cache quota in GiB. Set 0 for no cache file writes. Auto does not reuse files after restart."}),
"reset_token": ("INT", {"default": 0, "min": 0, "max": 2147483647, "advanced": True,
"tooltip": "Increase to discard this helper's cache, especially after unsupported in-place VAE weight edits."}),
},
"optional": {
"video_samples": ("LATENT", {"tooltip": "Continuum video_latents LIST; each entry is decoded whole, before trim/seam."}),
"video_vae": ("VAE", {"tooltip": "Same native Video VAE as the existing VAE Decode node."}),
"audio_samples": ("LATENT", {"tooltip": "Continuum audio_latents LIST; optional, decoded independently."}),
"audio_vae": ("VAE", {"tooltip": "Same native Audio VAE as VAE Decode Audio. Required only with audio_samples."}),
},
}
@classmethod
def IS_CHANGED(cls, **kwargs):
# Review must still execute; only this helper's content cache skips decode.
return float("nan")
def __init__(self):
self.service = DecodeService()
self._lock = threading.RLock()
@staticmethod
def _scalar(value, name):
if isinstance(value, list):
if len(value) != 1:
raise ValueError(f"{name} expects one value, not a list batch")
return value[0]
return value
@staticmethod
def _list(value):
return value if isinstance(value, list) else ([] if value is None else [value])
def _stream(self, samples, vaes, stream, reset_token):
entries = self._list(samples)
vaes = self._list(vaes)
if not entries:
return [], []
outputs, events = [], []
for index, entry in enumerate(entries):
if entry is None:
# Same missing-output position; do not duplicate the previous entry.
outputs.append(None)
events.append({"stream": stream, "entry": index, "status": "unconnected"})
continue
vae = vaes[min(index, len(vaes)-1)] if vaes else None
result, event = self.service.decode(entry, vae, stream, reset_token)
outputs.append(result)
events.append({"entry": index, **event})
return outputs, events
def decode(self, cache_mode, ram_budget_mb, disk_budget_gb, reset_token,
video_samples=None, video_vae=None, audio_samples=None, audio_vae=None):
with self._lock:
mode = self._scalar(cache_mode, "cache_mode")
ram = int(self._scalar(ram_budget_mb, "ram_budget_mb"))
disk = int(self._scalar(disk_budget_gb, "disk_budget_gb"))
reset = int(self._scalar(reset_token, "reset_token"))
if mode not in ("Auto", "RAM", "Off") or ram < 0 or disk < 0:
raise ValueError("invalid cache settings")
config_error = None
try:
self.service.store.configure(mode, ram*MiB, disk*GiB, reset)
except Exception as exc:
reraise_control(exc)
self.service.store.mode = "Off"
config_error = str(exc)[:160]
logging.getLogger("h3_decode_cache_helper").warning("Cache unavailable; native decode: %s", exc)
images, video_events = self._stream(video_samples, video_vae, "video", reset)
audio, audio_events = self._stream(audio_samples, audio_vae, "audio", reset)
try:
stats = self.service.store.stats()
except Exception as exc:
reraise_control(exc)
stats = {"diagnostic_error": str(exc)[:160]}
report = {"helper_version": "3.8.3", "mode": mode,
"video": video_events, "audio": audio_events, "cache": stats}
if config_error:
report["cache_disabled_reason"] = config_error
return images, audio, json.dumps(report, ensure_ascii=False, indent=2)
NODE_CLASS_MAPPINGS = {"H3DecodeCacheHelper": H3DecodeCacheHelper}
NODE_DISPLAY_NAME_MAPPINGS = {"H3DecodeCacheHelper": "Decode Cache Helper"}
+115
View File
@@ -0,0 +1,115 @@
"""Native decoder delegation. Cache errors fail open; decoder/cancellation errors do not."""
from __future__ import annotations
import importlib
import json
import logging
import time
from .identity import make_key, vae_signature
from .store import DecodeStore
LOG = logging.getLogger("h3_decode_cache_helper")
def interrupt_check():
try:
mm = importlib.import_module("comfy.model_management")
except ImportError:
return
mm.throw_exception_if_processing_interrupted()
def reraise_control(exc):
# ComfyUI's interruption is an Exception, unlike KeyboardInterrupt.
# Never convert an interrupted Queue into another Core Decode attempt.
if any(cls.__name__ == "InterruptProcessingException" for cls in type(exc).__mro__):
raise exc
def native_delegate(stream):
if stream == "video":
core = importlib.import_module("nodes").VAEDecode
method = core.decode
def execute(vae, samples):
return core().decode(vae=vae, samples=samples)[0]
return method, execute
helper = importlib.import_module("comfy_extras.nodes_audio").vae_decode_audio
return helper, lambda vae, samples: helper(vae, samples)
class DecodeService:
def __init__(self, store=None, delegate_resolver=native_delegate,
signature_fn=vae_signature, interrupt=interrupt_check):
self.store = store or DecodeStore(interrupt=interrupt)
self.delegate_resolver = delegate_resolver
self.signature_fn = signature_fn
self.interrupt = interrupt
def decode(self, samples, vae, stream, reset_token=0):
self.interrupt()
delegate_identity, native = self.delegate_resolver(stream)
event = {"stream": stream, "status": "miss", "hash_s": 0.0,
"read_s": 0.0, "decode_s": 0.0, "write_s": 0.0}
signature = key = guards = None
epoch = self.store.epoch
if self.store.mode != "Off":
start = time.perf_counter()
try:
signature, guards = self.signature_fn(vae, stream, delegate_identity)
key = make_key(samples, stream, signature, reset_token, self.interrupt)
except Exception as exc:
reraise_control(exc)
event["status"] = "bypass"
event["reason"] = str(exc)[:160]
event["hash_s"] = time.perf_counter() - start
else:
event["status"] = "off"
if key is not None:
start = time.perf_counter()
try:
cached = self.store.get(key)
if cached is not None:
tensor, extra = cached
event.update(status="hit", read_s=time.perf_counter()-start)
return (tensor if stream == "video" else {"waveform": tensor, **extra}), event
except Exception as exc:
reraise_control(exc)
event["cache_read_error"] = str(exc)[:160]
LOG.warning("Decode cache read failed; using native decoder: %s", exc)
event["read_s"] = time.perf_counter() - start
# Outside cache exception handlers. No blind retry of OOM, invalid
# inputs, VAE errors, or interrupted Sampling/Decode.
self.interrupt()
start = time.perf_counter()
decoded = native(vae, samples)
event["decode_s"] = time.perf_counter() - start
self.interrupt()
if key is not None:
start = time.perf_counter()
try:
after, _ = self.signature_fn(vae, stream, delegate_identity)
if after != signature:
event["store_skipped"] = "VAE identity changed during native decode"
else:
if stream == "video":
tensor, extra = decoded, {}
else:
tensor = decoded["waveform"]
extra = {k: v for k, v in decoded.items() if k != "waveform"}
# Only JSON-compatible metadata is retained; store defensively copies it.
json.dumps(extra, allow_nan=False)
replacement = self.store.put(key, tensor, stream, extra, guards, epoch)
event["stored"] = self.store.contains(key)
if replacement is not None:
tensor, extra = replacement
decoded = tensor if stream == "video" else {"waveform": tensor, **extra}
except Exception as exc:
reraise_control(exc)
event["cache_write_error"] = str(exc)[:160]
LOG.warning("Decode cache write failed; returning native result: %s", exc)
event["write_s"] = time.perf_counter() - start
return decoded, event
+299
View File
@@ -0,0 +1,299 @@
"""Private, disposable decoded tensors. No Run Storage or global GPU lifecycle access."""
from __future__ import annotations
from copy import deepcopy
import hashlib
import os
from pathlib import Path
import shutil
import tempfile
import threading
import uuid
import weakref
from collections import OrderedDict
from dataclasses import dataclass, field
import numpy as np
import torch
from .identity import CacheBypass, tensor_blocks, tensor_digest
MiB = 1024**2
GiB = 1024**3
def available_ram():
try:
import psutil # already provided by ComfyUI; optional for cache operation
return int(psutil.virtual_memory().available)
except (ImportError, OSError, AttributeError):
return 0 # unknown headroom must not trigger RAM retention
@dataclass
class Entry:
shape: tuple
dtype: str
digest: str
payload_bytes: int
guards: tuple
extra: dict
tensor: torch.Tensor | None = None
path: Path | None = None
file_bytes: int = 0
leases: list = field(default_factory=list)
def live(self):
self.leases[:] = [ref for ref in self.leases if ref() is not None]
return bool(self.leases)
def _cleanup_private_files(state):
"""Best effort at object/process exit; never close arrays still owned downstream."""
for path, entry in list(state["entries"].items()):
if not entry.live():
try:
path.unlink(missing_ok=True)
state["entries"].pop(path, None)
except OSError:
pass
if state["root"] is not None:
try:
state["root"].rmdir()
except OSError:
pass
class DecodeStore:
"""One store per Helper instance. Auto uses disk for video and small RAM for audio.
RAM hits return a clone. Disk hits return a new copy-on-write mmap, never
a writable shared backing file. Already-returned results outlive eviction.
"""
def __init__(self, temp_parent=None, memory_probe=available_ram, disk_probe=shutil.disk_usage,
headroom_bytes=2*GiB, interrupt=None):
self._lock = threading.RLock()
self.entries = OrderedDict()
self.retired = []
self.root = None
self.temp_parent = temp_parent if temp_parent is not None else (os.environ.get("H3_DECODE_CACHE_TEMP_DIR") or None)
self.memory_probe = memory_probe
self.disk_probe = disk_probe
self.headroom_bytes = headroom_bytes
self.interrupt = interrupt or (lambda: None)
self.ram_limit = 512*MiB
self.disk_limit = 16*GiB
self.mode = "Auto"
self.reset_token = 0
self.epoch = 0
self.max_entries = 256
# Finalizer state has only paths, disk-entry metadata and weak leases;
# no decoded RAM tensor, VAE, store, node, or GPU model is retained.
self._cleanup_state = {"root": None, "entries": {}}
weakref.finalize(self, _cleanup_private_files, self._cleanup_state)
def configure(self, mode, ram_limit, disk_limit, reset_token):
with self._lock:
settings = (mode, int(ram_limit), int(disk_limit), int(reset_token))
if settings != (self.mode, self.ram_limit, self.disk_limit, self.reset_token):
self.clear()
self.mode, self.ram_limit, self.disk_limit, self.reset_token = settings
self._reap()
if self.memory_probe() < self.headroom_bytes:
for key, entry in list(self.entries.items()):
if entry.tensor is not None:
self._drop(key)
@property
def ram_bytes(self):
return sum(e.payload_bytes for e in self.entries.values() if e.tensor is not None)
@property
def disk_bytes(self):
return sum(e.file_bytes for e in self.entries.values() if e.path is not None) + sum(e.file_bytes for e in self.retired)
def _delete(self, entry):
if entry.path is None:
return True
if entry.live():
return False
try:
entry.path.unlink(missing_ok=True)
self._cleanup_state["entries"].pop(entry.path, None)
return True
except OSError:
return False
def _drop(self, key):
entry = self.entries.pop(key)
if entry.path is not None and not self._delete(entry):
self.retired.append(entry)
def _reap(self):
self.retired[:] = [e for e in self.retired if not self._delete(e)]
for key, entry in list(self.entries.items()):
if not all(ref() is not None for ref in entry.guards):
self._drop(key)
def clear(self):
with self._lock:
self.epoch += 1
for key in list(self.entries):
self._drop(key)
self._reap()
def close(self):
self.clear()
if self.root is not None:
try:
self.root.rmdir() # only an empty helper-owned directory
except OSError:
pass
def _directory(self):
if self.root is None:
self.root = Path(tempfile.mkdtemp(prefix=f"h3-decode-cache-{os.getpid()}-", dir=self.temp_parent))
self._cleanup_state["root"] = self.root
return self.root
def _ram_room(self, size):
while self.ram_bytes + size > self.ram_limit:
victim = next((k for k, e in self.entries.items() if e.tensor is not None), None)
if victim is None:
return False
self._drop(victim)
# Budget is additional retention only, not a claim about whole-process RSS.
return self.memory_probe() >= self.headroom_bytes + 2*size
def _disk_room(self, size):
self._reap()
while self.disk_bytes + size > self.disk_limit:
victim = next((k for k, e in self.entries.items() if e.path is not None and not e.live()), None)
if victim is None:
return False
self._drop(victim)
root = self._directory()
return self.disk_probe(root).free >= size + 256*MiB
def _read_disk(self, entry):
path = entry.path
if path is None or path.is_symlink() or path.stat().st_size != entry.file_bytes:
raise CacheBypass("disk cache file missing/changed")
# Verify the exact serialized payload before exposing a mapping.
# Header/size are also checked; pickle is never allowed.
array = np.load(path, mmap_mode="c", allow_pickle=False, max_header_size=4096)
if tuple(array.shape) != entry.shape or array.dtype.str != entry.dtype or not array.flags.c_contiguous:
raise CacheBypass("disk cache header mismatch")
if array.nbytes != entry.payload_bytes:
raise CacheBypass("disk cache size mismatch")
raw = memoryview(array).cast("B")
h = hashlib.sha256()
for start in range(0, len(raw), 8*MiB):
self.interrupt()
h.update(raw[start:start+8*MiB])
if h.hexdigest() != entry.digest:
raise CacheBypass("disk cache checksum mismatch")
entry.leases.append(weakref.ref(array))
# mode='c' makes writable, private pages. mode='r' is NOT used.
return torch.from_numpy(array)
def get(self, key):
with self._lock:
self._reap()
entry = self.entries.get(key)
if entry is None:
return None
if not all(ref() is not None for ref in entry.guards):
self._drop(key)
return None
self.entries.move_to_end(key)
if entry.tensor is not None:
if self.memory_probe() < self.headroom_bytes + entry.payload_bytes:
self._drop(key)
return None
if (tuple(entry.tensor.shape) != entry.shape
or entry.tensor.numpy().dtype.str != entry.dtype
or tensor_digest(entry.tensor, self.interrupt) != entry.digest):
self._drop(key)
raise CacheBypass("RAM cache checksum/header mismatch")
# Independent storage protects the cache from in-place seam/color edits.
return entry.tensor.clone(), deepcopy(entry.extra)
try:
tensor = self._read_disk(entry)
except Exception:
self._drop(key)
raise
return tensor, deepcopy(entry.extra)
def put(self, key, tensor, stream, extra, guards, expected_epoch):
with self._lock:
if expected_epoch != self.epoch or self.mode == "Off":
return None
if (not isinstance(tensor, torch.Tensor) or tensor.device.type != "cpu"
or tensor.layout != torch.strided or tensor.is_nested or tensor.numel() == 0):
return None
if tensor.dtype not in (torch.float16, torch.float32, torch.float64):
return None # never silently downcast decoded output
size = tensor.numel() * tensor.element_size()
if not all(ref() is not None for ref in guards):
return None
if key in self.entries:
self._drop(key)
while len(self.entries) >= self.max_entries:
self._drop(next(iter(self.entries)))
use_ram = self.mode == "RAM" or (stream == "audio" and size <= 16*MiB)
if use_ram and self._ram_room(size):
stored = tensor.detach().clone(memory_format=torch.contiguous_format)
self.entries[key] = Entry(tuple(stored.shape), stored.numpy().dtype.str,
tensor_digest(stored, self.interrupt), size, guards, deepcopy(extra), tensor=stored)
return None # original MISS output is independently owned
if self.mode != "Auto" or self.disk_limit == 0 or size+4096 > self.disk_limit:
return None
if not self._disk_room(size+4096):
return None
root = self._directory()
filename = uuid.uuid4().hex
temp = root / (filename + ".tmp")
final = root / (filename + ".npy")
dtype = {torch.float16: np.dtype("float16"), torch.float32: np.dtype("float32"),
torch.float64: np.dtype("float64")}[tensor.dtype]
h = hashlib.sha256()
try:
with open(temp, "xb") as f:
np.lib.format.write_array_header_1_0(f, {
"descr": dtype.str, "fortran_order": False, "shape": tuple(tensor.shape)})
for block in tensor_blocks(tensor):
self.interrupt()
h.update(block)
if f.write(block) != len(block):
raise OSError("short cache write")
f.flush()
os.fsync(f.fileno())
os.replace(temp, final)
entry = Entry(tuple(tensor.shape), dtype.str, h.hexdigest(), size, guards,
deepcopy(extra), path=final, file_bytes=final.stat().st_size)
self.entries[key] = entry
self._cleanup_state["entries"][final] = entry
# Returning a COW mapping releases the large anonymous MISS output
# after this call rather than keeping an extra private RAM copy.
return self.get(key)
except BaseException:
if key in self.entries:
self._drop(key)
for path in (temp, final):
try:
path.unlink(missing_ok=True)
except OSError:
pass
raise
def contains(self, key):
with self._lock:
return key in self.entries
def stats(self):
with self._lock:
self._reap()
return {"entries": len(self.entries), "ram_bytes": self.ram_bytes,
"disk_bytes": self.disk_bytes, "pending_delete_files": len(self.retired)}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
+1 -1
View File
@@ -1,4 +1,4 @@
[project]
name = H3 Continuum
version = 3.8.2
version = 3.8.3
description = Native MiniMax H3 masked AV continuation, Second Pass, and disk-backed assembly.
+7
View File
@@ -448,17 +448,24 @@ from .v3.hires_fix_nodes import (
NODE_CLASS_MAPPINGS.update(V35_HIRES_FIX_NODE_CLASS_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(V35_HIRES_FIX_NODE_DISPLAY_NAME_MAPPINGS)
from .decode_cache.nodes import H3DecodeCacheHelper
NODE_CLASS_MAPPINGS["H3DecodeCacheHelper"] = H3DecodeCacheHelper
NODE_DISPLAY_NAME_MAPPINGS["H3DecodeCacheHelper"] = "Decode Cache Helper"
# V3.8 exports only its audited launch surface. The imports and merged mappings
# above intentionally stay in place because the V3.8 implementation still
# inherits and reuses historical modules internally.
_PUBLIC_NODE_DISPLAY_NAMES = {
"H3ContinuumSamplerV38": "H3 Continuum Sampler V3.8",
"H3ContinuumReferenceAudios": "H3 Continuum Reference Audios",
"H3ContinuumReferenceImages": "H3 Continuum Reference Images",
"H3ContinuumAssembleSeamV35": "H3 Continuum Finalize",
"H3EasyLoadImage": "H3 Continuum Load Image",
"H3EasyLoadAudio": "H3 Continuum Load Audio",
"H3ContinuumLoadVideo": "H3 Continuum Load Video",
"H3ContinuumSecondPassV35": "H3 Continuum Second Pass",
"H3DecodeCacheHelper": "Decode Cache Helper",
}
NODE_CLASS_MAPPINGS = {
node_id: NODE_CLASS_MAPPINGS[node_id]
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "comfyui-h3-continuum"
version = "3.8.2"
version = "3.8.3"
description = "Integrated N-chunk continuation for ComfyUI native MiniMax H3 video and audio"
readme = "README.md"
requires-python = ">=3.10"
+87 -21
View File
@@ -18,7 +18,8 @@ import torch
REFERENCE_CONTRACT_VERSION = 1
REFERENCE_PREPROCESS_VERSION = 1
HYBRID_PRESENTATION_VERSION = 1
HYBRID_PRESENTATION_VERSION = 1
REFERENCE_IMAGES_TYPE = "H3_CONTINUUM_IMAGE_REFERENCES"
REFERENCE_SIZE_MATCH_OUTPUT = "Match Output"
REFERENCE_SIZE_MAX_IDENTITY = "Max Identity"
REFERENCE_SIZE_OPTIONS = (
@@ -30,12 +31,40 @@ _MAX_IDENTITY_SHORT_EDGE = 2048
_PICTURE_TAG = re.compile(r"<Picture\s+(\d+)>")
class ReferenceConditioningError(ValueError):
pass
@dataclass(frozen=True)
class ReferenceAssets:
class ReferenceConditioningError(ValueError):
pass
@dataclass(frozen=True)
class ReferenceImageBundle:
images: tuple[torch.Tensor | None, ...]
def resolve_reference_image_inputs(
reference_image_1=None,
reference_image_2=None,
reference_image_3=None,
reference_image_4=None,
reference_image_5=None,
image_references=None,
) -> tuple[torch.Tensor | None, ...]:
extra = [None] * 6
if image_references is not None:
if not isinstance(image_references, ReferenceImageBundle) or len(image_references.images) != 6:
raise ReferenceConditioningError("expected a Reference Images bundle for slots 4–9")
extra = list(image_references.images)
for index, legacy in enumerate((reference_image_4, reference_image_5)):
if legacy is not None:
if extra[index] is not None:
raise ReferenceConditioningError(
f"Reference Image {index + 4} is connected through both the legacy input and the bundle"
)
extra[index] = legacy
return (reference_image_1, reference_image_2, reference_image_3, *extra)
@dataclass(frozen=True)
class ReferenceAssets:
images: tuple[torch.Tensor, ...]
latents: tuple[torch.Tensor | None, ...]
image_hashes: tuple[str, ...]
@@ -55,16 +84,14 @@ class ReferenceAssets:
"image_hashes": list(self.image_hashes),
"combined_hash": self.combined_hash,
}
# Preserve the V3.2.2 JSON contract byte-for-byte for zero, one, and
# two references. The V3.2.3 extension exists only when Image 3 is
# connected, so removing it can resolve back to an older Revision.
if self.count == 3:
image = self.images[2]
result["reference_image_3"] = {
"reference_position": 3,
# Keep the existing zero-to-three-reference contracts unchanged.
for index in range(2, self.count):
image = self.images[index]
result[f"reference_image_{index + 1}"] = {
"reference_position": index + 1,
"shape": [int(value) for value in image.shape],
"dtype": str(image.dtype),
"sha256": self.image_hashes[2],
"sha256": self.image_hashes[index],
"preprocess_version": REFERENCE_PREPROCESS_VERSION,
}
return result
@@ -174,14 +201,20 @@ def prepare_reference_assets(
output_width: int,
output_height: int,
size_mode: str,
reference_image_3: torch.Tensor | None = None,
reference_image_3: torch.Tensor | None = None,
reference_image_4: torch.Tensor | None = None,
reference_image_5: torch.Tensor | None = None,
image_references: ReferenceImageBundle | None = None,
) -> ReferenceAssets | None:
# Match Core's dynamic Reference inputs: bypassed or otherwise absent
# sockets are ignored, then active images are numbered contiguously in
# connection order as Picture 1..N.
inputs = [
image
for image in (reference_image_1, reference_image_2, reference_image_3)
for image in resolve_reference_image_inputs(
reference_image_1, reference_image_2, reference_image_3,
reference_image_4, reference_image_5, image_references,
)
if image is not None
]
if not inputs:
@@ -402,7 +435,40 @@ def encode_reference_prompt(
dict(reference_audio_block(item))
for item in reference_audio_asset_items(reference_audio_assets)
)
return [
[tensor, {**dict(metadata), "minimax_refs": list(refs)}]
for tensor, metadata in conditioning
]
return [
[tensor, {**dict(metadata), "minimax_refs": list(refs)}]
for tensor, metadata in conditioning
]
class H3ContinuumReferenceImages:
CATEGORY = "MiniMax H3/Continuum/Input"
DESCRIPTION = "Bundle optional Reference Images 4–9 for the Continuum Sampler. Encoding remains in the Sampler."
@classmethod
def INPUT_TYPES(cls):
return {
"optional": {
f"reference_image_{index}": (
"IMAGE",
{"display_name": f"Reference Image {index} (Optional)",
"tooltip": "One optional appearance or identity image. Empty slots are skipped in prompt order."},
)
for index in range(4, 10)
}
}
RETURN_TYPES = (REFERENCE_IMAGES_TYPE,)
RETURN_NAMES = ("image_references",)
FUNCTION = "pack"
def pack(
self, reference_image_4=None, reference_image_5=None,
reference_image_6=None, reference_image_7=None,
reference_image_8=None, reference_image_9=None,
):
images = (
reference_image_4, reference_image_5, reference_image_6,
reference_image_7, reference_image_8, reference_image_9,
)
return (ReferenceImageBundle(images) if any(image is not None for image in images) else None,)
+2 -2
View File
@@ -35,7 +35,7 @@ from .branch_provenance import (
physical_groups,
resolve_chain,
)
from .constants import CONTINUUM_ACTUAL_PREFIX_STEPS
from .constants import CONTINUUM_ACTUAL_PREFIX_STEPS, continuity_storage_mode
from .v2.session import make_session, validate_chunk_entry
from .v3.review_control import (
GENERATION_MODE_REVIEW,
@@ -946,7 +946,7 @@ def build_sampling_contract(
"sigmas": _tensor_exact(sigmas),
"width": int(width), "height": int(height),
"chunk_seconds": float(chunk_seconds),
"continuity": str(continuity),
"continuity": continuity_storage_mode(continuity),
"audio_continuity": bool(audio_continuity),
"base_seed": int(base_seed),
"strict_compatibility": bool(strict_compatibility),
+74
View File
@@ -0,0 +1,74 @@
from pathlib import Path
import sys
import uuid
import pytest
import torch
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
sys.modules["decode_cache_test_fixtures"] = sys.modules[__name__]
class NativeVideoModel(torch.nn.Module):
__module__ = "comfy.ldm.minimax.vae"
def __init__(self):
super().__init__()
self.register_parameter("weight", torch.nn.Parameter(torch.ones(1), requires_grad=False))
self.register_buffer("offset", torch.zeros(1))
self.tile_size = 256
self.eval()
def decode(self, tensor):
return tensor * self.weight + self.offset
class NativeAudioModel(NativeVideoModel):
__module__ = "comfy.ldm.minimax.audio_vae"
class Patcher:
def __init__(self):
self.patches_uuid = uuid.uuid4()
self.object_patches = {}
class FakeVAE:
"""Controlled delegate fixture, NOT a real MiniMax model/GPU execution."""
__module__ = "comfy.sd"
def __init__(self, stream="video"):
self.first_stage_model = NativeVideoModel() if stream == "video" else NativeAudioModel()
self.patcher = Patcher()
self.vae_dtype = torch.float32
self.output_device = torch.device("cpu")
self.device = torch.device("cpu")
self.audio_sample_rate = 32000
self.calls = 0
def decode(self, tensor):
self.calls += 1
return self.first_stage_model.decode(tensor)
def process_output(self, x):
return x
class NestedFixture:
is_nested = True
def __init__(self, video, audio):
self.parts = video, audio
def unbind(self):
return self.parts
@pytest.fixture
def vae():
return FakeVAE()
@pytest.fixture
def samples():
return {"samples": torch.arange(120, dtype=torch.float32).reshape(5, 3, 4, 2) / 120}
@@ -0,0 +1,47 @@
"""Isolated disposable-cache fault worker; never opens Run Storage or a ComfyUI backend."""
from pathlib import Path
import json
import os
import sys
import time
ROOT = Path(__file__).resolve().parents[3]
sys.path.insert(0, str(ROOT))
import torch
from decode_cache import store as module
from decode_cache.store import DecodeStore, MiB
parent, marker, point = Path(sys.argv[1]), Path(sys.argv[2]), sys.argv[3]
store = DecodeStore(temp_parent=parent, memory_probe=lambda: 10**12, headroom_bytes=0)
store.configure("Auto", MiB, 8*MiB, 0)
if point == "reader":
print(json.dumps({"hit": store.get("same-key") is not None, "root_created": store.root is not None}))
sys.exit(0)
def pause():
marker.write_text(point, encoding="utf-8")
while True:
time.sleep(0.05)
if point == "during_raw":
original_blocks = module.tensor_blocks
def blocks(tensor):
iterator = iter(original_blocks(tensor))
first = next(iterator)
yield first[:16]
pause()
module.tensor_blocks = blocks
elif point == "before_publish":
replace = os.replace
def before_replace(src, dst):
pause()
return replace(src, dst)
os.replace = before_replace
result = store.put("same-key", torch.ones(64, 64, 3), "video", {}, (), store.epoch)
if point == "after_publish":
pause()
raise RuntimeError("fault point was not reached")
+273
View File
@@ -0,0 +1,273 @@
import importlib.util
import json
import math
import sys
from pathlib import Path
from types import ModuleType, SimpleNamespace
import pytest
import torch
from decode_cache.service import DecodeService, native_delegate
from decode_cache.identity import selected_latent, vae_signature
from decode_cache.nodes import H3DecodeCacheHelper, NODE_CLASS_MAPPINGS
from decode_cache.store import DecodeStore, MiB
from decode_cache_test_fixtures import FakeVAE, NestedFixture
def fake_video(vae, samples):
return vae.decode(selected_latent(samples, "video"))
def fake_audio(vae, samples):
# A controlled Core-helper surrogate returns sample-rate metadata as Core does.
return {"waveform": vae.decode(selected_latent(samples, "audio")),
"sample_rate": samples.get("sample_rate", vae.audio_sample_rate)}
def resolver(stream):
f = fake_video if stream == "video" else fake_audio
return f, f
@pytest.fixture
def service(tmp_path):
store = DecodeStore(temp_parent=tmp_path, memory_probe=lambda: 10**12,
disk_probe=lambda p: SimpleNamespace(free=10**12), headroom_bytes=0)
store.configure("Auto", MiB, 8*MiB, 0)
service = DecodeService(store=store, delegate_resolver=resolver, interrupt=lambda: None)
yield service
service.store.close()
def test_delegate_called_once_warm(service, vae, samples):
a, e = service.decode(samples, vae, "video")
b, f = service.decode(samples, vae, "video")
assert e["status"] == "miss" and f["status"] == "hit"
assert vae.calls == 1 and torch.equal(a, b)
def test_audio_metadata_override_and_mutation(service):
vae = FakeVAE("audio")
samples = {"samples": torch.ones(1, 2, 40), "sample_rate": 22050}
a, _ = service.decode(samples, vae, "audio")
a["waveform"].zero_()
a["sample_rate"] = 5
b, e = service.decode(samples, vae, "audio")
assert e["status"] == "hit"
assert b["sample_rate"] == 22050 and b["waveform"].sum() == 80
samples["sample_rate"] = 32000
_, e = service.decode(samples, vae, "audio")
assert e["status"] == "miss"
def test_core_error_not_retried(service, vae, samples):
calls = []
def broken(vae, samples):
calls.append(1)
raise RuntimeError("native decode failed")
service.delegate_resolver = lambda stream: (broken, broken)
with pytest.raises(RuntimeError, match="native decode failed"):
service.decode(samples, vae, "video")
assert len(calls) == 1
@pytest.mark.parametrize("point", ["signature", "get", "put"])
def test_cache_fail_open(service, vae, samples, monkeypatch, point):
def broken(*args, **kwargs):
raise OSError("fixture-only cache failure")
if point == "signature":
service.signature_fn = broken
else:
monkeypatch.setattr(service.store, point, broken)
result, event = service.decode(samples, vae, "video")
assert torch.equal(result, samples["samples"])
assert vae.calls == 1
def test_interrupt_not_swallowed(service, vae, samples, monkeypatch):
class InterruptProcessingException(Exception):
pass
def interrupted(*args):
raise InterruptProcessingException()
monkeypatch.setattr(service.store, "get", interrupted)
with pytest.raises(InterruptProcessingException):
service.decode(samples, vae, "video")
assert vae.calls == 0
def test_unsupported_vae_still_decodes(service, samples):
class Unknown:
def decode(self, tensor):
return tensor.clone()
result, event = service.decode(samples, Unknown(), "video")
assert event["status"] == "bypass" and torch.equal(result, samples["samples"])
def test_vae_change_during_decode_skips_store(service, vae, samples):
def changing(vae, samples):
vae.first_stage_model.tile_size += 1
return vae.decode(selected_latent(samples, "video"))
service.delegate_resolver = lambda stream: (changing, changing)
_, event = service.decode(samples, vae, "video")
assert "store_skipped" in event and not service.store.entries
def test_q1_q2_q3_q4_physical_lists(service):
vae = FakeVAE()
groups = [{"samples": torch.ones(124 if i == 0 else 141, 2, 2, 3)*i} for i in range(3)]
statuses = []
for sequence in ([groups[0]], [groups[1]], groups, groups):
statuses.append([service.decode(s, vae, "video")[1]["status"] for s in sequence])
assert statuses == [["miss"], ["miss"], ["hit", "hit", "miss"], ["hit", "hit", "hit"]]
assert vae.calls == 3
def test_terminal_entry_never_sliced(service):
vae = FakeVAE()
x = torch.rand(260, 2, 2, 3)
for _ in range(2):
out, _ = service.decode({"samples": x}, vae, "video")
assert torch.equal(out, x)
assert vae.calls == 1
def test_retry_changed_group_only_misses(service):
vae = FakeVAE()
a = {"samples": torch.ones(8, 2, 2, 3)}
b = {"samples": torch.ones(8, 2, 2, 3)*2}
service.decode(a, vae, "video")
service.decode(b, vae, "video")
b["samples"].add_(1)
assert service.decode(a, vae, "video")[1]["status"] == "hit"
assert service.decode(b, vae, "video")[1]["status"] == "miss"
def test_native_functions_are_delegated(monkeypatch, vae, samples):
calls = []
mod = ModuleType("nodes")
class VAEDecode:
def decode(self, vae, samples):
calls.append(("video", vae, samples))
return (samples["samples"],)
mod.VAEDecode = VAEDecode
monkeypatch.setitem(sys.modules, "nodes", mod)
audio = ModuleType("comfy_extras.nodes_audio")
def audio_helper(vae, samples):
calls.append(("audio", vae, samples))
return {"waveform": samples["samples"], "sample_rate": 12345}
audio.vae_decode_audio = audio_helper
monkeypatch.setitem(sys.modules, "comfy_extras.nodes_audio", audio)
assert native_delegate("video")[1](vae, samples) is samples["samples"]
assert native_delegate("audio")[1](vae, samples)["sample_rate"] == 12345
assert len(calls) == 2
def test_one_public_node_and_nan():
assert list(NODE_CLASS_MAPPINGS) == ["H3DecodeCacheHelper"]
assert H3DecodeCacheHelper.INPUT_IS_LIST
assert H3DecodeCacheHelper.OUTPUT_IS_LIST == (True, True, False)
assert math.isnan(H3DecodeCacheHelper.IS_CHANGED())
@pytest.mark.parametrize("streams", ["video", "audio", "both", "none"])
def test_node_optional_independent_lists(service, streams):
node = H3DecodeCacheHelper()
node.service = service
kwargs = {}
if streams in ("video", "both"):
kwargs.update(video_samples=[{"samples": torch.ones(4, 2, 2, 3)}]*2, video_vae=[FakeVAE()])
if streams in ("audio", "both"):
kwargs.update(audio_samples=[{"samples": torch.ones(1, 2, 16)}], audio_vae=[FakeVAE("audio")])
images, audio, report = node.decode(["Auto"], [1], [1], [0], **kwargs)
assert len(images) == (2 if streams in ("video", "both") else 0)
assert len(audio) == (1 if streams in ("audio", "both") else 0)
assert json.loads(report)["mode"] == "Auto"
def test_none_position_no_broadcast(service):
node = H3DecodeCacheHelper()
node.service = service
images, _, _ = node.decode(["Auto"], [1], [1], [0],
video_samples=[None, {"samples": torch.ones(4, 2, 2, 3)}], video_vae=[FakeVAE()])
assert images[0] is None and images[1].shape == (4, 2, 2, 3)
def test_off_disables_content_cache(service, vae, samples):
node = H3DecodeCacheHelper()
node.service = service
for _ in range(2):
node.decode(["Off"], [1], [0], [0], video_samples=[samples], video_vae=[vae])
assert vae.calls == 2 and not service.store.entries
def test_cache_configuration_fault_is_nonfatal(service, vae, samples, monkeypatch):
node = H3DecodeCacheHelper()
node.service = service
def bad(*a):
raise OSError("memory probe unavailable")
monkeypatch.setattr(service.store, "configure", bad)
result = node.decode(["Auto"], [1], [1], [0], video_samples=[samples], video_vae=[vae])
assert vae.calls == 1
assert "cache_disabled_reason" in json.loads(result[2])
def test_builtin_helper_is_publicly_registered():
from ComfyUI_H3_Continuum_Join import nodes as continuum_nodes
assert "H3DecodeCacheHelper" in continuum_nodes.NODE_CLASS_MAPPINGS
assert continuum_nodes.NODE_DISPLAY_NAME_MAPPINGS["H3DecodeCacheHelper"] == "Decode Cache Helper"
def test_forbidden_runtime_imports():
import ast
root = Path(__file__).resolve().parents[2]/"decode_cache"
forbidden = {"run_storage", "runtime_coordinator", "execution_planner", "sampling_engine"}
for path in root.glob("*.py"):
tree = ast.parse(path.read_text())
for node in ast.walk(tree):
if isinstance(node, ast.ImportFrom):
assert not forbidden.intersection((node.module or "").split("."))
def test_cache_memory_error_returns_already_decoded_result(service, vae, samples, monkeypatch):
def no_memory(*args, **kwargs):
raise MemoryError("cache allocation failed")
monkeypatch.setattr(service.store, "put", no_memory)
out, event = service.decode(samples, vae, "video")
assert torch.equal(out, samples["samples"])
assert vae.calls == 1 and "cache_write_error" in event
def test_native_oom_propagates_exactly_once(service, vae, samples):
calls = []
def oom(*args, **kwargs):
calls.append(1)
raise torch.OutOfMemoryError("native fixture OOM")
service.delegate_resolver = lambda stream: (oom, oom)
with pytest.raises(torch.OutOfMemoryError):
service.decode(samples, vae, "video")
assert calls == [1]
def test_cancel_during_cache_store_is_not_a_native_retry(service, vae, samples, monkeypatch):
class InterruptProcessingException(Exception):
pass
def canceled(*args, **kwargs):
raise InterruptProcessingException("cancel fixture")
monkeypatch.setattr(service.store, "put", canceled)
with pytest.raises(InterruptProcessingException):
service.decode(samples, vae, "video")
assert vae.calls == 1
def test_two_simultaneous_node_calls_serialize_one_miss(service, vae, samples):
from concurrent.futures import ThreadPoolExecutor
node = H3DecodeCacheHelper()
node.service = service
def run():
return node.decode(["Auto"], [1], [1], [0], video_samples=[samples], video_vae=[vae])
with ThreadPoolExecutor(max_workers=2) as pool:
result = list(pool.map(lambda _: run(), range(2)))
assert vae.calls == 1
assert torch.equal(result[0][0][0], result[1][0][0])
+164
View File
@@ -0,0 +1,164 @@
import gc
import uuid
import weakref
import pytest
import torch
from decode_cache.identity import CacheBypass, ObjectTokens, make_key, selected_latent, tensor_digest, vae_signature
from decode_cache_test_fixtures import FakeVAE, NestedFixture
def delegate():
pass
def test_same_content_different_object_same_key(samples):
other = {"samples": samples["samples"].clone()}
assert make_key(samples, "video", "s") == make_key(other, "video", "s")
@pytest.mark.parametrize("dtype", [torch.float16, torch.float32, torch.float64, torch.bfloat16, torch.int16])
def test_tensor_bytes_all_dtypes(dtype):
x = torch.arange(60).to(dtype).reshape(3, 4, 5)
assert tensor_digest(x) == tensor_digest(x.clone())
x[0, 0, 0] += 1
assert tensor_digest(x) != tensor_digest(torch.arange(60).to(dtype).reshape(3, 4, 5))
@pytest.mark.parametrize("shape", [(), (0,), (1,), (3, 4), (1, 2, 8), (2, 1, 3, 4)])
def test_block_hash_matches_raw(shape):
import hashlib
from decode_cache.identity import tensor_blocks
x = torch.ones(shape)
actual = hashlib.sha256(b"".join(bytes(b) for b in tensor_blocks(x, 9))).hexdigest()
expected = hashlib.sha256(x.contiguous().reshape(-1).view(torch.uint8).numpy().tobytes()).hexdigest()
assert actual == expected
def test_noncontiguous_order():
x = torch.arange(120).reshape(4, 5, 6).transpose(0, 2)
assert tensor_digest(x) == tensor_digest(x.contiguous())
@pytest.mark.parametrize("change", ["content", "dtype", "shape", "vae", "stream", "reset", "sample_rate", "extra"])
def test_key_invalidations(samples, change):
kwargs = {"samples": samples, "stream": "video", "signature": "s", "reset_token": 0}
before = make_key(**kwargs)
if change == "content":
samples["samples"][0, 0, 0, 0] += 1
elif change == "dtype":
samples["samples"] = samples["samples"].double()
elif change == "shape":
samples["samples"] = samples["samples"].reshape(6, 2, 5, 2)
elif change == "vae":
kwargs["signature"] = "other"
elif change == "stream":
kwargs["stream"] = "audio"
elif change == "reset":
kwargs["reset_token"] = 1
elif change == "sample_rate":
samples["sample_rate"] = 22050
else:
samples["noise_mask"] = torch.zeros(1)
assert make_key(**kwargs) != before
def test_audio_rate_override_key():
x = torch.zeros(1, 2, 8)
assert make_key({"samples": x, "sample_rate": 16000}, "audio", "s") != make_key({"samples": x, "sample_rate": 32000}, "audio", "s")
def test_nested_only_selected_stream():
x, y = torch.ones(1, 24, 2, 2, 2), torch.ones(1, 32, 2, 4)
s = {"samples": NestedFixture(x, y)}
v = make_key(s, "video", "s")
a = make_key(s, "audio", "s")
y.add_(3)
assert make_key(s, "video", "s") == v
assert make_key(s, "audio", "s") != a
assert selected_latent(s, "audio") is y
def test_opaque_metadata_bypass(samples):
samples["opaque"] = object()
with pytest.raises(CacheBypass):
make_key(samples, "video", "s")
def test_inference_tensor_hash_no_version_required():
with torch.inference_mode():
x = torch.ones(4)
assert tensor_digest(x) == tensor_digest(x.clone())
def test_identity_does_not_keep_vae_alive():
vae = FakeVAE() # no pytest fixture owner remains alive
signature, refs = vae_signature(vae, "video", delegate)
ref = weakref.ref(vae)
del vae
gc.collect()
assert ref() is None
assert refs[0]() is None
def test_object_tokens_not_address_only():
tokens = ObjectTokens()
a, b = FakeVAE(), FakeVAE()
assert tokens.token(a) == tokens.token(a)
assert tokens.token(a) != tokens.token(b)
@pytest.mark.parametrize("change", ["patch_uuid", "weight_copy", "buffer_copy", "tiling", "dtype", "new_vae"])
def test_vae_signature_changes(vae, change):
a = vae_signature(vae, "video", delegate)[0]
if change == "patch_uuid":
vae.patcher.patches_uuid = uuid.uuid4()
elif change == "weight_copy":
vae.first_stage_model.weight.copy_(torch.ones(1)*2)
elif change == "buffer_copy":
vae.first_stage_model.offset.add_(1)
elif change == "tiling":
vae.first_stage_model.tile_size = 512
elif change == "dtype":
vae.vae_dtype = torch.float16
else:
vae = FakeVAE()
assert vae_signature(vae, "video", delegate)[0] != a
def test_unknown_vae_and_training_bypass(vae):
with pytest.raises(CacheBypass):
vae_signature(object(), "video", delegate)
vae.first_stage_model.train()
with pytest.raises(CacheBypass):
vae_signature(vae, "video", delegate)
def test_relocation_buffer_identity_not_used(vae):
a = vae_signature(vae, "video", delegate)[0]
vae.first_stage_model.offset = vae.first_stage_model.offset.clone()
assert vae_signature(vae, "video", delegate)[0] == a
def test_empty_native_model_options_allowed_but_hooks_bypass(vae):
vae.patcher.model_options = {"transformer_options": {}}
vae_signature(vae, "video", delegate)
vae.patcher.model_options["transformer_options"]["wrapper"] = object()
with pytest.raises(CacheBypass):
vae_signature(vae, "video", delegate)
def test_forward_hook_disables_cache_only(vae):
handle = vae.first_stage_model.register_forward_hook(lambda *args: None)
try:
with pytest.raises(CacheBypass):
vae_signature(vae, "video", delegate)
finally:
handle.remove()
def test_inference_context_has_separate_identity(vae):
before = vae_signature(vae, "video", delegate)[0]
with torch.inference_mode():
assert vae_signature(vae, "video", delegate)[0] != before
@@ -0,0 +1,50 @@
"""Process termination tests on the host OS, not a Windows/power-loss claim."""
from pathlib import Path
import json
import os
import subprocess
import sys
import time
import numpy as np
import pytest
WORKER = Path(__file__).parent / "helpers" / "cache_process_worker.py"
@pytest.mark.parametrize("point", ["during_raw", "before_publish", "after_publish"])
def test_process_kill_leaves_only_disposable_private_files(tmp_path, point):
parent = tmp_path / "private-cache-parent"
parent.mkdir()
marker = tmp_path / "ready.txt"
user_file = tmp_path / "untouched-run-storage.txt"
user_file.write_text("existing accepted data")
env = {**os.environ, "PYTHONDONTWRITEBYTECODE": "1", "OMP_NUM_THREADS": "1"}
p = subprocess.Popen([sys.executable, str(WORKER), str(parent), str(marker), point],
stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, env=env)
try:
deadline = time.monotonic() + 20
while not marker.exists() and time.monotonic() < deadline:
if p.poll() is not None:
raise AssertionError(p.stderr.read().decode())
time.sleep(0.03)
assert marker.exists(), "worker never reached the kill boundary"
p.kill()
p.wait(timeout=5)
finally:
if p.poll() is None:
p.kill()
p.wait(timeout=5)
if p.stderr:
p.stderr.close()
raw = list(parent.rglob("*.npy"))
temporary = list(parent.rglob("*.tmp"))
if point == "after_publish":
assert len(raw) == 1 and not temporary
assert np.array_equal(np.load(raw[0], allow_pickle=False), np.ones((64, 64, 3), dtype=np.float32))
else:
assert not raw and len(temporary) == 1
reader = subprocess.run([sys.executable, str(WORKER), str(parent), str(marker), "reader"],
capture_output=True, text=True, env=env, check=True, timeout=20)
assert json.loads(reader.stdout.splitlines()[-1]) == {"hit": False, "root_created": False}
assert user_file.read_text() == "existing accepted data"
+295
View File
@@ -0,0 +1,295 @@
import gc
import json
import os
from pathlib import Path
from types import SimpleNamespace
import weakref
import pytest
import torch
from decode_cache.identity import CacheBypass
from decode_cache.store import DecodeStore, MiB
@pytest.fixture
def store(tmp_path):
s = DecodeStore(temp_parent=tmp_path, memory_probe=lambda: 10**12,
disk_probe=lambda p: SimpleNamespace(free=10**12), headroom_bytes=0)
s.configure("Auto", 1024**2, 1024**2, 0)
yield s
s.close()
def put(store, key, x, stream="video"):
return store.put(key, x, stream, {}, (), store.epoch)
@pytest.mark.parametrize("mode", ["Auto", "RAM"])
def test_hit_bit_exact_mutation_isolation(store, mode):
store.configure(mode, MiB, MiB, 0)
x = torch.arange(120).float().reshape(5, 3, 4, 2)
replacement = put(store, "a", x)
first = replacement[0] if replacement else x
first.add_(7)
hit, _ = store.get("a")
assert torch.equal(hit, torch.arange(120).float().reshape(5, 3, 4, 2))
hit.zero_()
again, _ = store.get("a")
assert again.sum().item() > 0
@pytest.mark.parametrize("mode", ["Auto", "RAM"])
def test_view_mutation_does_not_poison(store, mode):
store.configure(mode, MiB, MiB, 0)
put(store, "a", torch.ones(4, 3, 2, 1))
hit, _ = store.get("a")
hit[1:3].mul_(0)
other, _ = store.get("a")
assert other.sum() == 24
def test_noncontiguous_serialization(store):
x = torch.arange(120).float().reshape(5, 3, 4, 2).transpose(0, 2)
put(store, "a", x)
y, _ = store.get("a")
assert y.dtype == x.dtype and torch.equal(x, y)
def test_dtype_unchanged(store):
for dtype in (torch.float16, torch.float32, torch.float64):
x = torch.arange(12).to(dtype)
put(store, str(dtype), x)
y, _ = store.get(str(dtype))
assert y.dtype == dtype and torch.equal(x, y)
def test_ram_lru_and_budget(store):
store.configure("RAM", 32, MiB, 0)
put(store, "a", torch.ones(4))
put(store, "b", torch.ones(4)*2)
assert store.get("a") is not None
put(store, "c", torch.ones(4)*3)
assert store.get("b") is None
assert store.ram_bytes == 32
def test_ram_pressure_evicts(store):
store.configure("RAM", MiB, MiB, 0)
put(store, "a", torch.ones(4))
store.headroom_bytes = 1024
store.memory_probe = lambda: 0
store.configure("RAM", MiB, MiB, 0)
assert store.get("a") is None
assert store.ram_bytes == 0
def test_auto_under_ram_pressure_uses_disk(store):
store.memory_probe = lambda: 0
put(store, "a", torch.ones(24), "audio")
assert store.entries["a"].path is not None
def test_disk_full_skips_cache(store):
store.disk_probe = lambda p: SimpleNamespace(free=0)
assert put(store, "a", torch.ones(4)) is None
assert store.get("a") is None
def test_oversized_skips(store):
store.configure("Auto", 0, 8, 0)
assert put(store, "a", torch.ones(4)) is None
assert store.root is None
def test_living_mmap_survives_clear_and_accounts_bytes(store):
hit = put(store, "a", torch.ones(4))[0]
path = store.entries["a"].path
store.clear()
assert path.exists()
assert store.disk_bytes > 0
hit.add_(2)
assert torch.equal(hit, torch.ones(4)*3)
del hit
gc.collect()
store.stats()
assert not path.exists()
assert store.disk_bytes == 0
def test_no_cross_process_store_reuse(store, tmp_path):
put(store, "a", torch.ones(4))
other = DecodeStore(temp_parent=tmp_path)
assert other.get("a") is None
other.close()
@pytest.mark.parametrize("damage", ["truncate", "header", "data", "delete"])
def test_corrupt_disk_invalidates(store, damage):
result = put(store, "a", torch.ones(20))
del result
gc.collect()
path = store.entries["a"].path
if damage == "delete":
path.unlink()
elif damage == "truncate":
path.write_bytes(b"bad")
else:
with open(path, "r+b") as f:
f.seek(-1 if damage == "data" else 0, 2 if damage == "data" else 0)
b = f.read(1)
f.seek(-1, 1)
f.write(bytes([b[0] ^ 1]))
with pytest.raises((CacheBypass, OSError, ValueError)):
store.get("a")
assert store.get("a") is None
def test_corrupt_ram_invalidates(store):
store.configure("RAM", MiB, MiB, 0)
put(store, "a", torch.ones(4))
store.entries["a"].tensor.zero_()
with pytest.raises(CacheBypass):
store.get("a")
assert store.get("a") is None
def test_dead_vae_eviction(store):
class Owner:
pass
owner = Owner()
store.put("a", torch.ones(4), "audio", {}, (weakref.ref(owner),), store.epoch)
del owner
gc.collect()
assert store.get("a") is None
def test_write_fault_no_published_entry(store, monkeypatch):
def fail(*args):
raise OSError("read-only test cache")
monkeypatch.setattr(os, "replace", fail)
with pytest.raises(OSError):
put(store, "a", torch.ones(4))
assert not store.entries
assert not list(store.root.iterdir())
def test_unknown_temp_is_never_loaded_or_removed(store):
root = store._directory()
stale = root / "foreign.tmp"
stale.write_text("not a cache entry")
store.close()
assert stale.exists()
def test_reset_and_disabled_no_storage(store):
put(store, "a", torch.ones(4))
store.configure("Off", MiB, MiB, 1)
assert store.get("a") is None
assert put(store, "b", torch.ones(4)) is None
@pytest.mark.parametrize("mode", ["Auto", "RAM"])
def test_token_change_clears_once_then_same_token_keeps_cache(store, mode):
store.configure(mode, MiB, MiB, 0)
put(store, "before", torch.ones(4))
epoch = store.epoch
store.configure(mode, MiB, MiB, 0)
assert store.get("before") is not None
assert store.epoch == epoch
# The UI increments only the submitted INT; configure acts on next Queue.
store.configure(mode, MiB, MiB, 1)
assert store.get("before") is None
assert store.epoch > epoch
put(store, "after", torch.ones(4))
epoch = store.epoch
store.configure(mode, MiB, MiB, 1)
assert store.get("after") is not None
assert store.epoch == epoch
def test_epoch_prevents_inflight_reinsertion(store):
epoch = store.epoch
store.clear()
assert store.put("a", torch.ones(4), "video", {}, (), epoch) is None
assert store.get("a") is None
def test_pending_disk_files_are_in_quota(store):
store.configure("Auto", 0, 6000, 0)
x = torch.ones(1000) # 4000 bytes + header; next insert must not delete a live mmap
first = put(store, "a", x)
assert first is None # conservative header reservation is > 6000
store.configure("Auto", 0, 10000, 0)
first = put(store, "a", x)
assert first is not None
store.clear()
# 4128 + conservative 8096 > quota; pinned pending file counts
assert put(store, "b", x) is None
del first
gc.collect()
assert put(store, "b", x) is not None
@pytest.mark.parametrize("mode", ["Auto", "RAM"])
def test_output_metadata_is_defensively_copied(store, mode):
store.configure(mode, MiB, MiB, 0)
extra = {"sample_rate": 32000, "future_metadata": {"labels": ["original"]}}
store.put("a", torch.ones(12), "video", extra, (), store.epoch)
extra["future_metadata"]["labels"][0] = "caller mutation"
_, first = store.get("a")
assert first["future_metadata"]["labels"] == ["original"]
first["future_metadata"]["labels"][0] = "downstream mutation"
_, second = store.get("a")
assert second["future_metadata"]["labels"] == ["original"]
def test_delete_failure_is_accounted_and_retried(store, monkeypatch):
put(store, "a", torch.ones(12))
path = store.entries["a"].path
original_unlink = Path.unlink
def denied(self, *args, **kwargs):
if self == path:
raise PermissionError("simulated Windows sharing violation")
return original_unlink(self, *args, **kwargs)
with monkeypatch.context() as m:
m.setattr(Path, "unlink", denied)
store.clear()
assert store.disk_bytes > 0 and len(store.retired) == 1
store.stats()
assert not path.exists() and store.disk_bytes == 0
def test_symlink_cache_file_is_not_opened(store, tmp_path):
put(store, "a", torch.ones(12))
path = store.entries["a"].path
outside = tmp_path / "outside-user-file.bin"
outside.write_bytes(b"DO NOT TOUCH")
path.unlink()
try:
path.symlink_to(outside)
except OSError:
pytest.skip("symbolic links not available")
with pytest.raises(CacheBypass):
store.get("a")
assert outside.read_bytes() == b"DO NOT TOUCH"
def test_store_garbage_collection_cleans_unleased_private_files(tmp_path):
s = DecodeStore(temp_parent=tmp_path, memory_probe=lambda: 10**12, headroom_bytes=0)
put(s, "a", torch.ones(12))
root = s.root
assert root.exists()
ref = weakref.ref(s)
del s
gc.collect()
assert ref() is None and not root.exists()
def test_explicit_private_cache_parent_uses_only_child_directory(tmp_path, monkeypatch):
monkeypatch.setenv("H3_DECODE_CACHE_TEMP_DIR", str(tmp_path))
s = DecodeStore(memory_probe=lambda: 10**12, headroom_bytes=0)
put(s, "a", torch.ones(12))
assert s.root.parent == tmp_path and s.root.name.startswith("h3-decode-cache-")
s.close()
assert tmp_path.exists()
+80
View File
@@ -0,0 +1,80 @@
import assert from "node:assert/strict";
import fs from "node:fs";
const source = fs.readFileSync(new URL("../web/decode_cache_helper.js", import.meta.url), "utf8");
let extension;
globalThis.__h3TestApp = { registerExtension(value) { extension = value; }, graph: { _nodes: [] } };
const module = await import(`data:text/javascript;base64,${Buffer.from(source.replace(
'import { app } from "../../scripts/app.js";', 'const app = globalThis.__h3TestApp;',
)).toString("base64")}`);
function createNode(type = "H3DecodeCacheHelper") {
return {
comfyClass: type,
widgets: ["cache_mode", "ram_budget_mb", "disk_budget_gb", "reset_token"].map((name, i) => ({
name, value: ["Auto", 256, 8, 0][i], type: i === 0 ? "combo" : "number", options: {},
})),
addWidget(type, name, value, callback, options) {
const widget = { type, name, value, callback, options };
this.widgets.push(widget);
return widget;
},
serialize() { return { widgets_values: this.widgets.map((w) => w.value) }; },
configure(data) { data.widgets_values.forEach((value, i) => { if (this.widgets[i]) this.widgets[i].value = value; }); },
setDirtyCanvas() {},
};
}
const node = createNode();
extension.nodeCreated(node);
const token = node.widgets[3];
const button = node.widgets[4];
assert.equal(token.value, 0);
assert.equal(token.hidden, true);
assert.equal(token.options.hidden, true);
assert.equal(token.options.serialize, undefined);
assert.equal(button.type, "button");
assert.equal(button.name, "キャッシュをクリア");
assert.equal(button.options.serialize, false);
assert.equal(button.serialize, false);
assert.match(button.tooltip, /次回Queue/);
assert.deepEqual(node.serialize().widgets_values, ["Auto", 256, 8, 0]);
extension.loadedGraphNode(node);
globalThis.__h3TestApp.graph._nodes = [node];
extension.afterConfigureGraph();
assert.equal(node.widgets.length, 5);
assert.equal(token.value, 0);
button.callback();
assert.equal(token.value, 1);
assert.deepEqual(node.serialize().widgets_values, ["Auto", 256, 8, 1]);
// Save/load and the clone path keep the same four backend values.
const clone = createNode();
extension.nodeCreated(clone);
clone.configure(node.serialize());
assert.deepEqual(clone.serialize(), node.serialize());
assert.equal(clone.widgets.length, 5);
clone.widgets[4].callback();
assert.equal(clone.widgets[3].value, 2);
assert.equal(token.value, 1);
// Both official V3.8X2 distribution names preserve the same helper settings.
for (const filename of ["MiniMax_H3_Continuum_V38X2.json", "MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json"]) {
const workflow = JSON.parse(fs.readFileSync(new URL(`../examples/workflows/${filename}`, import.meta.url), "utf8"));
const saved = workflow.nodes.find((n) => n.type === "H3DecodeCacheHelper");
const loaded = createNode();
extension.nodeCreated(loaded);
loaded.configure(saved);
assert.deepEqual(loaded.serialize().widgets_values, saved.widgets_values);
assert.equal(loaded.widgets[3].hidden, true);
}
node.configure({ widgets_values: ["RAM", 128, 16, 2147483647] });
button.callback();
assert.deepEqual(node.serialize().widgets_values, ["RAM", 128, 16, 0]);
const other = createNode("H3ContinuumSamplerV38");
module.configureDecodeCacheHelper(other);
assert.equal(other.widgets.length, 4);
assert.equal(other.widgets[3].hidden, undefined);
// Without JS the native reset_token input remains untouched.
assert.equal(createNode().widgets[3].type, "number");
console.log("Decode Cache Helper frontend lifecycle / serialization / clone / standard workflows: PASS");
+2 -1
View File
@@ -51,7 +51,8 @@ function environment() {
const src=fs.readFileSync(path.join(ROOT,'web/project_id.js'),'utf8')
.replace(/import \{ app \} from "\.\.\/\.\.\/scripts\/app.js";/,'')
.replace(/import \{ api \} from "\.\.\/\.\.\/scripts\/api.js";/,'')
.replace(/import \{ normalizeReferenceAudioLabels \} from "\.\/reference_audio_ui.js";/,'function normalizeReferenceAudioLabels() {}');
.replace(/import \{ normalizeReferenceAudioLabels \} from "\.\/reference_audio_ui.js";/,'function normalizeReferenceAudioLabels() {}')
.replace(/import \{ migrateReferenceImageInputs \} from "\.\/reference_image_ui.js";/,'function migrateReferenceImageInputs() {}');
vm.runInNewContext(src+`\nglobalThis.testFns={configureNode,loadTakeHistory,takeCatalog,selectTakeOffset,selectTakeAction,reviewStatus,reviewSettingsChanged,synchronizeReviewQueue};`,sandbox);
app.extension.setup();
const f=sandbox.testFns;
+3 -3
View File
@@ -6,7 +6,7 @@ import tomllib
ROOT = Path(__file__).resolve().parents[1]
EXPECTED_VERSION = "3.8.2"
EXPECTED_VERSION = "3.8.3"
def test_v35_release_metadata_is_consistent():
@@ -20,12 +20,12 @@ def test_v35_release_metadata_is_consistent():
assert metadata["project"]["version"] == EXPECTED_VERSION
def test_v35_public_documents_identify_the_current_release():
def test_public_documents_identify_the_current_v38x2_release():
readme = (ROOT / "README.md").read_text(encoding="utf-8")
readme_ja = (ROOT / "README_JA.md").read_text(encoding="utf-8")
changelog = (ROOT / "CHANGELOG.md").read_text(encoding="utf-8")
expected_heading = f"# ComfyUI-H3-Continuum {EXPECTED_VERSION} — V3.8X\n"
expected_heading = f"# ComfyUI-H3-Continuum {EXPECTED_VERSION} — V3.8X2\n"
assert readme.startswith(expected_heading)
assert readme_ja.startswith(expected_heading)
assert f"## {EXPECTED_VERSION}" in changelog
@@ -132,7 +132,7 @@ def test_r6_facade_decorates_status_only_after_existing_runtime_returns():
assert seen["video_latents"] is video
assert seen["audio_latents"] is audio
assert seen["assembly_plan"] is plan
assert seen["reference_images"] == ("image-1", None, None)
assert seen["reference_images"] == ("image-1",) + (None,) * 8
assert seen["still_guide_active"] is True
+1 -1
View File
@@ -145,4 +145,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.8.2"' in version_source
assert 'PACKAGE_VERSION = "3.8.3"' in version_source
+2 -2
View File
@@ -33,11 +33,11 @@ def test_v35_appends_reference_audio_sockets_without_changing_v34_schema():
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 (Optional)"
"Reference Audio (Legacy)"
)
assert v35_optional["reference_audio_vae"][0] == "VAE"
assert v35_optional["reference_audio_vae"][1]["display_name"] == (
"Reference Audio VAE (Optional)"
"Reference Audio VAE (Legacy)"
)
assert "Driving Audio" in v35_optional["reference_audio_1"][1]["tooltip"]
+2 -2
View File
@@ -56,8 +56,8 @@ assert.deepEqual(
"Video Guide Frames",
"Driving Audio",
"Driving Audio VAE",
"Reference Audio (Optional)",
"Reference Audio VAE (Optional)",
"Reference Audio (Legacy)",
"Reference Audio VAE (Legacy)",
],
);
assert.equal(node.inputs[3].name, "reference_audio_1");
+2 -1
View File
@@ -76,7 +76,8 @@ def test_public_helper_and_v38_socket_are_the_only_surface_additions():
)
assert H3ContinuumReferenceAudios.RETURN_TYPES == (REFERENCE_AUDIOS_TYPE,)
assert "audio_references" not in v37["optional"]
assert list(v38["optional"])[:-1] == list(v37["optional"])
assert list(v38["optional"])[:-2] == list(v37["optional"])
assert list(v38["optional"])[-2:] == ["audio_references", "image_references"]
assert v38["optional"]["audio_references"][0] == REFERENCE_AUDIOS_TYPE
+21 -11
View File
@@ -23,10 +23,12 @@ PUBLIC_DISPLAY_NAMES = {
"H3EasyLoadAudio": "H3 Continuum Load Audio",
"H3ContinuumLoadVideo": "H3 Continuum Load Video",
"H3ContinuumSecondPassV35": "H3 Continuum Second Pass",
"H3ContinuumReferenceImages": "H3 Continuum Reference Images",
"H3DecodeCacheHelper": "Decode Cache Helper",
}
def test_public_export_is_exactly_the_seven_node_v38_allowlist():
def test_public_export_is_exactly_the_v38x2_nine_node_allowlist():
assert set(root_nodes.NODE_CLASS_MAPPINGS) == set(PUBLIC_DISPLAY_NAMES)
assert root_nodes.NODE_DISPLAY_NAME_MAPPINGS == PUBLIC_DISPLAY_NAMES
@@ -106,10 +108,11 @@ def test_v38_schema_and_serialized_widget_order_are_unchanged():
"reference_audio_vae",
"guide",
"audio_references",
"image_references",
]
def test_registry_package_keeps_one_workflow_and_excludes_development_assets():
def test_registry_package_keeps_official_v38x2_workflows_and_excludes_development_assets():
rules = (ROOT / ".comfyignore").read_text(encoding="utf-8").splitlines()
assert "tests/" in rules
assert "tools/*" in rules
@@ -123,12 +126,14 @@ def test_registry_package_keeps_one_workflow_and_excludes_development_assets():
assert "examples/*" in rules
assert "!examples/workflows/" in rules
assert "examples/workflows/*" in rules
assert "!examples/workflows/MiniMax_H3_Continuum_V38x.json" in rules
assert "!examples/workflows/MiniMax_H3_Continuum_V38x.zip" in rules
assert "!examples/workflows/MiniMax_H3_Continuum_V38X2.json" in rules
assert "!examples/workflows/MiniMax_H3_Continuum_V38X2.zip" in rules
assert "!examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json" in rules
assert "!examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip" in rules
assert "*.zip" in rules
workflow = json.loads(
(ROOT / "examples/workflows/MiniMax_H3_Continuum_V38x.json").read_text(
(ROOT / "examples/workflows/MiniMax_H3_Continuum_V38X2.json").read_text(
encoding="utf-8"
)
)
@@ -170,8 +175,10 @@ def test_registry_manifest_matches_every_declared_source_file():
assert {
path for path in entries if path.startswith("examples/")
} == {
"examples/workflows/MiniMax_H3_Continuum_V38x.json",
"examples/workflows/MiniMax_H3_Continuum_V38x.zip",
"examples/workflows/MiniMax_H3_Continuum_V38X2.json",
"examples/workflows/MiniMax_H3_Continuum_V38X2.zip",
"examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json",
"examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip",
}
for relative_path, expected_digest in entries.items():
@@ -191,6 +198,9 @@ def test_intuitive_facade_is_discoverable_and_presentation_only(tmp_path):
).replace(
'import { normalizeReferenceAudioLabels } from "./reference_audio_ui.js";',
"function normalizeReferenceAudioLabels() {}",
).replace(
'import { migrateReferenceImageInputs } from "./reference_image_ui.js";',
"function migrateReferenceImageInputs() {}",
).replace(
'import { api } from "../../scripts/api.js";',
"const api = { fetchApi: (...args) => globalThis.fetch(...args), "
@@ -281,6 +291,7 @@ const node = {{
this.widgets.push(item);
return item;
}},
removeInput(index) {{ this.inputs.splice(index, 1); }},
serialize() {{ return {{ widgets_values: this.widgets.map((item) => item.value) }}; }},
configure(info) {{
info.widgets_values.forEach((value, index) => {{ this.widgets[index].value = value; }});
@@ -657,8 +668,7 @@ setTimeout(async () => {{
"last_frame",
"reference_image_1",
"reference_video_1",
"driving_audio",
"audio_references",
"guide",
],
"driving_audio",
"audio_references",
],
}
+42 -18
View File
@@ -7,12 +7,12 @@ from zipfile import ZipFile
ROOT = Path(__file__).resolve().parents[1]
WORKFLOW_PATH = ROOT / "examples" / "workflows" / "MiniMax_H3_Continuum_V38x.json"
WORKFLOW_PATH = ROOT / "examples" / "workflows" / "MiniMax_H3_Continuum_V38X2.json"
# User-approved final distribution. Do not sanitize or reserialize this graph.
WORKFLOW_SHA256 = "26bbca92b5f7cac4cbde89290b3f801b7a895df76a07493ca6f65c18d5b1154a"
ZIP_SHA256 = "df4e0e355020d2e731932cff86a4b00932b4f193ec7ed513be0db994ec0e71bb"
ZIP_WORKFLOW_NAME = "MiniMax_H3_Continuum_V38x.json"
WORKFLOW_SHA256 = "6c445d62979632bc1a801b1c28dbd639c23b51cc156ebae18837baaa757e592b"
ZIP_SHA256 = "29e8ea19cf7c7e8a8a5e98577905d8fd01fc800bb8edb4f4218a638fe39e69d0"
ZIP_WORKFLOW_NAME = "MiniMax_H3_Continuum_V38X2.json"
EXTERNAL_PACKAGES = {
"comfyui-spectrum-minimax-h3",
"rgthree-comfy",
@@ -53,8 +53,8 @@ def _graph(workflow: dict) -> tuple[dict[int, dict], dict[int, list]]:
def test_v38_public_workflow_declares_external_dependencies_and_is_reloadable():
workflow = _workflow()
assert len(workflow["nodes"]) == 30
assert len(workflow["links"]) == 36
assert len(workflow["nodes"]) == 32
assert len(workflow["links"]) == 38
packages = {
node.get("properties", {}).get("cnr_id") for node in workflow["nodes"]
} - {None, "", "comfy-core"}
@@ -83,6 +83,20 @@ def test_v38_public_workflow_and_zip_preserve_supplied_bytes():
assert archive.read(ZIP_WORKFLOW_NAME) == payload
def test_v38x2_official_names_are_the_same_graph_with_matching_zips():
standard_payload = WORKFLOW_PATH.read_bytes()
explicit_path = WORKFLOW_PATH.with_name(
"MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json"
)
assert explicit_path.read_bytes() == standard_payload
for workflow_path in (WORKFLOW_PATH, explicit_path):
archive_path = workflow_path.with_suffix(".zip")
with ZipFile(archive_path) as archive:
assert archive.namelist() == [workflow_path.name]
assert archive.testzip() is None
assert archive.read(workflow_path.name) == standard_payload
def test_v38_public_workflow_preserves_sampler_widget_positions():
workflow = _workflow()
sampler = _one_node(workflow, "H3ContinuumSamplerV38")
@@ -122,17 +136,17 @@ def test_v38_public_workflow_preserves_sampler_widget_positions():
assert sampler["widgets_values"] == [
sampler["widgets_values_named"][name] for name in names
]
assert sampler["widgets_values_named"]["generation_mode"] == "Full Run"
assert sampler["widgets_values_named"]["generation_mode"] == "Review Each Chunk"
assert sampler["widgets_values_named"]["review_action"] == "Continue / Next"
assert sampler["widgets_values_named"]["run_storage"] == "Off"
assert sampler["widgets_values_named"]["run_storage"] == "Save + Auto Resume"
assert sampler["widgets_values_named"]["aspect"] == "Auto from First Image"
assert sampler["widgets_values_named"]["preset"] == "Draft — 0.30 MP"
assert sampler["widgets_values_named"]["size_source"] == "First Image"
assert sampler["widgets_values_named"]["width"] == 448
assert sampler["widgets_values_named"]["height"] == 672
assert sampler["widgets_values_named"]["chunks"] == 1
assert sampler["widgets_values_named"]["width"] == 480
assert sampler["widgets_values_named"]["height"] == 640
assert sampler["widgets_values_named"]["chunks"] == 2
assert sampler["widgets_values_named"]["chunk_seconds"] == 10
assert sampler["widgets_values_named"]["control_after_generate"] == "randomize"
assert sampler["widgets_values_named"]["control_after_generate"] == "fixed"
assert sampler["widgets_values_named"]["continuation_backend"] == "Standard"
@@ -152,6 +166,7 @@ def test_v38_public_workflow_keeps_required_and_optional_connections():
"audio_vae",
"reference_video_1",
"audio_references",
"image_references",
}
assert required | optional <= set(inputs)
assert all(inputs[name]["link"] is not None for name in required | optional)
@@ -176,6 +191,7 @@ def test_v38_public_workflow_keeps_required_and_optional_connections():
assert source_modes["driving_audio"] == 4
assert source_modes["reference_video_1"] == 4
assert source_types["audio_references"] == "H3ContinuumReferenceAudios"
assert source_types["image_references"] == "H3ContinuumReferenceImages"
def test_v38_public_workflow_preserves_accelerator_defaults_and_model_chain():
@@ -193,7 +209,7 @@ def test_v38_public_workflow_preserves_accelerator_defaults_and_model_chain():
lora = source(spectrum, "model")
assert lora["type"] == "Power Lora Loader (rgthree)"
loras = [item for item in lora["widgets_values"] if isinstance(item, dict) and "lora" in item]
assert len(loras) == 4
assert len(loras) == 5
assert all(item["on"] is False for item in loras)
sage = source(lora, "model")
assert sage["type"] == "MiniMaxH3MemoryEfficientSageAttentionPatch"
@@ -204,7 +220,7 @@ def test_v38_public_workflow_preserves_accelerator_defaults_and_model_chain():
assert source(scheduler, "model")["id"] == spectrum["id"]
def test_v38_public_workflow_keeps_decode_finalize_create_save_chain():
def test_v38x2_public_workflow_keeps_helper_finalize_create_save_chain():
workflow = _workflow()
nodes, links = _graph(workflow)
save = _one_node(workflow, "SaveVideo")
@@ -215,7 +231,15 @@ def test_v38_public_workflow_keeps_decode_finalize_create_save_chain():
finalize = _one_node(workflow, "H3ContinuumAssembleSeamV35")
assert [links[item["link"]][1] for item in create["inputs"][:2]] == [finalize["id"]] * 2
incoming = [nodes[links[item["link"]][1]]["type"] for item in finalize["inputs"][:3]]
assert incoming == ["VAEDecode", "VAEDecodeAudio", "H3ContinuumSamplerV38"]
for node_type in ("VAEDecode", "VAEDecodeAudio"):
decode = _one_node(workflow, node_type)
assert nodes[links[decode["inputs"][0]["link"]][1]]["type"] == "H3ContinuumSamplerV38"
assert incoming == ["H3DecodeCacheHelper", "H3DecodeCacheHelper", "H3ContinuumSamplerV38"]
helper = _one_node(workflow, "H3DecodeCacheHelper")
helper_sources = {
item["name"]: nodes[links[item["link"]][1]]["type"]
for item in helper["inputs"]
}
assert helper_sources == {
"video_samples": "H3ContinuumSamplerV38",
"video_vae": "VAELoader",
"audio_samples": "H3ContinuumSamplerV38",
"audio_vae": "VAELoader",
}
+2 -2
View File
@@ -87,8 +87,8 @@ def test_current_v38_public_schema_is_preserved_exactly():
)
)
assert tuple(v38["required"]) == tuple(expected_required)
assert list(v38["optional"])[:-1] == list(v37["optional"])
assert list(v38["optional"])[-1] == "audio_references"
assert list(v38["optional"])[:-2] == list(v37["optional"])
assert list(v38["optional"])[-2:] == ["audio_references", "image_references"]
assert v38["optional"]["audio_references"][0] == (
"H3_CONTINUUM_AUDIO_REFERENCES"
)
+2 -2
View File
@@ -201,8 +201,8 @@ def test_v38_schema_keeps_legacy_aspect_and_appends_size_source_contract():
"the normal choice for T2VA or workflows without a First Image."
),
}
assert list(v38["optional"])[:-1] == list(v37["optional"])
assert list(v38["optional"])[-1] == "audio_references"
assert list(v38["optional"])[:-2] == list(v37["optional"])
assert list(v38["optional"])[-2:] == ["audio_references", "image_references"]
assert v38["optional"]["audio_references"][0] == (
"H3_CONTINUUM_AUDIO_REFERENCES"
)
@@ -0,0 +1,60 @@
from __future__ import annotations
import hashlib
import json
from pathlib import Path
from ComfyUI_H3_Continuum_Join import nodes as continuum_nodes
ROOT = Path(__file__).resolve().parents[1]
WORKFLOW = ROOT / "examples/workflows/MiniMax_H3_Continuum_V38X2.json"
def test_builtin_helper_preserves_public_node_contract():
helper = continuum_nodes.NODE_CLASS_MAPPINGS["H3DecodeCacheHelper"]
assert continuum_nodes.NODE_DISPLAY_NAME_MAPPINGS["H3DecodeCacheHelper"] == "Decode Cache Helper"
assert helper.RETURN_TYPES == ("IMAGE", "AUDIO", "STRING")
assert helper.RETURN_NAMES == ("images", "audio", "report")
assert helper.INPUT_IS_LIST is True
assert helper.OUTPUT_IS_LIST == (True, True, False)
assert helper.CATEGORY == "MiniMax H3/Continuum/Helpers"
assert list(helper.INPUT_TYPES()["required"]) == [
"cache_mode", "ram_budget_mb", "disk_budget_gb", "reset_token"
]
required = helper.INPUT_TYPES()["required"]
assert required["cache_mode"][1]["default"] == "Auto"
assert required["ram_budget_mb"][1]["default"] == 256
assert required["disk_budget_gb"][1]["default"] == 8
assert required["reset_token"][1]["default"] == 0
assert required["reset_token"][0] == "INT"
def test_supplied_workflow_is_preserved_and_routes_through_builtin_helper():
payload = WORKFLOW.read_bytes()
assert hashlib.sha256(payload).hexdigest().upper() == (
"6C445D62979632BC1A801B1C28DBD639C23B51CC156EBAE18837BAAA757E592B"
)
workflow = json.loads(payload)
nodes = {node["id"]: node for node in workflow["nodes"]}
assert nodes[312]["type"] == "H3ContinuumSamplerV38"
assert nodes[344]["type"] == "H3DecodeCacheHelper"
assert nodes[306]["type"] == "H3ContinuumAssembleSeamV35"
assert nodes[344]["widgets_values"] == ["Auto", 256, 8, 0]
links = {(link[1], link[2], link[3], link[4], link[5]) for link in workflow["links"]}
assert (312, 0, 344, 0, "LATENT") in links
assert (312, 1, 344, 2, "LATENT") in links
assert (344, 0, 306, 0, "IMAGE") in links
assert (344, 1, 306, 1, "AUDIO") in links
assert (312, 2, 306, 2, "H3_CONTINUUM_ASSEMBLY_PLAN") in links
assert not any(node["type"] in {"VAEDecode", "VAEDecodeAudio"} for node in workflow["nodes"])
def test_sampler_and_finalize_remain_separate_and_core_direct_workflow_remains():
assert "H3ContinuumSamplerV38" in continuum_nodes.NODE_CLASS_MAPPINGS
assert "H3ContinuumAssembleSeamV35" in continuum_nodes.NODE_CLASS_MAPPINGS
core = json.loads(
(ROOT / "examples/workflows/MiniMax_H3_Continuum_V38x.json").read_text(encoding="utf-8")
)
types = {node["type"] for node in core["nodes"]}
assert {"VAEDecode", "VAEDecodeAudio", "H3ContinuumAssembleSeamV35"} <= types
+4 -2
View File
@@ -11,11 +11,13 @@ from pathlib import Path
EXPECTED_PUBLIC_NODE_DISPLAY_NAMES = {
"H3ContinuumSamplerV38": "H3 Continuum Sampler V3.8",
"H3ContinuumReferenceAudios": "H3 Continuum Reference Audios",
"H3ContinuumReferenceImages": "H3 Continuum Reference Images",
"H3ContinuumAssembleSeamV35": "H3 Continuum Finalize",
"H3EasyLoadImage": "H3 Continuum Load Image",
"H3EasyLoadAudio": "H3 Continuum Load Audio",
"H3ContinuumLoadVideo": "H3 Continuum Load Video",
"H3ContinuumSecondPassV35": "H3 Continuum Second Pass",
"H3DecodeCacheHelper": "Decode Cache Helper",
}
@@ -35,7 +37,7 @@ def load_package(root: Path):
def public_registration_issues(module) -> list[str]:
"""Return exact public-surface differences for the installed V3.8 package."""
"""Return exact public-surface differences for the installed V3.8X2 package."""
expected = EXPECTED_PUBLIC_NODE_DISPLAY_NAMES
actual_classes = set(getattr(module, "NODE_CLASS_MAPPINGS", {}))
@@ -107,7 +109,7 @@ def main() -> int:
registration_issues = public_registration_issues(module)
if registration_issues:
print("H3 Continuum V3.8 public-node verification FAILED:")
print("H3 Continuum V3.8X2 public-node verification FAILED:")
for issue in registration_issues:
print(f" - {issue}")
return 1
+6 -1
View File
@@ -7,7 +7,11 @@ from typing import Any
import torch
from ..constants import CONTINUITY_FRAMES, V2_CONTINUITY_AUTO
from ..constants import (
CONTINUITY_FRAMES,
V2_CONTINUITY_AUTO,
normalize_continuity_mode,
)
from ..state import validate_state
# Conservative defaults. Borderline values intentionally fall back to 22 frames.
@@ -30,6 +34,7 @@ def latent_motion_score(state: dict[str, Any]) -> float:
def choose_context_frames(mode: str, state: dict[str, Any]) -> tuple[int, float, str]:
mode = normalize_continuity_mode(mode)
state = validate_state(state)
capacity = int(state["capacity_frames"])
score = latent_motion_score(state)
+18 -5
View File
@@ -13,6 +13,7 @@ from ..constants import (
DIAGNOSTICS_FULL,
DIAGNOSTICS_OFF,
FPS,
normalize_continuity_mode,
normalize_diagnostics_mode,
)
from ..driving_audio import prepare_driving_audio_source
@@ -26,6 +27,7 @@ from ..reference_video import (
REFERENCE_VIDEO_SIZE_EFFICIENT,
REFERENCE_VIDEO_SIZE_OPTIONS,
)
from ..reference import H3ContinuumReferenceImages, REFERENCE_IMAGES_TYPE
from ..reference_audio import (
H3ContinuumReferenceAudios,
REFERENCE_AUDIOS_TYPE,
@@ -284,7 +286,7 @@ class H3ContinuumSamplerV35(H3ContinuumSamplerV34):
optional["reference_audio_1"] = (
"AUDIO",
{
"display_name": "Reference Audio (Optional)",
"display_name": "Reference Audio (Legacy)",
"tooltip": (
"Optional standalone audio reference for H3 conditioning. "
"It is not the audio track of Video Guide Frames. Unlike Driving "
@@ -295,7 +297,7 @@ class H3ContinuumSamplerV35(H3ContinuumSamplerV34):
optional["reference_audio_vae"] = (
"VAE",
{
"display_name": "Reference Audio VAE (Optional)",
"display_name": "Reference Audio VAE (Legacy)",
"tooltip": (
"Required only when Reference Audio is connected. It encodes the "
"reference for H3 conditioning; generated audio remains the output."
@@ -415,7 +417,9 @@ class H3ContinuumSamplerV36(H3ContinuumSamplerV35):
audio_continuity = kwargs.get("audio_continuity")
if audio_continuity is None:
audio_continuity = True
continuity = kwargs.get("continuity", _V36_BALANCED_CONTINUITY)
continuity = normalize_continuity_mode(
kwargs.get("continuity", _V36_BALANCED_CONTINUITY)
)
transport, fallback_reason = _resolve_v36_continuation_transport(
continuation_backend=continuation_backend,
audio_continuity=audio_continuity,
@@ -684,13 +688,18 @@ class H3ContinuumSamplerV38(H3ContinuumSamplerV37):
optional["audio_references"] = (
REFERENCE_AUDIOS_TYPE,
{
"display_name": "Audio References (Optional)",
"display_name": "Reference Audios (Optional)",
"tooltip": (
"Optional ordered bundle from H3 Continuum Reference Audios. "
"Do not connect it together with the legacy single Reference Audio input."
),
},
)
optional["image_references"] = (
REFERENCE_IMAGES_TYPE,
{"display_name": "Reference Images (Optional)",
"tooltip": "Optional Reference Images 4–9 from H3 Continuum Reference Images. Existing slots 1–3 remain first."},
)
schema["optional"] = optional
return schema
@@ -843,12 +852,14 @@ class H3ContinuumSamplerV38MemoryPolicyExperimental(H3ContinuumSamplerV38):
REFERENCE_VIDEO_SIZE_EFFICIENT,
)
),
has_reference_images=any(
has_reference_images=kwargs.get("image_references") is not None or any(
kwargs.get(name) is not None
for name in (
"reference_image_1",
"reference_image_2",
"reference_image_3",
"reference_image_4",
"reference_image_5",
)
),
has_video_guide=kwargs.get("reference_video_1") is not None,
@@ -1054,6 +1065,7 @@ NODE_CLASS_MAPPINGS = {
"H3ContinuumSamplerV37": H3ContinuumSamplerV37,
"H3ContinuumSamplerV38": H3ContinuumSamplerV38,
"H3ContinuumReferenceAudios": H3ContinuumReferenceAudios,
"H3ContinuumReferenceImages": H3ContinuumReferenceImages,
"H3ContinuumMemoryActionPolicyExperimental": (
H3ContinuumMemoryActionPolicyExperimental
),
@@ -1072,6 +1084,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"H3ContinuumSamplerV37": "H3 Continuum Sampler V3.7",
"H3ContinuumSamplerV38": "H3 Continuum Sampler V3.8",
"H3ContinuumReferenceAudios": "H3 Continuum Reference Audios",
"H3ContinuumReferenceImages": "H3 Continuum Reference Images",
"H3ContinuumMemoryActionPolicyExperimental": (
"H3 Continuum Memory Action Policy (Experimental)"
),
+6 -1
View File
@@ -12,6 +12,8 @@ from dataclasses import dataclass
from types import MappingProxyType
from typing import Any
from ..reference import resolve_reference_image_inputs
@dataclass(frozen=True)
class RuntimeRequest:
@@ -137,10 +139,13 @@ def execute_v38_runtime_request(
output_width=request.resolution.width,
output_height=request.resolution.height,
chunk_seconds=float(inputs["chunk_seconds"]),
reference_images=(
reference_images=resolve_reference_image_inputs(
inputs.get("reference_image_1"),
inputs.get("reference_image_2"),
inputs.get("reference_image_3"),
inputs.get("reference_image_4"),
inputs.get("reference_image_5"),
inputs.get("image_references"),
),
reference_size=str(inputs.get("reference_size", "Match Output")),
video_guide=inputs.get("reference_video_1"),
+8 -2
View File
@@ -1024,6 +1024,9 @@ class H3ContinuumSamplerProduction(H3ContinuumSamplerV3):
take_action="Automatic",
_diagnostic_continuation_policy=None,
audio_references=None,
reference_image_4=None,
reference_image_5=None,
image_references=None,
):
runtime_started_at = time.perf_counter()
from ..reference import prepare_reference_assets
@@ -1050,8 +1053,11 @@ class H3ContinuumSamplerProduction(H3ContinuumSamplerV3):
output_width=int(width),
output_height=int(height),
size_mode=reference_size,
reference_image_3=reference_image_3,
)
reference_image_3=reference_image_3,
reference_image_4=reference_image_4,
reference_image_5=reference_image_5,
image_references=image_references,
)
reference_audio_source, resolved_reference_audio_vae = resolve_reference_audio_input(
reference_audio_1,
reference_audio_vae,
+1 -1
View File
@@ -1,6 +1,6 @@
"""Package version and public schema identifiers."""
PACKAGE_VERSION = "3.8.2"
PACKAGE_VERSION = "3.8.3"
STATE_SCHEMA_VERSION = 1
PLAN_SCHEMA_VERSION = 1
PUBLIC_API_VERSION = 3
+78
View File
@@ -0,0 +1,78 @@
import { app } from "../../scripts/app.js";
const NODE_CLASS = "H3DecodeCacheHelper";
const MAX_TOKEN = 2147483647;
const BUTTON_NAME = "キャッシュをクリア";
const TOOLTIP = "次回QueueでこのHelperのキャッシュを破棄します。次回は通常Decodeとなります。普段は操作不要です。";
// Keep the backend widget in its original position. Only its presentation is
// hidden; Core still serializes and sends reset_token as an INT.
function hideToken(widget) {
widget.hidden = true;
widget.options ||= {};
widget.options.hidden = true;
widget.type = "converted-widget";
widget.computeSize = () => [0, -4];
}
function withoutButton(node, button, operation) {
const index = node.widgets?.indexOf(button) ?? -1;
if (index >= 0) node.widgets.splice(index, 1);
try {
return operation();
} finally {
if (index >= 0) node.widgets.splice(index, 0, button);
}
}
export function configureDecodeCacheHelper(node) {
if (node?.comfyClass !== NODE_CLASS && node?.type !== NODE_CLASS) return;
const token = node.widgets?.find((widget) => widget.name === "reset_token");
if (!token || typeof node.addWidget !== "function") return;
if (!node.__h3DecodeCacheClearButton) {
// Create the control before hiding the numeric widget, so a failed
// control installation leaves the traditional input available.
const button = node.addWidget("button", BUTTON_NAME, null, () => {
const current = node.widgets?.find((widget) => widget.name === "reset_token");
if (!current) return;
const value = Number(current.value);
if (!Number.isInteger(value) || value < 0 || value > MAX_TOKEN) return;
// Wrap only at the backend's INT limit; never submit an invalid INT.
current.value = value === MAX_TOKEN ? 0 : value + 1;
node.setDirtyCanvas?.(true, true);
}, { serialize: false });
button.serialize = false;
button.options ||= {};
button.options.serialize = false;
button.tooltip = TOOLTIP;
node.__h3DecodeCacheClearButton = button;
// Some frontend versions assign widgets_values by index even for
// non-serialized controls. Exclude the button from both operations.
const serialize = node.serialize;
if (typeof serialize === "function") {
node.serialize = function (...args) {
return withoutButton(this, button, () => serialize.apply(this, args));
};
}
const configure = node.configure;
if (typeof configure === "function") {
node.configure = function (...args) {
const result = withoutButton(this, button, () => configure.apply(this, args));
configureDecodeCacheHelper(this);
return result;
};
}
}
hideToken(token);
node.setDirtyCanvas?.(true, true);
}
app.registerExtension({
name: "H3Continuum.DecodeCacheHelper.ClearButton",
nodeCreated: configureDecodeCacheHelper,
loadedGraphNode: configureDecodeCacheHelper,
afterConfigureGraph() {
for (const node of app.graph?._nodes || []) configureDecodeCacheHelper(node);
},
});
+26 -7
View File
@@ -1,6 +1,7 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
import { normalizeReferenceAudioLabels } from "./reference_audio_ui.js";
import { migrateReferenceImageInputs } from "./reference_image_ui.js";
const PRODUCTION_NODE_CLASS = "H3ContinuumSamplerProduction";
const TIMELINE_NODE_CLASS = "H3ContinuumSamplerTimelineVideo";
@@ -341,6 +342,13 @@ function linkedInput(node, names) {
return node.inputs?.some((input) => names.includes(input.name) && input.link != null) ?? false;
}
function removeUnusedLegacyInputs(node) {
if (node.comfyClass !== V38_NODE_CLASS) return;
for (const name of ["guide", "reference_audio_1", "reference_audio_vae"]) {
if (!linkedInput(node, [name])) removeUnusedInput(node, name);
}
}
function activeLinkedInput(node, names) {
const inputs = node.inputs?.filter(
(item) => names.includes(item.name) && item.link != null,
@@ -351,6 +359,11 @@ function activeLinkedInput(node, names) {
const source = app.graph?.getNodeById?.(link.origin_id);
if (!source) return true;
if ([2, 4].includes(Number(source.mode))) return false;
if (source.comfyClass === "H3ContinuumReferenceImages") {
return activeLinkedInput(source, source.inputs.filter(
(item) => /^reference_image_[4-9]$/.test(item.name),
).map((item) => item.name));
}
const enableWidget = source.widgets?.find((widget) => (
[
"Enable Image",
@@ -1214,7 +1227,7 @@ function configureIntuitiveV38Ux(node) {
);
const referenceConnected = activeLinkedInput(
node,
["reference_image_1", "reference_image_2", "reference_image_3"],
["reference_image_1", "reference_image_2", "reference_image_3", "reference_image_4", "reference_image_5", "image_references"],
);
const videoConnected = activeLinkedInput(node, ["reference_video_1"]);
const storageEnabled = findWidget(node, RUN_STORAGE_WIDGET)?.value === "Save + Auto Resume";
@@ -2683,6 +2696,7 @@ function configureConditionalWidgets(node) {
regenerateWidget.__h3ContinuumManualIntentCallback = true;
}
const refresh = () => {
removeUnusedLegacyInputs(node);
const productionView = true;
const storageEnabled = node.comfyClass === V38_NODE_CLASS
? storageWidget?.value === "Save + Auto Resume"
@@ -2696,7 +2710,7 @@ function configureConditionalWidgets(node) {
setWidgetVisible(
findWidget(node, REFERENCE_SIZE_WIDGET),
productionView
&& linkedInput(node, ["reference_image_1", "reference_image_2", "reference_image_3"]),
&& activeLinkedInput(node, ["reference_image_1", "reference_image_2", "reference_image_3", "reference_image_4", "reference_image_5", "image_references"]),
);
setWidgetVisible(
findWidget(node, TIMELINE_SIZE_WIDGET),
@@ -3052,7 +3066,10 @@ function configureNode(node) {
const isV37 = node.comfyClass === V37_NODE_CLASS;
const isV38 = node.comfyClass === V38_NODE_CLASS;
if (!isProduction && !isTimeline && !isV34 && !isV35 && !isV36 && !isV37 && !isV38) {
configureAssembler(node);
if (node.comfyClass === "H3ContinuumReferenceAudios") {
normalizeReferenceAudioLabels(node);
}
configureAssembler(node);
return null;
}
const projectWidget = findWidget(node, PROJECT_WIDGET);
@@ -3066,7 +3083,8 @@ function configureNode(node) {
if (isV35 || isV36 || isV37 || isV38) {
normalizeReferenceAudioLabels(node);
}
hidePersistentWidget(findWidget(node, "diagnostics"));
removeUnusedLegacyInputs(node);
hidePersistentWidget(findWidget(node, "diagnostics"));
hidePersistentWidget(findWidget(node, "strict_compatibility"));
hidePersistentWidget(findWidget(node, "debug"));
hidePersistentWidget(findWidget(node, "show_preview"));
@@ -3146,9 +3164,10 @@ app.registerExtension({
configureNodeAfterSetup(node);
},
afterConfigureGraph() {
for (const node of app.graph?._nodes || []) {
configureNodeAfterSetup(node);
afterConfigureGraph() {
for (const node of [...(app.graph?._nodes || [])]) {
migrateReferenceImageInputs(node);
configureNodeAfterSetup(node);
}
},
+11 -5
View File
@@ -2,14 +2,20 @@ const NORMALIZED_INPUT_LABELS = {
reference_video_1: "Video Guide Frames",
driving_audio: "Driving Audio",
audio_vae: "Driving Audio VAE",
reference_audio_1: "Reference Audio (Optional)",
reference_audio_vae: "Reference Audio VAE (Optional)",
audio_references: "Reference Audios (Optional)",
reference_audio_1: "Reference Audio (Legacy)",
reference_audio_vae: "Reference Audio VAE (Legacy)",
};
export function normalizeReferenceAudioLabels(node) {
if (!node) {
return false;
}
if (!node) {
return false;
}
if (node.comfyClass === "H3ContinuumReferenceAudios") {
const output = node.outputs?.find((item) => item.name === "audio_references");
if (output) output.label = "Reference Audios";
return true;
}
for (const input of node.inputs || []) {
const label = NORMALIZED_INPUT_LABELS[input.name];
if (label) {
+71
View File
@@ -0,0 +1,71 @@
import { app } from "../../scripts/app.js";
const BUNDLE_NODE = "H3ContinuumReferenceImages";
const BUNDLE_INPUT = "image_references";
const BUNDLE_TYPE = "H3_CONTINUUM_IMAGE_REFERENCES";
export function migrateReferenceImageInputs(node) {
if (node.comfyClass !== "H3ContinuumSamplerV38") return;
const graph = node.graph || app.graph;
const legacy = (node.inputs || []).filter(
(input) => ["reference_image_4", "reference_image_5"].includes(input.name),
);
if (!node.inputs?.some((input) => input.name === BUNDLE_INPUT)) {
node.addInput(BUNDLE_INPUT, BUNDLE_TYPE, { label: "Reference Images (Optional)" });
}
if (!legacy.length) return;
const connected = legacy.filter((input) => input.link != null);
const bundleSlot = node.inputs.findIndex((input) => input.name === BUNDLE_INPUT);
const bundleLink = graph.links[node.inputs[bundleSlot].link];
let bundle = bundleLink && graph.getNodeById(bundleLink.origin_id);
if (connected.length) {
const sources = connected.map((input) => {
const link = graph.links[input.link];
const source = link && graph.getNodeById(link.origin_id);
return { input, link, source };
});
if (sources.some(({ source }) => !source)
|| (bundleLink && bundle?.comfyClass !== BUNDLE_NODE)) {
console.warn("H3 Continuum: legacy Reference Image links retained; their source or bundle cannot be migrated.");
return;
}
if (bundle && connected.some((input) => {
const slot = bundle.inputs.find((item) => item.name === input.name);
return !slot || slot.link != null;
})) {
console.warn("H3 Continuum: legacy Reference Image links retained; the matching bundle slots are occupied.");
return;
}
if (!bundle) {
bundle = globalThis.LiteGraph?.createNode(BUNDLE_NODE);
if (!bundle) {
console.warn("H3 Continuum: legacy Reference Image links retained; the Reference Images node is unavailable.");
return;
}
bundle.pos = [node.pos[0] - 360, node.pos[1] + 220];
graph.add(bundle);
bundle.connect(0, node, bundleSlot);
if (node.inputs[bundleSlot].link == null) {
graph.remove(bundle);
console.warn("H3 Continuum: legacy Reference Image links retained; bundle connection failed.");
return;
}
}
for (const { input, link, source } of sources) {
const slot = bundle.inputs.findIndex((item) => item.name === input.name);
source.connect(link.origin_slot, bundle, slot);
const moved = graph.links[bundle.inputs[slot].link];
if (!moved || moved.origin_id !== link.origin_id || moved.origin_slot !== link.origin_slot) {
console.warn("H3 Continuum: legacy Reference Image link retained; image connection failed.");
continue;
}
node.removeInput(node.inputs.indexOf(input));
}
}
for (const input of legacy) {
const slot = node.inputs.indexOf(input);
if (slot >= 0 && input.link == null) node.removeInput(slot);
}
node.setDirtyCanvas?.(true, true);
}