Compare commits

..
86 Commits
Author SHA1 Message Date
chris.dumas 272069e5f1 Update js/reference_image_preprocessor.js 2026-11-18 09:47:16 +00:00
chris.dumas fbf5ef45d6 Update js/reference_image_preprocessor.js 2026-11-18 09:44:37 +00:00
chris.dumas 2272377f61 Update dumas_reference_image_preprocessor.py 2026-11-18 09:22:52 +00:00
chris.dumas ac5a4b4444 Update dumas_reference_image_preprocessor.py 2026-11-18 09:13:24 +00:00
chris.dumas 8a121f66a4 Update js/sequence_prompt_builder.js 2026-11-12 11:50:37 +00:00
chris.dumas d52db16c74 Update js/sequence_prompt_builder.js 2026-11-12 11:01:01 +00:00
chris.dumas d5687ec102 Update js/sequence_prompt_builder.js 2026-11-12 10:51:46 +00:00
chris.dumas 8549283b75 Update js/sequence_prompt_builder.js 2026-11-12 10:39:59 +00:00
chris.dumas 509a1e95dd Update js/sequence_prompt_builder.js 2026-11-12 10:29:02 +00:00
chris.dumas e22decc459 Update js/sequence_prompt_builder.js 2026-11-12 10:18:04 +00:00
chris.dumas 7303f1b0fa Update js/sequence_prompt_builder.js 2026-11-12 10:06:40 +00:00
chris.dumas b55630c00d Restore diffusion refinement after 2D upscale 2026-11-12 09:52:10 +00:00
chris.dumas 02574168c5 Update js/sequence_prompt_builder.js 2026-11-12 09:51:58 +00:00
chris.dumas 23d42a127e Fix 2D upscale tile boundary rounding 2026-11-12 09:25:24 +00:00
chris.dumas 8c0d0cf6e3 Use target dimensions for 2D H3 upscale 2026-11-12 09:10:38 +00:00
chris.dumas 100f17d356 Connect 2D upscaler through H3 parameter output 2026-11-12 09:05:49 +00:00
chris.dumas 6a899bfacb Add DUMAS MiniMax H3 2D spatial upscaler 2026-11-12 08:58:30 +00:00
chris.dumas 1871066185 Fix DUMAS workflow aux_id metadata 2026-11-05 09:02:47 +00:00
chris.dumas f677b7e567 Add FLUX 3 Klein layout outputs to clothing planner 2026-11-04 10:36:37 +00:00
chris.dumas 91c6659306 Recover inventory items from severely malformed VLM JSON 2026-11-03 11:29:44 +00:00
chris.dumas 09529db9d6 Tolerate common malformed VLM inventory JSON 2026-11-03 11:21:29 +00:00
chris.dumas f770609af8 Add deterministic clothing layout planner 2026-11-03 11:04:17 +00:00
chris.dumas 6646ecdfd9 Add editable reference image preprocessor node 2026-11-02 09:02:09 +00:00
chris.dumas 83773470bf Fix pasted multi-shot prompt parsing 2026-10-30 12:03:00 +00:00
chris.dumas c299955a72 Commit pasted sequence timeline state 2026-10-30 11:56:22 +00:00
chris.dumas 999f3a9443 Refresh shot track after prompt paste 2026-10-30 11:37:50 +00:00
chris.dumas 1684c6a849 Use DUMAS Continuum reference bundle class 2026-10-30 11:24:38 +00:00
chris.dumas e6116df914 Restore Continuum image reference inputs 2026-10-30 11:06:44 +00:00
chris.dumas d1e97eecc7 Port Pixaroma resolution editor interactions 2026-10-22 13:07:45 +00:00
chris.dumas 0e6bcc1c20 Fix custom ratio widget rendering 2026-10-22 13:04:59 +00:00
chris.dumas 21fec91a7e Complete custom ratio resolution controls 2026-10-22 13:03:24 +00:00
chris.dumas 70d541513f Add clearance below resolution controls 2026-10-22 13:00:35 +00:00
chris.dumas 3efa92492b Restore resolution widget initialization 2026-10-22 12:59:33 +00:00
chris.dumas acfc45d11d Apply resolution node frame size reliably 2026-10-22 12:58:19 +00:00
chris.dumas c238ecb523 Add ratio shape icons to resolution UI 2026-10-22 12:56:38 +00:00
chris.dumas d5eae12e76 Keep resolution controls inside node frame 2026-10-22 12:54:27 +00:00
chris.dumas 9e2c5d633c Improve DUMAS resolution node UI 2026-10-22 12:52:24 +00:00
chris.dumas 59930bcb69 Add Save Image output sockets 2026-10-22 09:58:24 +00:00
chris.dumas 711db02f17 Fix image compare control overlap 2026-10-22 07:33:36 +00:00
chris.dumas aae38aed61 Fix image compare tensor selection 2026-10-22 07:30:14 +00:00
chris.dumas ccedf06a85 Brand DUMAS video saver as Pixaroma companion 2026-10-21 16:29:00 +00:00
chris.dumas ded55049b0 Add DUMAS external folder video saver 2026-10-21 16:28:54 +00:00
chris.dumas 8e0bf05f08 Add DUMAS resolution picker 2026-10-21 16:21:07 +00:00
chris.dumas bd7568f628 Fix DUMAS V3.9 manual resolution UI 2026-10-21 16:16:23 +00:00
chris.dumas 98014ca936 Adopt Pixaroma image node batch features 2026-10-21 16:11:16 +00:00
chris.dumas 36c4537be7 Adopt Pixaroma save image preview features 2026-10-21 16:08:56 +00:00
chris.dumas 494670ded0 Update vendored H3 Continuum to v3.9.11 2026-10-20 20:21:06 +00:00
chris.dumas c8568633a4 Fix per-clip upscale geometry latent contract 2026-10-20 17:04:53 +00:00
chris.dumas 15d3247fff remove legacy singular refmod UI fallback 2026-10-20 16:27:51 +00:00
chris.dumas 4639ce05c0 route refmods per generated chunk 2026-10-20 16:14:05 +00:00
chris.dumas bacc2db407 filter prompt builder refmods by authored tags 2026-10-20 16:11:50 +00:00
chris.dumas d2fe5579b3 add per-chunk output enable toggles 2026-10-20 16:09:28 +00:00
chris.dumas 6f8fd85405 replace prompt builder image inputs with ordered refmod sockets 2026-10-20 15:53:13 +00:00
chris.dumas 5d41800ffb Fix chained RefMod prompt chips 2026-10-20 15:49:02 +00:00
chris.dumas e45f69ecb8 Add dynamic RefMod prompt chips 2026-10-20 15:42:42 +00:00
chris.dumas 9887511646 Clean V3.9 sampler dimensions and legacy inputs 2026-10-20 15:21:05 +00:00
chris.dumas 1a305e6934 Allow V3.9 sampler to consume RefMods directly 2026-10-20 15:14:08 +00:00
chris.dumas cb9c3f339d Namespace vendored H3 nodes under Dumas 2026-10-20 13:54:56 +00:00
chris.dumas 8445f0e500 Fix vendored H3 package registration 2026-10-20 13:49:16 +00:00
chris.dumas 11b0b11376 Use vendored RefMod creator implementation 2026-10-20 13:45:07 +00:00
chris.dumas ba78f2be9d Vendor complete MiniMax H3 upstream packs 2026-10-20 13:44:50 +00:00
chris.dumas 559178f639 Merge commit 'c9eb575e2fd25f74b15f1d7336af4932c7fe6338' as 'vendor/dumas_h3_refmod_picker' 2026-10-20 13:43:48 +00:00
chris.dumas c9eb575e2f Squashed 'vendor/dumas_h3_refmod_picker/' content from commit c732f8b
git-subtree-dir: vendor/dumas_h3_refmod_picker
git-subtree-split: c732f8b8893bf4f00c6974c9b9941c763496fe48
2026-10-20 13:43:48 +00:00
chris.dumas 509591b0e5 Merge commit '70d0672ee306019c7dba8f799a273ec486bec95b' as 'vendor/dumas_minimax_h3_refmod' 2026-10-20 13:43:44 +00:00
chris.dumas 70d0672ee3 Squashed 'vendor/dumas_minimax_h3_refmod/' content from commit 517e8c4
git-subtree-dir: vendor/dumas_minimax_h3_refmod
git-subtree-split: 517e8c419a8584fbf69fceb487bc39d83e6a6ec8
2026-10-20 13:43:44 +00:00
chris.dumas 4e421e518c Merge commit 'bf8f76505fdd25ea99770f262eb9371509bf226d' as 'vendor/dumas_h3_continuum' 2026-10-20 13:43:38 +00:00
chris.dumas bf8f76505f Squashed 'vendor/dumas_h3_continuum/' content from commit d07ed31
git-subtree-dir: vendor/dumas_h3_continuum
git-subtree-split: d07ed31b442d283d6a1740f875a843b9feda4c91
2026-10-20 13:43:38 +00:00
chris.dumas 70c3e0b472 Expose upstream RefMod creator in DUMAS 2026-10-20 13:39:54 +00:00
chris.dumas e747945ba5 Polish sequence prompt builder reference UI 2026-10-20 13:24:12 +00:00
chris.dumas 506f97ab6c Route RefMods through H3 prompt builder 2026-10-20 13:23:02 +00:00
chris.dumas 944f3d28b4 Add RefMod bridge for H3 Continuum 2026-10-20 13:18:24 +00:00
chris.dumas 7f0e8d8fe4 Add DUMAS H3 RefMod picker 2026-10-20 13:13:50 +00:00
chris.dumas 37abd6e86e Add DUMAS H3 RefMod storage node 2026-10-20 13:05:47 +00:00
chris.dumas d844fff11d Pass nested AV latents to H3 tiled upscale 2026-10-20 12:16:13 +00:00
chris.dumas 0abde05cef Make per-clip H3 upscale a Second Pass replacement 2026-10-20 11:02:23 +00:00
chris.dumas 497bd84e50 Group H3 prompt builder under DUMAS MiniMax namespace 2026-10-20 10:46:28 +00:00
chris.dumas cda7860a59 Add DUMAS MiniMax H3 custom nodes 2026-10-20 10:45:59 +00:00
chris.dumas 65312ad7c4 Support counters in image folder names 2026-10-15 14:59:30 +00:00
chris.dumas a937b7941f Test collision-safe image folders 2026-10-15 14:58:42 +00:00
chris.dumas 873028f783 Avoid overwriting custom image names 2026-10-15 14:57:27 +00:00
chris.dumas 64a8e8a439 Prevent image save counter collisions 2026-10-15 14:51:43 +00:00
chris.dumas 09a340e8f3 Add tiled MiniMax H3 latent upscale node 2026-10-13 15:50:59 +00:00
chris.dumas cfdad89f3e Restore image save previews and metadata 2026-10-12 13:03:45 +00:00
chris.dumas ff7a2df4a4 Document CSGlide project orchestration 2026-10-12 11:14:42 +00:00
chris.dumas b15d89c185 Add continuation tail preparation node 2026-10-12 10:09:54 +00:00
chris.dumas 69d93e685a Add reference-aware no-reencode video joining 2026-10-12 09:05:22 +00:00
622 changed files with 160916 additions and 86 deletions
+280 -16
View File
@@ -1,35 +1,299 @@
# DumasNodes
Generic ComfyUI utility nodes under the Dumas brand. The repository contains
image, JSON and video utilities and intentionally has no model-specific video
sampler dependency.
## Vendored MiniMax H3 packs
## Video nodes
DumasNodes contains complete, license-preserving source copies of the three
upstream packs used by the MiniMax H3 workflow:
- `vendor/dumas_h3_continuum/`
- `vendor/dumas_minimax_h3_refmod/`
- `vendor/dumas_h3_refmod_picker/`
Their registrations and browser extensions are loaded by DUMAS. Every vendored
node is registered with a stable DUMAS-prefixed ID and under a DUMAS category:
- `DumasH3Continuum_*` → `Dumas/MiniMax H3/Continuum`
- `DumasMiniMaxH3RefMod_*` → `Dumas/MiniMax H3/RefMod`
- `DumasH3RefModPicker_*` → `Dumas/MiniMax H3/RefMod Picker`
This prevents the vendored nodes from replacing or colliding with an upstream
node of the same name. Existing workflows that use the upstream IDs are not
silently rewritten; they must continue to use the upstream pack or be
reconnected to the DUMAS nodes. The original packs should still not be loaded
alongside this copy because their server routes can overlap even though the
node IDs are now isolated.
The upstream source is imported as git subtrees, making future reviews and
selective updates possible without losing provenance. DUMAS-specific changes
belong outside `vendor/` unless an upstream implementation is intentionally
being amended.
Generic ComfyUI utility nodes under the Dumas brand. MiniMax H3-specific
nodes are grouped under `Dumas/MiniMax H3/...` so they can be installed
as the self-contained H3 installation; do not install the separate upstream
packs alongside this vendored copy.
## Sequential video assembly
### Dumas Standalone Video
Encodes an IMAGE batch and optional AUDIO into two files:
- `full_clip`: every generated frame, including any continuation overlap
- `complete_clip`: the same clip with `overlap_frames` removed before encoding
The full clip is the source for the next sequential generation. The complete
clip is the assembly-ready segment. Removing the overlap before encoding means
the final join does not need to re-encode an already assembled film.
`DumasStandaloneVideo` saves both the complete generated clip and a full copy.
For a continuation clip, set `reference_frames` to the number of frames taken
from the previous clip for continuity. The value is returned as the final
`reference_frames` output so it can be wired directly into
`DumasJoinVideoClips`.
### Dumas Join Video Clips (No Re-encode)
Accepts up to six completed clip paths and concatenates them with FFmpeg stream
copy (`-c copy`). It validates codec, dimensions, frame rate, pixel format and
audio compatibility before joining. The input clips must already have their
continuation overlap removed.
`DumasJoinVideoClips` accepts one reference-frame input for each clip. It trims
that many frames from the beginning of any clip whose value is greater than
zero, then concatenates the resulting files with FFmpeg stream copy. This
avoids a full re-encode of the assembled video. Clip 1 normally remains at
zero; continuation clips receive the reference-frame output from their
standalone nodes.
Stream-copy trimming is codec/keyframe-aware: the requested boundary is
converted using the clip's frame rate, but a codec may choose the nearest safe
packet boundary. For exact frame cuts, use the existing `complete_clip` output
or accept a re-encoded workflow.
## Project rendering
## MiniMax H3 tiled latent upscale
`DumasMMH3TiledLatentUpscale` is a thin integration node for the native
`MMH3UltimateUpscale` node used by the MiniMax-H3 workflow. It accepts the
native H3 latent-upscale, temporal-split, and spatial-split parameter objects,
but creates a separate upscale sampler, scheduler, sigma schedule, noise seed,
denoise value, steps value, and CFG value. The base H3 sampling pass is not
changed.
Typical wiring:
```text
base H3 latent + model + conditioning
-> Dumas MiniMax-H3 Tiled Latent Upscale
H3 Latent Upscale Params --------------------^
H3 Temporal Split Params ---------------------^
H3 Spatial Split Params -----------------------^
```
The node requires the ComfyUI installation to provide `MMH3UltimateUpscale`,
`RandomNoise`, `KSamplerSelect`, and `BasicScheduler`. It does not copy or
redistribute the third-party H3 LongVideos implementation. The native node's
current socket types are `H3_UPSCALE_PARAM`, `H3_TEMPORAL_PARAM`, and
`H3_SPATIAL_PARAM`; these are deliberately used unchanged for workflow
compatibility.
### MiniMax H3 2D spatial latent upscale
`DumasMMH3LatentUpscale2D` supports the `minimax_h3_latent_upscaler_2d_conv_v1`
checkpoint from [LBH-123-AI](https://huggingface.co/LBH-123-AI/Minimax_h3_latent_Upscaler).
It uses the model's published loader and architecture, but keeps DUMAS ownership
of the node and adds X/Y tiling. The full temporal latent is passed through each
tile; temporal splitting is intentionally not used. Put the checkpoint in
`models/latent_upscale_models`, then set the target `width` and `height` in
pixels. The dimensions are converted to H3 latent dimensions internally. Set
`tile_size` and `tile_overlap` to fit available VRAM.
`DumasMMH3LatentUpscale2DModelParams` is the matching parameter node. Its output
is `latent_upscale_param` with type `H3_UPSCALE_PARAM`, so it connects to the
existing DUMAS Continuum tiled-upscale node in the same place as the native H3
model-parameter node.
### DUMAS H3 Sequence Prompt Builder
`DumasH3SequencePromptBuilder` provides the tabbed, timeline-oriented prompt
editor used for multi-chunk H3 jobs. It emits one absolute sequence prompt,
the chunk count, the shared chunk duration, and a per-chunk reference bundle.
Reference images are inserted as `@R1` through `@R9`; routing is based on the
shared directive, soundscape, music, and each chunk's full prompt text.
The builder exposes nine optional `IMAGE` sockets, labelled `Reference Image 1`
through `Reference Image 9`. Each connected socket occupies the matching `@R`
slot, and the generated Continuum reference bundle contains those images with
per-chunk routing. RefMod inputs and direct RefMod conditioning are deliberately
not part of this node.
The prompt builder intentionally uses the `ReferenceImagesV39Bundle` class
from the installed upstream H3 Continuum pack. Install that pack alongside
DumasNodes; DumasNodes does not copy or replace the upstream reference-image
implementation.
### DUMAS Reference Image Preprocessor
`DumasReferenceImagePreprocessor` keeps a reference `IMAGE` unchanged and
creates an editable `STRING` prompt for a reusable `@R1`–`@R9` reference.
Choose a type (`Character`, `Object`, `Scene`, `Creature`, or `Vehicle`), a
reference ID, and optional additional information. The generated prompt is
shown in a multiline editor and is also emitted as the `reference_prompt`
output. Type and reference-ID changes regenerate the editor; description
changes can be applied with **Regenerate prompt**, preserving manual edits
until regeneration is requested.
The node outputs:
- `image`: the original image tensor, unchanged
- `reference_prompt`: the editable prompt text containing the selected `@R#`
The prompt editor is intended to sit before a normal prompt builder or
Continuum reference-image workflow. It does not encode, resize, crop, or
modify the image.
### DUMAS Clothing Layout Planner
`DumasClothingLayoutPlanner` converts object inventory JSON from a VLM into a
deterministic spatial plan for flat-lay or product-image generation. It accepts
raw JSON or a fenced JSON block, expands quantities into deterministic instance
IDs, treats `unit: "pair"` entries as one region per pair, and supports
`balanced` and `grid` layouts. It is object-agnostic and does not infer or
download anything.
Outputs:
- `layout_prompt`: natural-language region instructions preserving IDs and
original descriptions
- `layout_json`: reusable normalized coordinates and warnings
- `layout_preview`: a diagnostic IMAGE showing the regions and optional labels
Optional FLUX.3 outputs:
- `flux3_prompt`: a complete FLUX.3 scene caption followed by the native
bounding-box JSON array. Connect this to the FLUX.3 Klein prompt input; keep
the workflow's official prompt upsampler in the normal position.
- `flux3_boxes_json`: the same bounding-box array separately for inspection or
downstream processing.
The `output_format` setting selects `legacy`, `flux3`, or `both` (default).
FLUX.3 boxes use `[top, left, bottom, right]` integer coordinates on a 0–1000
top-left-origin grid. Every generated ID is also emitted as `<id>` in the
caption. `flux3_reference_mode=editing` is intentionally rejected until source
coordinates and reference-image identifiers are available; the current VLM
inventory schema supports generation-style layouts only. Bounding boxes guide
placement and scale but are not hard pixel masks.
The planner uses normalized top-left-origin coordinates, configurable margins
and spacing, and rejects malformed or invalid inventory fields with actionable
errors. The preview is diagnostic only; feeding it to an image model does not
guarantee spatial control.
### DUMAS H3 RefMod Save
`DUMAS H3 RefMod Save` accepts the `H3_REF_MODS` bundle produced by the
MiniMax H3 RefMod nodes and adds explicit DUMAS-owned storage policy:
- `Registered RefMods` is the default and saves to ComfyUI's first registered
`refmods` root, preserving normal loader discovery.
- `Input folder` saves beside a server-side source folder supplied through the
`input_folder` socket. Standard IMAGE/VIDEO tensors do not contain their
original filesystem path, so this path must be supplied explicitly.
- `Custom folder` saves to an explicitly supplied server-side folder.
- `Increment filename` is the default collision policy; `Replace` and `Fail`
are also available.
All writes use the RefMod object's atomic save operation. The node reports the
resolved `.safetensors` paths through `saved_paths`. External folders are not
automatically persistent across restarts, but they are registered as RefMod
roots for the current ComfyUI process so the DUMAS picker can discover them.
For persistence across restarts, add the folder to ComfyUI's `refmods` mapping
in `extra_model_paths.yaml`.
### DUMAS H3 RefMod Visual Picker
`DUMAS H3 RefMod Visual Picker` provides a small browser button for selecting
registered RefMod `.safetensors` files. It supports the maintained upstream
loader's standalone and bundle formats, including embedded visual/audio
members, and appends the selected rows to an optional existing `H3_REF_MODS`
bundle. Video and audio weights are independent, and values above 1 repeat a
reference as additional weighted rows, matching the companion add-on's
behaviour. The picker shows matching preview images when present.
The maintained MiniMax H3 RefMod reader must be installed alongside DUMAS;
DUMAS does not duplicate that reader or override its node IDs.
The vendored `DUMAS H3 Continuum · H3 Continuum Sampler V3.9` also exposes an
optional `RefMods (Optional)` socket. Connect the `H3_REF_MODS` output from a
RefMod loader or creator directly to that socket; the sampler clones the model
and attaches the RefMod bridge only for that run. `RefMod Retention` and
`RefMod Token Budget` are available beside the socket, while ordinary image
reference routing remains unchanged. The DUMAS V3.9 surface removes the
duplicated legacy resolution widgets and uses the connected `Width` and
`Height` values as its single manual-dimension source. The separate model
bridge node is still available for V3.8 and other samplers.
### DUMAS H3 RefMods to Continuum
`DUMAS H3 RefMods to Continuum` is the minimal compatibility bridge for the
upstream Continuum sampler. It decodes one visual frame from each selected
RefMod with the H3 video VAE and emits Continuum's native nine-slot V3.9
Reference Images bundle. Continuum then performs its normal resize, VAE encode,
prompt presentation, and physical-group routing.
Connect the sequence prompt and choose `Prompt @R tags` to route each RefMod
only to chunks whose prompt section contains its `@R1`–`@R9` tag. Choose `All
chunks` to provide every decoded visual reference to every chunk. Audio-only
RefMods are skipped because Continuum's image-reference socket is visual-only.
The native image bundle has no per-reference strength field, so picker weights
are intentionally not carried across this compatibility boundary.
This bridge intentionally avoids patching Continuum's internal conditioning
runtime. Direct latent injection would need to alter its per-group reference
contracts, storage fingerprints, and prompt-picture mapping, and would be a
much larger and more fragile fork. The trade-off is one decode followed by
Continuum's normal reference encode; pooled/training RefMods will therefore
retain only the visual information present in their stored latent.
### DUMAS H3 Continuum Tiled Latent Upscale (Per Clip)
`DumasH3ContinuumTiledLatentUpscalePerClip` is a replacement for the upstream
Second Pass when tiled latent upscale is required. It applies the native H3
tiled upscale independently to each physical Continuum clip, passes the
first-pass audio latents through unchanged, and returns the updated assembly
plan plus status. It accepts the Continuum `refine_context` and uses the
upstream refine bridge when no direct conditioning is connected. Its sampler,
scheduler, sigma input, steps, denoise, CFG, and noise seed are separate from
the base generation pass. Connected sockets take precedence over node
defaults. The node preserves one LATENT list item per physical clip to avoid
concatenating a long sequence into one oversized VRAM allocation.
The CSGlide `Render Project` control is the generation orchestrator: it renders
clips sequentially, adopts each completed render, extracts the previous clip's
tail, fills the next clip's `CONTINUE FROM` guide, and waits before advancing.
DumasNodes intentionally remains model-agnostic and handles clean individual
outputs, tail preparation and optional final assembly rather than duplicating
CSGlide's MiniMax generation loop.
### Dumas Prepare Continuation
Give this node the raw output of a continuation generation and its reference
frame count. It produces a clean presentation clip and a `next_reference`
tail clip. Only the tail is intended to feed the next generation; the entire
previous clip is never passed forward as the continuity input.
### Save Video DUMAS
Save an IMAGE batch as an H.264 MP4 in any server-side folder. The folder can
be typed directly or selected with the Browse folder button; leaving it empty
uses ComfyUI's output folder. Filename patterns support nested folders and
`%counter%`, and existing files are never overwritten. Optional audio is
encoded as AAC, and preview mode writes to ComfyUI's temporary directory.
## Other nodes
- Dumas Image Compare
- Emits collision-safe temporary previews for every connected slot while retaining the DUMAS result output for downstream workflows.
- Save Image Dumas
- Saves PNG, JPG, or WebP to the ComfyUI output folder or a selected external folder.
- Uses collision-safe counters for files and nested folders, with batch-safe numbering.
- Preview mode writes temporary images for inspection without touching the destination folder.
- Supports filename chips for inputs, date/time, counter, dimensions, and batch number.
- Load Images from Folder Dumas
- Pixaroma-style folder browser with recursive listing, thumbnail metadata, selected/all/first-N/random modes, date/name sorting, alpha masks, and batch outputs.
- Outputs one list item per selected image, including image, mask, dimensions, filename, index, total, and absolute path.
- Dumas JSON helpers
- DUMAS Resolution
- Pixaroma-inspired ratio and AI-friendly size picker with 1:1, 16:9, 9:16, 2:1, 3:2, 2:3, 4:3, 3:4, and 4:5 presets.
- Includes Custom Ratio, Custom Resolution, 8/16/32/64px snapping, megapixel feedback, batch state, and width/height plus Empty-Latent-compatible outputs.
## Installation
+65 -1
View File
@@ -1,6 +1,7 @@
from .dumas_image_nodes import (
NODE_CLASS_MAPPINGS as IMAGE_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as IMAGE_NODE_DISPLAY_NAME_MAPPINGS,
_next_available_relative_path,
_next_counter_for_relative_path,
_folder_is_image,
_list_folder_image_files,
@@ -14,16 +15,76 @@ from .dumas_video_nodes import (
NODE_CLASS_MAPPINGS as VIDEO_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as VIDEO_NODE_DISPLAY_NAME_MAPPINGS,
)
from .dumas_minimax_nodes import (
NODE_CLASS_MAPPINGS as MINIMAX_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as MINIMAX_NODE_DISPLAY_NAME_MAPPINGS,
)
from .dumas_h3_prompt_nodes import (
NODE_CLASS_MAPPINGS as H3_PROMPT_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as H3_PROMPT_NODE_DISPLAY_NAME_MAPPINGS,
)
from .dumas_reference_image_preprocessor import (
NODE_CLASS_MAPPINGS as REFERENCE_PREPROCESSOR_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as REFERENCE_PREPROCESSOR_DISPLAY_NAME_MAPPINGS,
)
from .dumas_clothing_layout_planner import (
NODE_CLASS_MAPPINGS as CLOTHING_LAYOUT_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as CLOTHING_LAYOUT_DISPLAY_NAME_MAPPINGS,
)
from .dumas_h3_upscale_nodes import (
NODE_CLASS_MAPPINGS as H3_UPSCALE_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as H3_UPSCALE_NODE_DISPLAY_NAME_MAPPINGS,
)
from .dumas_h3_latent_upscale_2d import (
NODE_CLASS_MAPPINGS as H3_UPSCALE_2D_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as H3_UPSCALE_2D_NODE_DISPLAY_NAME_MAPPINGS,
)
from .dumas_h3_refmod_nodes import (
NODE_CLASS_MAPPINGS as H3_REFMOD_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as H3_REFMOD_NODE_DISPLAY_NAME_MAPPINGS,
)
from .dumas_h3_refmod_picker import (
NODE_CLASS_MAPPINGS as H3_REFMOD_PICKER_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as H3_REFMOD_PICKER_NODE_DISPLAY_NAME_MAPPINGS,
)
from .dumas_resolution_nodes import (
NODE_CLASS_MAPPINGS as RESOLUTION_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as RESOLUTION_NODE_DISPLAY_NAME_MAPPINGS,
)
from .dumas_vendored_nodes import (
NODE_CLASS_MAPPINGS as VENDORED_NODE_CLASS_MAPPINGS,
NODE_DISPLAY_NAME_MAPPINGS as VENDORED_NODE_DISPLAY_NAME_MAPPINGS,
)
NODE_CLASS_MAPPINGS = {}
NODE_CLASS_MAPPINGS.update(JSON_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(IMAGE_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(VIDEO_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(MINIMAX_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(H3_PROMPT_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(REFERENCE_PREPROCESSOR_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(CLOTHING_LAYOUT_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(H3_UPSCALE_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(H3_UPSCALE_2D_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(H3_REFMOD_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(H3_REFMOD_PICKER_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(RESOLUTION_NODE_CLASS_MAPPINGS)
NODE_CLASS_MAPPINGS.update(VENDORED_NODE_CLASS_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS.update(JSON_NODE_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(IMAGE_NODE_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(VIDEO_NODE_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(MINIMAX_NODE_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(H3_PROMPT_NODE_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(REFERENCE_PREPROCESSOR_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(CLOTHING_LAYOUT_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(H3_UPSCALE_NODE_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(H3_UPSCALE_2D_NODE_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(H3_REFMOD_NODE_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(H3_REFMOD_PICKER_NODE_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(RESOLUTION_NODE_DISPLAY_NAME_MAPPINGS)
NODE_DISPLAY_NAME_MAPPINGS.update(VENDORED_NODE_DISPLAY_NAME_MAPPINGS)
WEB_DIRECTORY = "./js"
@@ -129,7 +190,10 @@ try:
return 1, ""
relative_template = "/".join(parts)
counter = _next_counter_for_relative_path(base, relative_template)
resolved_relative = relative_template.replace("%counter%", str(counter).zfill(digits))
if "%counter%" in relative_template:
resolved_relative = relative_template.replace("%counter%", str(counter).zfill(digits))
else:
resolved_relative = _next_available_relative_path(base, relative_template)
return counter, resolved_relative
try:
+516
View File
@@ -0,0 +1,516 @@
"""Deterministic, object-agnostic inventory layout planning for ComfyUI."""
from __future__ import annotations
import json
import math
import re
from typing import Any
SIZE_WEIGHTS = {"small": 1.0, "medium": 2.0, "large": 3.0}
ASPECT_RATIOS = {"portrait": 0.7, "landscape": 1.5, "square": 1.0}
DEFAULT_BACKGROUND = "#EEE8DC"
VALID_UNITS = {"item", "pair"}
VALID_SIZES = set(SIZE_WEIGHTS)
VALID_ASPECTS = set(ASPECT_RATIOS)
def _bounded_number(value: Any, name: str, minimum: float, maximum: float) -> float:
try:
number = float(value)
except (TypeError, ValueError) as exc:
raise ValueError(f"{name} must be a number between {minimum} and {maximum}") from exc
if not minimum <= number <= maximum:
raise ValueError(f"{name} must be between {minimum} and {maximum}")
return number
def _positive_integer(value: Any, name: str) -> int:
try:
number = int(value)
except (TypeError, ValueError) as exc:
raise ValueError(f"{name} must be a positive integer") from exc
if number < 1:
raise ValueError(f"{name} must be a positive integer")
return number
def _parse_json(inventory_json: str) -> dict[str, Any]:
text = str(inventory_json or "").strip()
fenced = re.fullmatch(r"```(?:json)?\s*(.*?)\s*```", text, re.IGNORECASE | re.DOTALL)
if fenced:
text = fenced.group(1).strip()
if not text:
raise ValueError("inventory_json is empty; provide a JSON object containing an items list")
try:
value = json.loads(text)
except json.JSONDecodeError as exc:
repaired = _repair_vlm_json(text)
if repaired is None:
salvaged = _salvage_inventory(text)
if salvaged is not None:
return {"items": salvaged}
raise ValueError(
f"inventory_json is invalid JSON at line {exc.lineno}, column {exc.colno}: {exc.msg}. "
"Check that the VLM returned a complete JSON object with quoted strings."
) from exc
try:
value = json.loads(repaired)
except json.JSONDecodeError as repaired_exc:
salvaged = _salvage_inventory(text)
if salvaged is not None:
return {"items": salvaged}
raise ValueError(
f"inventory_json is invalid JSON at line {exc.lineno}, column {exc.colno}: {exc.msg}. "
f"Automatic VLM repair also failed at line {repaired_exc.lineno}, column {repaired_exc.colno}."
) from exc
if not isinstance(value, dict):
raise ValueError("inventory_json must be a JSON object with an 'items' list")
items = value.get("items", [])
if not isinstance(items, list):
raise ValueError("inventory_json.items must be a list")
return value
def _salvage_inventory(text: str) -> list[dict[str, Any]] | None:
"""Extract schema fields from item objects when one VLM string is broken."""
starts = [match.start() for match in re.finditer(r'\{\s*"id"\s*:', text)]
if not starts:
return None
items: list[dict[str, Any]] = []
fields = ("id", "name", "quantity", "unit", "size", "aspect_ratio", "description")
for index, start in enumerate(starts):
chunk = text[start:starts[index + 1] if index + 1 < len(starts) else len(text)]
item: dict[str, Any] = {}
for field in fields[:-1]:
match = re.search(rf'"{field}"\s*:\s*(?:"([^"\\]*(?:\\.[^"\\]*)*)"|(-?\d+))', chunk, re.DOTALL)
if not match:
continue
raw = match.group(1) if match.group(1) is not None else match.group(2)
if field == "quantity":
item[field] = int(raw)
else:
try:
item[field] = json.loads(f'"{raw}"')
except json.JSONDecodeError:
item[field] = raw
description_marker = re.search(r'"description"\s*:\s*"', chunk, re.DOTALL)
if description_marker:
tail = chunk[description_marker.end():]
next_field = re.search(r',\s*"(?:id|name|quantity|unit|size|aspect_ratio)"\s*:', tail, re.DOTALL)
if next_field:
tail = tail[:next_field.start()]
tail = tail.strip()
# Description is the final accepted field. Remove only structural
# suffixes; leave an incomplete final sentence intact.
tail = re.sub(r'\s*[,}\]]+\s*$', "", tail)
if tail.endswith('"'):
tail = tail[:-1]
item["description"] = tail.replace('\\n', '\n').replace('\\"', '"').strip()
if item.get("id") and item.get("name"):
items.append(item)
return items or None
def _repair_vlm_json(text: str) -> str | None:
"""Repair only safe, common VLM JSON damage.
VLMs frequently emit literal newlines in descriptions, leave a quote
unescaped inside prose, or stop before writing the final closing braces.
This scanner repairs those cases without changing field names or values.
It deliberately does not guess missing commas, keys, or inventory items.
"""
start = text.find("{")
if start < 0:
return None
source = text[start:]
output: list[str] = []
stack: list[str] = []
in_string = False
escaped = False
root_closed = False
index = 0
while index < len(source):
char = source[index]
if root_closed:
index += 1
continue
if in_string:
if escaped:
output.append(char)
escaped = False
elif char == "\\":
output.append(char)
escaped = True
elif char == '"':
lookahead = index + 1
while lookahead < len(source) and source[lookahead].isspace():
lookahead += 1
# A quote followed by normal prose is part of a VLM string;
# JSON string terminators are followed by structure.
if lookahead == len(source) or source[lookahead] in ",]}:":
output.append(char)
in_string = False
else:
output.append('\\"')
elif char in "\r\n":
output.append("\\n")
elif ord(char) < 32:
output.append(f"\\u{ord(char):04x}")
else:
output.append(char)
else:
if char == '"':
in_string = True
output.append(char)
elif char in "[{":
stack.append(char)
output.append(char)
elif char in "]}":
if stack and ((char == "]" and stack[-1] == "[") or (char == "}" and stack[-1] == "{")):
stack.pop()
output.append(char)
if not stack:
root_closed = True
else:
# Ignore trailing prose or an unmatched closing token.
pass
else:
output.append(char)
index += 1
if in_string:
output.append('"')
while stack:
output.append("]" if stack.pop() == "[" else "}")
repaired = re.sub(r",\s*([}\]])", r"\1", "".join(output)).strip()
return repaired if repaired.startswith("{") else None
def normalize_inventory(inventory_json: str) -> list[dict[str, Any]]:
"""Parse and validate inventory entries without inventing entries."""
raw_items = _parse_json(inventory_json).get("items", [])
normalized = []
seen_ids: set[str] = set()
for index, raw in enumerate(raw_items, 1):
if not isinstance(raw, dict):
raise ValueError(f"items[{index - 1}] must be an object")
item_id = str(raw.get("id", "")).strip()
name = str(raw.get("name", "")).strip()
if not item_id:
raise ValueError(f"items[{index - 1}] is missing a non-empty id")
if item_id in seen_ids:
raise ValueError(f"items[{index - 1}] duplicates inventory id '{item_id}'")
if not name:
raise ValueError(f"items[{index - 1}] is missing a non-empty name")
seen_ids.add(item_id)
unit = str(raw.get("unit", "item")).strip().lower() or "item"
size = str(raw.get("size", "medium")).strip().lower() or "medium"
aspect = str(raw.get("aspect_ratio", "square")).strip().lower() or "square"
if unit not in VALID_UNITS:
raise ValueError(f"item '{item_id}' has invalid unit '{unit}'; use item or pair")
if size not in VALID_SIZES:
raise ValueError(f"item '{item_id}' has invalid size '{size}'; use small, medium, or large")
if aspect not in VALID_ASPECTS:
raise ValueError(f"item '{item_id}' has invalid aspect_ratio '{aspect}'; use portrait, landscape, or square")
normalized.append({
"id": item_id,
"name": name,
"quantity": _positive_integer(raw.get("quantity", 1), f"item '{item_id}' quantity"),
"unit": unit,
"size": size,
"aspect_ratio": aspect,
"description": str(raw.get("description", "")).strip(),
})
return normalized
def _instances(items: list[dict[str, Any]]) -> list[dict[str, Any]]:
result = []
for item in items:
quantity = item["quantity"]
for index in range(1, quantity + 1):
instance = dict(item)
instance["original_id"] = item["id"]
instance["instance"] = index
instance["id"] = item["id"] if quantity == 1 else f"{item['id']}_{index:03d}"
result.append(instance)
return result
def _grid_shape(count: int, canvas_width: int, canvas_height: int) -> tuple[int, int]:
columns = max(1, min(count, math.ceil(math.sqrt(count * canvas_width / canvas_height))))
return math.ceil(count / columns), columns
def _position_name(cx: float, cy: float) -> str:
vertical = "upper" if cy < 1 / 3 else "lower" if cy > 2 / 3 else "centre"
horizontal = "left" if cx < 1 / 3 else "right" if cx > 2 / 3 else "centre"
if vertical == "centre" and horizontal == "centre":
return "centre"
if vertical == "centre":
return f"centre-{horizontal}"
if horizontal == "centre":
return f"{vertical}-centre"
return f"{vertical}-{horizontal}"
def plan_layout(
inventory_json: str,
canvas_width: int = 1536,
canvas_height: int = 1024,
layout_mode: str = "balanced",
margin_percent: float = 5.0,
spacing_percent: float = 3.0,
) -> dict[str, Any]:
"""Return a deterministic, non-overlapping normalized rectangle plan."""
width = int(_bounded_number(canvas_width, "canvas_width", 64, 8192))
height = int(_bounded_number(canvas_height, "canvas_height", 64, 8192))
margin = _bounded_number(margin_percent, "margin_percent", 0, 40) / 100
spacing = _bounded_number(spacing_percent, "spacing_percent", 0, 20) / 100
mode = str(layout_mode or "balanced").lower()
if mode not in {"balanced", "grid"}:
raise ValueError("layout_mode must be balanced or grid")
items = normalize_inventory(inventory_json)
instances = _instances(items)
if not instances:
return {"canvas": {"width": width, "height": height}, "regions": [], "warnings": []}
rows, columns = _grid_shape(len(instances), width, height)
usable_x, usable_y = margin, margin
usable_w, usable_h = 1 - 2 * margin, 1 - 2 * margin
gap_x = spacing * height / width
gap_y = spacing * width / height
cell_w = (usable_w - gap_x * (columns - 1)) / columns
cell_h = (usable_h - gap_y * (rows - 1)) / rows
if cell_w <= 0 or cell_h <= 0:
raise ValueError("margin and spacing leave no usable canvas area")
regions = []
for index, item in enumerate(instances):
row, column = divmod(index, columns)
x = usable_x + column * (cell_w + gap_x)
y = usable_y + row * (cell_h + gap_y)
cell_ratio = cell_w / cell_h
target_ratio = ASPECT_RATIOS[item["aspect_ratio"]]
if mode == "grid":
region_w, region_h = cell_w, cell_h
else:
# Fit the requested aspect ratio in the cell. Weight changes the
# footprint within the cell while never crossing cell boundaries.
if target_ratio >= cell_ratio:
region_w, region_h = cell_w, cell_w / target_ratio
else:
region_w, region_h = cell_h * target_ratio, cell_h
weight = SIZE_WEIGHTS[item["size"]]
scale = min(1.0, math.sqrt(weight / SIZE_WEIGHTS["large"]))
region_w *= scale
region_h *= scale
offset_x, offset_y = (cell_w - region_w) / 2, (cell_h - region_h) / 2
rx, ry = x + offset_x, y + offset_y
regions.append({
"id": item["id"],
"original_id": item["original_id"],
"name": item["name"],
"quantity": item["quantity"],
"unit": item["unit"],
"description": item["description"],
"size": item["size"],
"aspect_ratio": item["aspect_ratio"],
"instance": item["instance"],
"x": round(rx, 8), "y": round(ry, 8),
"width": round(region_w, 8), "height": round(region_h, 8),
"position": _position_name(rx + region_w / 2, ry + region_h / 2),
})
warnings = []
if len(instances) > 25:
warnings.append("Large inventory: regions were scaled to fit the requested canvas.")
return {"canvas": {"width": width, "height": height}, "regions": regions, "warnings": warnings}
def build_layout_prompt(plan: dict[str, Any]) -> str:
regions = plan["regions"]
if not regions:
return ""
lines = [
f"Arrange exactly {len(regions)} unique inventory region(s) on the {plan['canvas']['width']}x{plan['canvas']['height']} canvas.",
"Each allocated region represents one unique inventory entry; do not invent, merge, delete, or duplicate objects.",
]
for region in regions:
right = region["x"] + region["width"]
bottom = region["y"] + region["height"]
description = region["description"] or "No additional description provided."
lines.append(
f"{region['id']} ({region['name']}, quantity {region['quantity']}, {region['unit']}): "
f"place only this object in the {region['position']} region, approximately "
f"from {region['x']:.0%},{region['y']:.0%} to {right:.0%},{bottom:.0%}. "
f"Visual description: {description}"
)
return "\n".join(lines)
def _flux3_bbox(region: dict[str, Any], padding_percent: float = 0.0) -> list[int]:
"""Convert a normalized region to FLUX.3's 0-1000 box format."""
padding = _bounded_number(padding_percent, "flux3_box_padding", 0, 40) / 100
x, y = float(region["x"]), float(region["y"])
width, height = float(region["width"]), float(region["height"])
# Padding is internal: shrink the target box symmetrically without moving
# it outside the layout or changing the original legacy plan.
x += width * padding
y += height * padding
width *= max(0.0, 1 - 2 * padding)
height *= max(0.0, 1 - 2 * padding)
top = max(0, min(1000, round(y * 1000)))
left = max(0, min(1000, round(x * 1000)))
bottom = max(0, min(1000, round((y + height) * 1000)))
right = max(0, min(1000, round((x + width) * 1000)))
if top >= 1000:
top = 999
if left >= 1000:
left = 999
if bottom <= top:
bottom = min(1000, top + 1)
if right <= left:
right = min(1000, left + 1)
return [top, left, bottom, right]
def build_flux3_boxes(
plan: dict[str, Any],
padding_percent: float = 0.0,
include_descriptions: bool = True,
) -> list[dict[str, Any]]:
"""Build FLUX.3 generation-style layout rows from an existing plan."""
rows = []
for region in plan["regions"]:
description = region["description"] if include_descriptions else ""
if not description:
description = region["name"]
rows.append({
"id": region["id"],
"bbox": _flux3_bbox(region, padding_percent),
"desc": description,
})
return rows
def build_flux3_prompt(
plan: dict[str, Any],
padding_percent: float = 0.0,
include_descriptions: bool = True,
) -> tuple[str, str]:
"""Return a FLUX.3 caption and its trailing JSON box array."""
boxes = build_flux3_boxes(plan, padding_percent, include_descriptions)
if not boxes:
return "", "[]"
references = []
for region in plan["regions"]:
references.append(f"{region['name']} <{region['id']}>")
caption = (
"A photorealistic 90-degree overhead flat-lay product photograph of "
"the exact physical objects identified in the supplied reference image, "
"arranged individually on a clean neutral surface with realistic materials, "
"natural fabric drape, soft studio lighting, and subtle contact shadows. "
f"The scene contains exactly these unique inventory entries: {', '.join(references)}. "
"Reproduce each item's original colours, materials, construction, prints, "
"graphics, and visible details faithfully. Display each object only once "
"inside its allocated region. Do not include the original person, mannequin, "
"duplicate garments, invented accessories, or unrelated props."
)
boxes_json = json.dumps(boxes, ensure_ascii=False, separators=(",", ":"))
return f"{caption} {boxes_json}", boxes_json
def _background(value: str) -> tuple[int, int, int]:
text = str(value or DEFAULT_BACKGROUND).strip().lstrip("#")
if len(text) == 3:
text = "".join(char * 2 for char in text)
if len(text) != 6 or any(char not in "0123456789abcdefABCDEF" for char in text):
raise ValueError("background_color must be a hex colour such as #EEE8DC")
return tuple(int(text[index:index + 2], 16) for index in (0, 2, 4))
def render_preview(plan: dict[str, Any], background_color: str, show_labels: bool = True):
try:
from PIL import Image, ImageDraw, ImageFont
except ImportError as exc:
raise RuntimeError("DUMAS Clothing Layout Planner requires Pillow for layout_preview") from exc
image = Image.new("RGB", (plan["canvas"]["width"], plan["canvas"]["height"]), _background(background_color))
if not plan["regions"]:
return image
draw = ImageDraw.Draw(image)
font = ImageFont.load_default()
colours = [(91, 126, 157), (115, 151, 112), (181, 135, 78), (139, 112, 156), (166, 104, 104)]
width, height = image.size
for index, region in enumerate(plan["regions"]):
left = round(region["x"] * width)
top = round(region["y"] * height)
right = round((region["x"] + region["width"]) * width) - 1
bottom = round((region["y"] + region["height"]) * height) - 1
colour = colours[index % len(colours)]
draw.rectangle((left, top, right, bottom), outline=colour, width=max(2, min(width, height) // 300))
if show_labels:
label = f"{region['id']} — {region['name']}"
label_width = draw.textbbox((0, 0), label, font=font)[2]
if label_width > right - left - 8:
label = region["id"]
label_y = min(bottom - 14, top + 4)
draw.rectangle((left + 2, label_y - 1, min(right - 2, left + 6 + draw.textbbox((0, 0), label, font=font)[2]), label_y + 12), fill=(245, 240, 229))
draw.text((left + 4, label_y), label, fill=(35, 35, 35), font=font)
return image
class DumasClothingLayoutPlanner:
CATEGORY = "Dumas/Image/Layout"
DESCRIPTION = "Create a deterministic object layout from VLM inventory JSON."
RETURN_TYPES = ("STRING", "STRING", "IMAGE", "STRING", "STRING")
RETURN_NAMES = ("layout_prompt", "layout_json", "layout_preview", "flux3_prompt", "flux3_boxes_json")
FUNCTION = "plan"
@classmethod
def INPUT_TYPES(cls):
return {"required": {
"inventory_json": ("STRING", {"multiline": True, "default": "{\"items\": []}"}),
"canvas_width": ("INT", {"default": 1536, "min": 64, "max": 8192, "step": 1}),
"canvas_height": ("INT", {"default": 1024, "min": 64, "max": 8192, "step": 1}),
"layout_mode": (["balanced", "grid"], {"default": "balanced"}),
"margin_percent": ("FLOAT", {"default": 5.0, "min": 0.0, "max": 40.0, "step": 0.5}),
"spacing_percent": ("FLOAT", {"default": 3.0, "min": 0.0, "max": 20.0, "step": 0.5}),
"background_color": ("STRING", {"default": DEFAULT_BACKGROUND}),
"show_labels": ("BOOLEAN", {"default": True}),
"output_format": (["legacy", "flux3", "both"], {"default": "both"}),
"flux3_box_padding": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 40.0, "step": 0.5}),
"flux3_include_descriptions": ("BOOLEAN", {"default": True}),
"flux3_reference_mode": (["generation", "editing"], {"default": "generation"}),
}}
def plan(self, inventory_json, canvas_width, canvas_height, layout_mode, margin_percent, spacing_percent, background_color, show_labels, output_format, flux3_box_padding, flux3_include_descriptions, flux3_reference_mode):
plan = plan_layout(inventory_json, canvas_width, canvas_height, layout_mode, margin_percent, spacing_percent)
if output_format in {"flux3", "both"} and flux3_reference_mode == "editing":
raise ValueError(
"flux3_reference_mode='editing' requires source bounding boxes and reference-image identifiers; "
"the current inventory schema only supports generation mode"
)
preview = render_preview(plan, background_color, show_labels)
try:
import numpy as np
import torch
tensor = torch.from_numpy(np.asarray(preview).astype("float32") / 255.0)[None, ...]
except ImportError as exc:
raise RuntimeError("DUMAS Clothing Layout Planner requires ComfyUI's torch and numpy runtime") from exc
flux3_prompt, flux3_boxes_json = "", "[]"
if output_format in {"flux3", "both"}:
flux3_prompt, flux3_boxes_json = build_flux3_prompt(
plan, flux3_box_padding, flux3_include_descriptions
)
return build_layout_prompt(plan), json.dumps(plan, ensure_ascii=False, indent=2), tensor, flux3_prompt, flux3_boxes_json
NODE_CLASS_MAPPINGS = {"DumasClothingLayoutPlanner": DumasClothingLayoutPlanner}
NODE_DISPLAY_NAME_MAPPINGS = {"DumasClothingLayoutPlanner": "DUMAS Clothing Layout Planner"}
+173
View File
@@ -0,0 +1,173 @@
"""DUMAS spatially tiled wrapper for the MiniMax H3 2D latent upscaler.
The model implementation and checkpoint loader are vendored from the Apache-2.0
licensed LBH-123-AI ComfyUI node. DUMAS owns the workflow node and adds spatial
tiling; time is always processed as one sequence.
"""
def _upscaler_module():
try:
from .vendor import minimax_h3_latent_upscaler_2d as module
except ImportError:
from vendor import minimax_h3_latent_upscaler_2d as module
return module
class DumasMMH3LatentUpscale2DModelParams:
"""Provide the H3_UPSCALE_PARAM contract for the DUMAS 2D path."""
@classmethod
def INPUT_TYPES(cls):
import folder_paths
names = [
name for name in folder_paths.get_filename_list("latent_upscale_models")
if str(name).lower().endswith((".safetensors", ".pth"))
]
return {"required": {
"model_name": (names or ["(place model in models/latent_upscale_models)"],),
"device": (["cuda", "rocm", "cpu"], {"default": "cuda"}),
"precision": (["fp32", "fp16", "bf16"], {"default": "fp16"}),
"width": ("INT", {"default": 1280, "min": 16, "max": 16384, "step": 16}),
"height": ("INT", {"default": 704, "min": 16, "max": 16384, "step": 16}),
"tile_size": ("INT", {"default": 64, "min": 8, "max": 1024, "step": 8}),
"tile_overlap": ("INT", {"default": 8, "min": 0, "max": 128, "step": 1}),
"sharpness": ("INT", {"default": 1, "min": 1, "max": 6, "step": 1}),
}}
RETURN_TYPES = ("H3_UPSCALE_PARAM",)
RETURN_NAMES = ("latent_upscale_param",)
FUNCTION = "build"
CATEGORY = "Dumas/MiniMax H3/Upscale"
def build(self, model_name, device, precision, width, height, tile_size, tile_overlap, sharpness):
if str(model_name).startswith("("):
raise ValueError("Place the 2D H3 model in models/latent_upscale_models")
return ({
"dumas_h3_2d": True,
"model_name": str(model_name),
"device": str(device),
"precision": str(precision),
"target_width": int(width),
"target_height": int(height),
"tile_size": int(tile_size),
"tile_overlap": int(tile_overlap),
"sharpness": int(sharpness),
},)
class DumasMMH3LatentUpscale2D:
"""Apply the MiniMax H3 2D upscaler using X/Y tiles only."""
@classmethod
def INPUT_TYPES(cls):
import folder_paths
names = [
name for name in folder_paths.get_filename_list("latent_upscale_models")
if str(name).lower().endswith((".safetensors", ".pth"))
]
return {
"required": {
"latent": ("LATENT",),
"model_name": (names or ["(place model in models/latent_upscale_models)"],),
"width": ("INT", {"default": 1280, "min": 16, "max": 16384, "step": 16}),
"height": ("INT", {"default": 704, "min": 16, "max": 16384, "step": 16}),
"tile_size": ("INT", {"default": 64, "min": 8, "max": 1024, "step": 8}),
"tile_overlap": ("INT", {"default": 8, "min": 0, "max": 128, "step": 1}),
"sharpness": ("INT", {"default": 1, "min": 1, "max": 6, "step": 1}),
"device": (["cuda", "rocm", "cpu"], {"default": "cuda"}),
"precision": (["fp32", "fp16", "bf16"], {"default": "fp16"}),
}
}
RETURN_TYPES = ("LATENT", "STRING")
RETURN_NAMES = ("upscaled_latent", "info")
FUNCTION = "upscale"
CATEGORY = "Dumas/MiniMax H3/Upscale"
@staticmethod
def _ranges(length, tile, overlap):
step = tile - overlap
if step <= 0:
raise ValueError("tile_overlap must be smaller than tile_size")
starts = list(range(0, max(1, length - tile + 1), step))
if not starts or starts[-1] + tile < length:
starts.append(max(0, length - tile))
return [(start, min(length, start + tile)) for start in sorted(set(starts))]
def upscale(self, latent, model_name, width, height, tile_size, tile_overlap, sharpness,
device, precision):
import torch
if str(model_name).startswith("("):
raise ValueError("Place the 2D H3 model in models/latent_upscale_models")
source = latent.get("samples") if isinstance(latent, dict) else None
if source is None or source.ndim != 5:
raise ValueError("DUMAS H3 2D upscale expects a 5-D latent: B,C,T,H,W")
if source.shape[1] != 24:
raise ValueError(f"MiniMax H3 latents must have 24 channels, got {source.shape[1]}")
module = _upscaler_module()
dev = module._resolve_device(device)
compute_dtype = {"fp32": torch.float32, "fp16": torch.float16,
"bf16": torch.bfloat16}[precision]
model = module.load_model(model_name, dev, precision)
mean, std = module._make_norm_tensors(dev, compute_dtype)
src = source.to(device=dev, dtype=compute_dtype, copy=True)
b, c, t, h, w = src.shape
if int(width) % 16 or int(height) % 16:
raise ValueError("Target width and height must be divisible by 16")
out_w, out_h = int(width) // 16, int(height) // 16
if out_h < h or out_w < w:
raise ValueError("Target dimensions must be at least as large as the input")
if out_h == h and out_w == w:
return latent, "DUMAS H3 2D upscale skipped: target dimensions equal input"
result = torch.zeros((b, c, t, out_h, out_w), device=dev, dtype=compute_dtype)
weights = torch.zeros((1, 1, 1, out_h, out_w), device=dev, dtype=compute_dtype)
ys = self._ranges(h, int(tile_size), int(tile_overlap))
xs = self._ranges(w, int(tile_size), int(tile_overlap))
with torch.inference_mode():
for y0, y1 in ys:
for x0, x1 in xs:
yi0, yi1 = max(0, y0 - tile_overlap), min(h, y1 + tile_overlap)
xi0, xi1 = max(0, x0 - tile_overlap), min(w, x1 + tile_overlap)
tile = (src[:, :, :, yi0:yi1, xi0:xi1] - mean) / std
sy, sx = out_h / h, out_w / w
tile_y0, tile_y1 = int(round(yi0 * sy)), int(round(yi1 * sy))
tile_x0, tile_x1 = int(round(xi0 * sx)), int(round(xi1 * sx))
tile_out = model(
tile, scale=1.0,
target_hw=(tile_y1 - tile_y0, tile_x1 - tile_x0),
enable_chunking=False,
tier=(int(sharpness) if getattr(model.resizer, "tier_dim", 0) else None),
)
dy0, dy1 = int(round(y0 * sy)), int(round(y1 * sy))
dx0, dx1 = int(round(x0 * sx)), int(round(x1 * sx))
dh, dw = dy1 - dy0, dx1 - dx0
oy0, ox0 = dy0 - tile_y0, dx0 - tile_x0
result[:, :, :, dy0:dy1, dx0:dx1] += tile_out[:, :, :, oy0:oy0 + dh, ox0:ox0 + dw]
weights[:, :, :, dy0:dy1, dx0:dx1] += 1
del tile, tile_out
out = (result / weights.clamp_min(1) * std + mean).to("cpu", dtype=source.dtype)
if dev.type in ("cuda", "mps"):
model.to("cpu")
if dev.type == "cuda":
torch.cuda.empty_cache()
return {"samples": out}, (
f"DUMAS H3 2D spatial upscale: {w * 16}x{h * 16} -> {int(width)}x{int(height)}; "
f"tiles={len(ys) * len(xs)}, tile={tile_size}, overlap={tile_overlap}, "
f"time=single-pass, sharpness={sharpness}"
)
NODE_CLASS_MAPPINGS = {
"DumasMMH3LatentUpscale2DModelParams": DumasMMH3LatentUpscale2DModelParams,
"DumasMMH3LatentUpscale2D": DumasMMH3LatentUpscale2D,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"DumasMMH3LatentUpscale2D": "DUMAS MiniMax-H3 2D Spatial Latent Upscale",
"DumasMMH3LatentUpscale2DModelParams": "DUMAS MiniMax-H3 2D Latent Upscale Model",
}
+277
View File
@@ -0,0 +1,277 @@
"""UI-backed sequence prompt construction for H3 Continuum."""
from __future__ import annotations
import json
import re
from typing import Any, Mapping
import sys
REFERENCE_IMAGES_V39_TYPE = "H3_CONTINUUM_REFERENCE_IMAGES_V39"
def _continuum_reference_bundle_type():
"""Find the upstream H3 bundle class without copying its implementation."""
# Prefer the exact vendored Continuum module used by the namespaced DUMAS
# sampler. If the original Continuum pack is installed too, importing its
# equally named class first creates a bundle that fails isinstance checks
# in the DUMAS sampler.
import importlib
package_candidates = []
if __package__:
package_candidates.append(
f"{__package__}.vendor.dumas_h3_continuum.v3.reference_images_v39"
)
package_candidates.append("vendor.dumas_h3_continuum.v3.reference_images_v39")
for name in package_candidates:
try:
module = importlib.import_module(name)
except Exception:
continue
bundle = getattr(module, "ReferenceImagesV39Bundle", None)
if bundle is not None:
return bundle
candidates = [
module for name, module in list(sys.modules.items())
if module is not None and name.endswith(".v3.reference_images_v39")
]
try:
candidates.append(importlib.import_module("v3.reference_images_v39"))
except Exception:
pass
for module in candidates:
bundle = getattr(module, "ReferenceImagesV39Bundle", None)
if bundle is not None:
return bundle
raise RuntimeError(
"DUMAS H3 Sequence Prompt Builder requires the original "
"ComfyUI-H3-Continuum reference_images_v39 module to be installed."
)
MAX_CLIPS = 16
DEFAULT_CLIP_SECONDS = 4.0
def _number(value: Any, name: str, *, minimum: float = 0.0) -> float:
if isinstance(value, bool):
raise ValueError(f"{name} must be a number")
try:
result = float(value)
except (TypeError, ValueError) as exc:
raise ValueError(f"{name} must be a number") from exc
if result < minimum:
raise ValueError(f"{name} must be >= {minimum}")
return result
def default_sequence(clip_count: int = 2, clip_seconds: float = DEFAULT_CLIP_SECONDS) -> dict[str, Any]:
"""Return a portable editor state with one slot per clip."""
count = int(clip_count)
if count < 1 or count > MAX_CLIPS:
raise ValueError(f"clip_count must be between 1 and {MAX_CLIPS}")
duration = _number(clip_seconds, "clip_seconds", minimum=0.1)
return {
"version": 1,
"clips": [
{
"duration": duration,
"slots": [{"start": 0.0, "end": duration, "text": ""}],
}
for _ in range(count)
],
}
def normalize_sequence(value: Any, *, clip_count: int, default_seconds: float) -> dict[str, Any]:
"""Validate and normalize editor JSON without changing user-authored text."""
if isinstance(value, str):
try:
value = json.loads(value or "{}")
except json.JSONDecodeError as exc:
raise ValueError(f"timeline_json is not valid JSON: {exc.msg}") from exc
if not isinstance(value, Mapping):
raise ValueError("timeline_json must be a JSON object")
raw_clips = value.get("clips", [])
if not isinstance(raw_clips, list):
raise ValueError("timeline_json.clips must be a list")
count = int(clip_count)
if count < 1 or count > MAX_CLIPS:
raise ValueError(f"clip_count must be between 1 and {MAX_CLIPS}")
fallback_duration = _number(default_seconds, "default_chunk_seconds", minimum=0.1)
clips: list[dict[str, Any]] = []
for clip_index in range(count):
raw_clip = raw_clips[clip_index] if clip_index < len(raw_clips) else {}
if not isinstance(raw_clip, Mapping):
raise ValueError(f"clip {clip_index + 1} must be an object")
# Continuum projects use one chunk duration for every clip. Older
# editor state may still contain per-clip durations; ignore them so
# the single node control remains authoritative.
duration = fallback_duration
raw_slots = raw_clip.get("slots", [])
if not isinstance(raw_slots, list):
raise ValueError(f"clip {clip_index + 1} slots must be a list")
slots: list[dict[str, Any]] = []
for slot_index, raw_slot in enumerate(raw_slots):
if not isinstance(raw_slot, Mapping):
raise ValueError(f"clip {clip_index + 1} slot {slot_index + 1} must be an object")
start = _number(raw_slot.get("start", 0), f"clip {clip_index + 1} slot {slot_index + 1} start")
end = _number(raw_slot.get("end", duration), f"clip {clip_index + 1} slot {slot_index + 1} end")
if end <= start:
raise ValueError(f"clip {clip_index + 1} slot {slot_index + 1} end must be after start")
if end > duration + 1e-6:
raise ValueError(f"clip {clip_index + 1} slot {slot_index + 1} ends after the clip duration")
text = str(raw_slot.get("text", "")).strip()
if text:
slots.append({"start": start, "end": end, "text": text})
slots.sort(key=lambda slot: (slot["start"], slot["end"]))
if slots:
# The final shot owns the end of every uniform-duration chunk;
# there must be no unassigned tail on the editor track.
slots[-1]["end"] = duration
clips.append({"duration": duration, "slots": slots})
clips[-1]["enabled"] = bool(raw_clip.get("enabled", True))
return {"version": 1, "clips": clips}
def format_sequence_prompt(
*,
shared_directive: str,
sequence: Mapping[str, Any],
soundscape: str = "",
music: str = "",
) -> str:
"""Format uniform clips as chunk blocks with relative shot timings.
Continuum treats square-bracket ranges as physical/logical chunk markers.
Shot timings belong inside each chunk and must therefore use plain
``start-end s:`` lines rather than creating additional Timeline sections.
"""
directive = str(shared_directive or "").strip()
sound = str(soundscape or "").strip() or "N/A"
music_text = str(music or "").strip() or "N/A"
sections: list[str] = []
cursor = 0.0
for clip in (item for item in sequence["clips"] if item.get("enabled", True)):
duration = float(clip["duration"])
chunk_lines = [f"[{cursor:g}-{cursor + duration:g}s]"]
if directive:
chunk_lines.append(directive)
for slot in clip["slots"]:
start = float(slot["start"])
end = float(slot["end"])
chunk_lines.append(f"{start:g}-{end:g}s: {slot['text']}")
chunk_lines.append(f"overall_soundscape: {sound}")
chunk_lines.append(f"non_diegetic_music: {music_text}")
sections.append("\n".join(chunk_lines))
cursor += duration
return "\n\n".join(sections).strip()
class DumasH3SequencePromptBuilder:
"""Build one Timeline prompt from clip tabs and clip-local time slots."""
DESCRIPTION = (
"DUMAS H3 prompt editor. Define clips and local time slots in the UI; "
"the node emits one absolute Timeline prompt for Sequence Prompt."
)
CATEGORY = "Dumas/MiniMax H3/Prompt"
RETURN_TYPES = ("STRING", "INT", "FLOAT", REFERENCE_IMAGES_V39_TYPE)
RETURN_NAMES = ("sequence_prompt", "chunk_count", "chunk_duration", "reference_images")
FUNCTION = "build"
@classmethod
def INPUT_TYPES(cls):
state = json.dumps(default_sequence(), separators=(",", ":"))
return {
"required": {
"clip_count": ("INT", {"default": 2, "min": 1, "max": MAX_CLIPS, "step": 1}),
"default_chunk_seconds": ("FLOAT", {"default": DEFAULT_CLIP_SECONDS, "min": 0.1, "max": 30.0, "step": 0.1}),
"shared_directive": ("STRING", {"default": "", "multiline": True}),
"timeline_json": ("STRING", {"default": state, "multiline": True}),
"soundscape": ("STRING", {"default": "", "multiline": True}),
"music": ("STRING", {"default": "", "multiline": True}),
},
"optional": {
**{
f"reference_image_{index}": ("IMAGE", {
"display_name": f"Reference Image {index} (@R{index})",
"tooltip": f"Fixed Reference Image {index}; use @R{index} in a clip prompt.",
}) for index in range(1, 10)
},
},
}
def build(
self,
clip_count,
default_chunk_seconds,
shared_directive,
timeline_json,
soundscape,
music,
**kwargs,
):
sequence = normalize_sequence(
timeline_json,
clip_count=int(clip_count),
default_seconds=float(default_chunk_seconds),
)
# Disabled tabs are deliberately removed before formatting and
# routing. The remaining enabled clips become a compact output
# sequence, so downstream nodes never receive gaps in chunk indices.
active_sequence = {
"version": sequence.get("version", 1),
"clips": [clip for clip in sequence["clips"] if clip.get("enabled", True)],
}
selectors = []
directive = str(shared_directive or "").strip()
sound = str(soundscape or "").strip() or "N/A"
music_text = str(music or "").strip() or "N/A"
for reference_index in range(1, 10):
chunks = []
for chunk_index, clip in enumerate(active_sequence["clips"], start=1):
# Match against the same per-chunk content emitted by
# format_sequence_prompt, not only the editable shot lines.
text = "\n".join([
directive,
*(str(slot.get("text", "")) for slot in clip["slots"]),
f"overall_soundscape: {sound}",
f"non_diegetic_music: {music_text}",
])
if kwargs.get(f"reference_image_{reference_index}") is not None and re.search(
rf"@(R{reference_index}|image{reference_index})(?![A-Za-z0-9_])",
text,
re.IGNORECASE,
):
chunks.append(chunk_index)
selectors.append(",".join(map(str, chunks)) or "off")
images = tuple(kwargs.get(f"reference_image_{index}") for index in range(1, 10))
reference_bundle = _continuum_reference_bundle_type()(
images=images,
reference_use="Per chunk",
selectors=tuple(selectors),
)
return (
format_sequence_prompt(
shared_directive=directive,
sequence=active_sequence,
soundscape=soundscape,
music=music,
),
len(active_sequence["clips"]),
float(default_chunk_seconds),
reference_bundle,
)
NODE_CLASS_MAPPINGS = {"DumasH3SequencePromptBuilder": DumasH3SequencePromptBuilder}
NODE_DISPLAY_NAME_MAPPINGS = {
"DumasH3SequencePromptBuilder": "DUMAS H3 Sequence Prompt Builder",
}
+325
View File
@@ -0,0 +1,325 @@
"""DUMAS MiniMax H3 RefMod storage helpers.
This module deliberately works with the ``H3_REF_MODS`` object produced by
the upstream MiniMax H3 RefMod nodes. It adds DUMAS-owned persistence policy
without copying or shadowing the upstream extractor/loader implementation.
"""
from __future__ import annotations
import os
import re
import sys
try:
import torch
except ImportError: # import-time test fallback; ComfyUI supplies torch at runtime
torch = None
def _registered_refmod_root():
import folder_paths
try:
roots = list(folder_paths.get_folder_paths("refmods"))
except Exception:
roots = []
return os.path.realpath(roots[0] if roots else os.path.join(folder_paths.models_dir, "refmods"))
def _safe_name(value, fallback="refmod"):
value = str(value or "").strip()
value = value.replace("\\", "/").split("/")[-1]
value = re.sub(r"[^A-Za-z0-9._ -]+", "_", value).strip(" .")
return value or fallback
def _safe_destination(root, subfolder, filename):
root = os.path.realpath(root)
parts = [p for p in str(subfolder or "").replace("\\", "/").split("/") if p]
if any(p in (".", "..") for p in parts):
raise ValueError("RefMod subfolder must not contain '.' or '..'.")
path = os.path.realpath(os.path.join(root, *parts, filename))
try:
inside = os.path.commonpath((root, path)) == root
except ValueError:
inside = False
if not inside:
raise ValueError("RefMod destination must remain inside the selected folder.")
return path
def _next_path(path, reserved=()):
stem, ext = os.path.splitext(path)
index = 2
candidate = path
reserved = {os.path.normcase(item) for item in reserved}
while (os.path.normcase(candidate) in reserved or os.path.exists(candidate)
or os.path.exists(candidate + ".safetensors") or os.path.exists(candidate + ".json")):
candidate = f"{stem}_{index}{ext}"
index += 1
return candidate
def _mod_path(mod):
return str(getattr(mod, "path", "") or "")
def _continuum_reference_bundle_type():
"""Resolve Continuum's native V3.9 bundle without copying its code."""
import importlib
candidates = [
module for name, module in list(sys.modules.items())
if module is not None and name.endswith(".v3.reference_images_v39")
]
try:
candidates.append(importlib.import_module("v3.reference_images_v39"))
except Exception:
pass
for module in candidates:
bundle = getattr(module, "ReferenceImagesV39Bundle", None)
if bundle is not None:
return bundle
raise RuntimeError(
"DUMAS RefMod-to-Continuum requires the original "
"ComfyUI-H3-Continuum v3.reference_images_v39 module."
)
def _decode_refmod_image(video_vae, mod):
if torch is None:
raise RuntimeError("DUMAS RefMod-to-Continuum requires PyTorch/ComfyUI.")
latent = getattr(mod, "latent", None)
if getattr(mod, "kind", None) == "audio" or latent is None:
return None
if not torch.is_tensor(latent) or latent.ndim != 5:
raise ValueError(f"RefMod '{getattr(mod, 'name', 'unknown')}' has no visual H3 latent.")
with torch.no_grad():
decoded = video_vae.decode(latent[:, :, :1])
if not torch.is_tensor(decoded):
raise ValueError("The connected H3 video VAE returned a non-tensor image.")
if decoded.ndim == 5:
decoded = decoded.reshape(-1, decoded.shape[-3], decoded.shape[-2], decoded.shape[-1])
if decoded.ndim != 4 or decoded.shape[0] < 1 or decoded.shape[-1] < 3:
raise ValueError(f"Decoded RefMod image has unexpected shape {tuple(decoded.shape)}.")
return decoded[:1, :, :, :3].clamp(0.0, 1.0).float().cpu()
def _prompt_selectors(prompt, count):
"""Return R-slot selectors from chunk headers and @R tags."""
if not prompt:
return ("all",) * 9
text = str(prompt)
markers = list(re.finditer(r"\[[^\]]*?-[^\]]*?s\]", text, re.IGNORECASE))
if not markers:
return ("all",) * 9
selectors = []
for ref_index in range(1, 10):
chunks = []
for chunk_index, marker in enumerate(markers[:count], start=1):
end = markers[chunk_index].start() if chunk_index < len(markers) else len(text)
if re.search(rf"@R{ref_index}(?![A-Za-z0-9_])", text[marker.start():end], re.IGNORECASE):
chunks.append(str(chunk_index))
selectors.append(",".join(chunks) or "off")
return tuple(selectors)
class DumasH3RefModSave:
"""Save upstream MiniMax H3 RefMods using an explicit DUMAS policy.
``input_folder`` is intentionally explicit: standard ComfyUI IMAGE and
VIDEO tensors do not retain their source filesystem path. A folder-aware
loader can connect its path here when it exposes one.
"""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"mods": ("H3_REF_MODS",),
"filename_prefix": ("STRING", {"default": ""}),
"subfolder": ("STRING", {"default": ""}),
"save_location": (["Registered RefMods", "Input folder", "Custom folder"],
{"default": "Registered RefMods"}),
"collision_policy": (["Increment filename", "Replace", "Fail"],
{"default": "Increment filename"}),
},
"optional": {
"input_folder": ("STRING", {"default": "", "forceInput": True}),
"custom_output_folder": ("STRING", {"default": "", "forceInput": True}),
},
}
RETURN_TYPES = ("H3_REF_MODS", "STRING")
RETURN_NAMES = ("mods", "saved_paths")
FUNCTION = "save"
OUTPUT_NODE = True
CATEGORY = "Dumas/MiniMax H3/RefMod"
DESCRIPTION = (
"Save H3 RefMods atomically. Registered RefMods is the portable default; "
"Input folder and Custom folder are explicit server-side destinations."
)
def save(self, mods, filename_prefix="", subfolder="",
save_location="Registered RefMods", collision_policy="Increment filename",
input_folder="", custom_output_folder=""):
if not mods:
raise ValueError("The H3 RefMod bundle is empty; nothing to save.")
if save_location == "Registered RefMods":
root = _registered_refmod_root()
os.makedirs(root, exist_ok=True)
elif save_location == "Input folder":
raw_folder = str(input_folder or "").strip()
if not raw_folder:
raise ValueError("Input folder mode requires a connected input_folder path.")
root = os.path.realpath(raw_folder)
try:
from .dumas_h3_refmod_picker import register_refmod_root
except ImportError:
register_refmod_root = lambda _path: None
register_refmod_root(root)
elif save_location == "Custom folder":
raw_folder = str(custom_output_folder or "").strip()
if not raw_folder:
raise ValueError("Custom folder mode requires a connected custom_output_folder path.")
root = os.path.realpath(raw_folder)
try:
from .dumas_h3_refmod_picker import register_refmod_root
except ImportError:
register_refmod_root = lambda _path: None
register_refmod_root(root)
else:
raise ValueError(f"Unknown RefMod save location: {save_location!r}")
if not os.path.isdir(root):
raise ValueError(f"RefMod destination folder does not exist: {root}")
if not os.access(root, os.W_OK):
raise ValueError(f"RefMod destination folder is not writable: {root}")
planned = []
used = set()
for mod, _strength in mods:
name = _safe_name(f"{filename_prefix}{getattr(mod, 'name', 'refmod')}")
path = _safe_destination(root, subfolder, name)
if collision_policy == "Increment filename":
path = _next_path(path, used)
elif os.path.normcase(path) in used:
path = _next_path(path, used)
elif collision_policy == "Fail" and (os.path.exists(path) or os.path.exists(path + ".safetensors")):
raise FileExistsError(f"RefMod already exists: {path}. Choose another name or policy.")
elif collision_policy != "Replace":
raise ValueError(f"Unknown collision policy: {collision_policy!r}")
source = _mod_path(mod)
if source and os.path.normcase(os.path.realpath(source)) == os.path.normcase(path):
raise ValueError("RefMod destination is the source file; choose another folder or name.")
used.add(os.path.normcase(path))
planned.append((mod, path))
saved = []
for mod, path in planned:
os.makedirs(os.path.dirname(path), exist_ok=True)
if not hasattr(mod, "save"):
raise TypeError("Connected H3_REF_MODS contains an object without a save() method.")
saved.append(mod.save(path))
report = "\n".join(saved)
print(f"[DUMAS H3 RefMod Save] {save_location}; {collision_policy}; saved {len(saved)} file(s):\n{report}")
return {"ui": {"text": saved}, "result": (mods, report)}
class DumasH3RefModsToContinuum:
"""Decode visual RefMods into Continuum's native V3.9 image bundle."""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"mods": ("H3_REF_MODS",),
"video_vae": ("VAE",),
"routing": (["All chunks", "Prompt @R tags"], {"default": "Prompt @R tags"}),
"chunk_count": ("INT", {"default": 1, "min": 1, "max": 16}),
},
"optional": {
"sequence_prompt": ("STRING", {"default": "", "multiline": True}),
"base_reference_images": ("H3_CONTINUUM_REFERENCE_IMAGES_V39",),
"reference_offset": ("INT", {"default": 0, "min": 0, "max": 8}),
},
}
RETURN_TYPES = ("H3_CONTINUUM_REFERENCE_IMAGES_V39", "STRING")
RETURN_NAMES = ("reference_images", "info")
FUNCTION = "convert"
CATEGORY = "Dumas/MiniMax H3/RefMod"
DESCRIPTION = (
"Decode visual H3 RefMods and feed them through Continuum's native "
"V3.9 Reference Images input. Connect the sequence prompt to route @R "
"tags per chunk."
)
def convert(self, mods, video_vae, routing="Prompt @R tags", chunk_count=1,
sequence_prompt="", base_reference_images=None, reference_offset=0):
if not mods and base_reference_images is None:
raise ValueError("The H3 RefMod bundle is empty.")
if routing not in ("All chunks", "Prompt @R tags"):
raise ValueError(f"Unknown RefMod routing mode: {routing!r}")
images, skipped_audio, ignored_strength = [], [], []
offset = int(reference_offset)
if not 0 <= offset <= 8:
raise ValueError("reference_offset must be between 0 and 8.")
if base_reference_images is not None:
base_images = getattr(base_reference_images, "images", None)
if not isinstance(base_images, (tuple, list)) or len(base_images) != 9:
raise ValueError("base_reference_images is not a valid Continuum V3.9 bundle.")
slots = list(base_images)
else:
slots = [None] * 9
seen = set()
for mod, _strength in mods:
if getattr(mod, "kind", None) == "audio":
skipped_audio.append(getattr(mod, "name", "audio"))
continue
source_key = _mod_path(mod) or (getattr(mod, "name", "refmod"), id(mod))
if source_key in seen:
continue
seen.add(source_key)
strength = float(_strength)
if strength <= 0:
continue
if abs(strength - 1.0) > 1e-6:
ignored_strength.append(getattr(mod, "name", "refmod"))
target = offset + len(images)
if target >= 9:
raise ValueError("Continuum V3.9 supports at most nine RefMod image slots.")
image = _decode_refmod_image(video_vae, mod)
if image is not None:
images.append(image)
if slots[offset + len(images) - 1] is not None:
raise ValueError("A RefMod slot overlaps an existing image reference.")
slots[offset + len(images) - 1] = image
if not images and base_reference_images is None:
raise ValueError("No visual RefMods were found; audio-only RefMods cannot feed image references.")
selectors = (("all",) * 9 if routing == "All chunks"
else _prompt_selectors(sequence_prompt, int(chunk_count)))
bundle = _continuum_reference_bundle_type()(
images=tuple(slots), reference_use="Per chunk", selectors=selectors,
)
details = [f"decoded {len(images)} visual RefMod(s) into Continuum slots starting at R{offset + 1}"]
if base_reference_images is not None:
details.append("merged with builder image references")
details.append("routing=all chunks" if routing == "All chunks" else "routing=prompt @R tags")
if skipped_audio:
details.append("skipped audio-only: " + ", ".join(skipped_audio))
if ignored_strength:
details.append("native image routing ignores weights: " + ", ".join(ignored_strength))
return bundle, "; ".join(details)
NODE_CLASS_MAPPINGS = {
"DumasH3RefModSave": DumasH3RefModSave,
"DumasH3RefModsToContinuum": DumasH3RefModsToContinuum,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"DumasH3RefModSave": "DUMAS H3 RefMod Save",
"DumasH3RefModsToContinuum": "DUMAS H3 RefMods to Continuum",
}
+267
View File
@@ -0,0 +1,267 @@
"""DUMAS H3 RefMod browser and picker.
The picker consumes the ``H3_REF_MODS`` type from the maintained MiniMax H3
RefMod implementation. It intentionally does not duplicate the upstream
extract/apply implementation; it only discovers files, presents them safely,
and loads the selected RefMod into a compatible bundle.
"""
from __future__ import annotations
import json
import os
import sys
from typing import Dict, List
import folder_paths
_SKIP_DIRS = {".git", "__pycache__", "graph_presets"}
_MAX_WEIGHT = 10.0
_CACHE = {}
def _roots() -> List[str]:
roots = []
try:
roots.extend(folder_paths.get_folder_paths("refmods"))
except Exception:
pass
fallback = os.path.join(folder_paths.models_dir, "refmods")
roots.append(fallback)
result = []
seen = set()
for root in roots:
root = os.path.realpath(os.path.abspath(root))
if root not in seen and os.path.isdir(root):
seen.add(root)
result.append(root)
return result
def register_refmod_root(path: str) -> str:
"""Register an explicitly selected external folder for this process."""
root = os.path.realpath(os.path.abspath(str(path or "").strip()))
if not os.path.isdir(root):
raise ValueError(f"RefMod folder does not exist: {root}")
try:
folder_paths.add_model_folder_path("refmods", root)
except Exception:
pass
return root
def _inside(path: str, root: str) -> bool:
try:
return os.path.commonpath((os.path.realpath(path), os.path.realpath(root))) == os.path.realpath(root)
except ValueError:
return False
def _safe_file(path: str) -> str:
raw = os.path.abspath(os.path.expanduser(str(path or "").strip()))
for root in _roots():
if _inside(raw, root) and os.path.isfile(raw):
return os.path.realpath(raw)
raise ValueError("RefMod path is not inside a registered refmods folder.")
def _read_meta(path_no_ext: str):
try:
from safetensors import safe_open
with safe_open(path_no_ext + ".safetensors", framework="pt") as handle:
metadata = handle.metadata() or {}
for key in ("refmod_meta", "audio_refmod_meta"):
if key in metadata:
return json.loads(metadata[key])
except Exception:
return None
return None
def _capabilities(meta):
if not isinstance(meta, dict):
return {"kind": "unknown", "has_visual": False, "has_audio": False}
kind = str(meta.get("kind", "unknown"))
if kind == "bundle":
members = meta.get("members") or []
return {"kind": kind,
"has_visual": any(x.get("kind") in ("image", "video") for x in members if isinstance(x, dict)),
"has_audio": any(x.get("kind") == "audio" for x in members if isinstance(x, dict))}
if kind in ("image", "video"):
return {"kind": kind, "has_visual": True,
"has_audio": int(meta.get("ref_audio_t", 0) or 0) > 0}
return {"kind": kind, "has_visual": False, "has_audio": kind == "audio"}
def _preview(path_no_ext):
stem = os.path.basename(path_no_ext)
for suffix in ("_visual", "_Visual", "_video", "_Video", "_audio", "_Audio"):
if stem.endswith(suffix):
stem = stem[:-len(suffix)]
break
directory = os.path.dirname(path_no_ext)
for ext in (".png", ".jpg", ".jpeg", ".webp"):
candidate = os.path.join(directory, stem + ext)
if os.path.isfile(candidate):
return candidate
return None
def _list_entries(current):
dirs, mods = [], []
for entry in sorted(os.scandir(current), key=lambda item: item.name.lower()):
if entry.name.startswith(".") or entry.name in _SKIP_DIRS:
continue
try:
if entry.is_dir(follow_symlinks=False):
dirs.append({"name": entry.name, "path": os.path.realpath(entry.path)})
elif entry.is_file(follow_symlinks=False) and entry.name.lower().endswith(".safetensors"):
stem = entry.path[:-len(".safetensors")]
meta = _read_meta(stem)
caps = _capabilities(meta)
if caps["kind"] not in ("image", "video", "audio", "bundle"):
continue
mods.append({
"name": entry.name,
"path": os.path.realpath(entry.path),
"preview_path": _preview(stem),
**caps,
"description": str((meta or {}).get("description", "") or ""),
"concept_type": str((meta or {}).get("concept_type", "generic") or "generic"),
})
except OSError:
continue
return dirs, mods
def browser_root():
roots = _roots()
if not roots:
root = os.path.realpath(os.path.join(folder_paths.models_dir, "refmods"))
os.makedirs(root, exist_ok=True)
return root
return roots[0]
def list_browser_dir(path=""):
roots = _roots()
if not roots:
root = browser_root()
roots = [root]
current = browser_root() if not path else _safe_directory(path)
if os.path.realpath(current) in {os.path.realpath(x) for x in roots}:
dirs, mods = [], []
for root in roots:
d, m = _list_entries(root)
dirs.extend(d)
mods.extend(m)
parent = None
current = browser_root()
else:
dirs, mods = _list_entries(current)
parent_candidate = os.path.dirname(current.rstrip(os.sep))
parent = parent_candidate if any(_inside(parent_candidate, root) for root in roots) else None
return {"root": browser_root(), "current_path": current, "parent_path": parent,
"dirs": dirs, "mods": mods}
def _safe_directory(path):
raw = os.path.realpath(os.path.abspath(os.path.expanduser(str(path or ""))))
if any(_inside(raw, root) for root in _roots()) and os.path.isdir(raw):
return raw
raise ValueError("RefMod folder is not inside a registered refmods root.")
def _find_loader_api():
"""Find the maintained RefMod reader already loaded by ComfyUI."""
for module in list(sys.modules.values()):
if module is None:
continue
loader = getattr(module, "load_refmods_from_file", None)
if callable(loader):
return loader
raise RuntimeError(
"No MiniMax H3 RefMod reader is loaded. Install/load the maintained "
"MiniMax H3 RefMod node pack alongside DumasNodes."
)
def _expand_weight(weight):
value = min(_MAX_WEIGHT, max(0.0, float(weight)))
whole = int(value)
remainder = round(value - whole, 6)
result = [1.0] * whole
if remainder > 1e-6:
result.append(remainder)
return result
def _hint(rows):
return "; ".join(
f"{getattr(mod, 'concept_type', 'generic')}: {getattr(mod, 'description', '')}"
for mod, strength in rows if strength > 0 and getattr(mod, "description", "")
)
class DumasH3RefModPicker:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"mod_path": ("STRING", {"default": "", "tooltip": "Choose a RefMod from the DUMAS browser."}),
"video_weight": ("FLOAT", {"default": 1.0, "min": 0.0, "max": _MAX_WEIGHT, "step": 0.01}),
"audio_weight": ("FLOAT", {"default": 1.0, "min": 0.0, "max": _MAX_WEIGHT, "step": 0.01}),
},
"optional": {"mods": ("H3_REF_MODS",)},
}
RETURN_TYPES = ("H3_REF_MODS", "STRING")
RETURN_NAMES = ("mods", "prompt_hint")
FUNCTION = "pick"
CATEGORY = "Dumas/MiniMax H3/RefMod"
def pick(self, mod_path="", video_weight=1.0, audio_weight=1.0, mods=None):
rows = list(mods or [])
selected = str(mod_path or "").strip()
if not selected or selected.lower() == "(none)":
return rows, _hint(rows)
path = _safe_file(selected)
loader = _find_loader_api()
loaded = loader(path[:-len(".safetensors")], device="cpu")
for mod in loaded:
weight = audio_weight if getattr(mod, "kind", "") == "audio" else video_weight
for strength in _expand_weight(weight):
rows.append((mod, strength))
return rows, _hint(rows)
NODE_CLASS_MAPPINGS = {"DumasH3RefModPicker": DumasH3RefModPicker}
NODE_DISPLAY_NAME_MAPPINGS = {"DumasH3RefModPicker": "DUMAS H3 RefMod Visual Picker"}
try:
from server import PromptServer, web
@PromptServer.instance.routes.get("/dumas/h3-refmod-browser/root")
async def dumas_refmod_root(request):
return web.json_response({"ok": True, "root": browser_root()})
@PromptServer.instance.routes.get("/dumas/h3-refmod-browser/list")
async def dumas_refmod_list(request):
try:
return web.json_response({"ok": True, **list_browser_dir(request.query.get("path", ""))})
except ValueError as exc:
return web.json_response({"ok": False, "error": str(exc)}, status=404)
@PromptServer.instance.routes.get("/dumas/h3-refmod-browser/file")
async def dumas_refmod_file(request):
try:
path = _safe_file(request.query.get("path", ""))
if os.path.splitext(path)[1].lower() not in (".png", ".jpg", ".jpeg", ".webp"):
raise ValueError("Unsupported preview type")
return web.FileResponse(path, headers={"Cache-Control": "no-cache"})
except ValueError as exc:
return web.json_response({"ok": False, "error": str(exc)}, status=404)
except Exception:
pass
+496
View File
@@ -0,0 +1,496 @@
"""Per-clip tiled latent upscaling for MiniMax H3 Continuum.
Continuum exposes physical video groups as a LATENT list. The native
``MMH3UltimateUpscale`` node operates on one H3 latent at a time, so this
adapter deliberately applies it independently to each physical clip instead
of concatenating the clips into one larger VRAM allocation.
"""
from __future__ import annotations
from typing import Any
def _sampler_options() -> list[str]:
try:
import comfy.samplers
return list(comfy.samplers.KSampler.SAMPLERS)
except Exception: # pragma: no cover - exercised on a ComfyUI host
return ["euler", "euler_ancestral", "res_multistep", "sa_solver"]
def _scheduler_options() -> list[str]:
try:
import comfy.samplers
return list(comfy.samplers.KSampler.SCHEDULERS)
except Exception: # pragma: no cover - exercised on a ComfyUI host
return ["simple", "beta", "sgm_uniform", "karras", "exponential"]
def _continuum_helper(name: str):
"""Resolve a helper from the installed upstream H3 Continuum package."""
import sys
for module_name, module in list(sys.modules.items()):
if module is not None and (
module_name.endswith(".v3.second_pass")
or module_name.endswith(".v2.sampling")
or module_name.endswith(".state")
):
helper = getattr(module, name, None)
if helper is not None:
return helper
import importlib
for module_name in ("v3.second_pass", "v2.sampling", "state"):
try:
helper = getattr(importlib.import_module(module_name), name, None)
if helper is not None:
return helper
except Exception:
pass
raise RuntimeError(
"DUMAS H3 per-clip upscale requires the original "
"ComfyUI-H3-Continuum AV latent helpers."
)
def _native_node(name: str):
try:
import nodes
return (getattr(nodes, "NODE_CLASS_MAPPINGS", {}) or {}).get(name)
except Exception:
return None
def _unwrap_node_output(value: Any) -> Any:
"""Extract values returned by ComfyUI's newer NodeOutput API.
The v3 API wraps node results in ``NodeOutput`` while legacy nodes expect
the underlying tensor/object directly. Keep this adapter compatible with
both APIs without importing ComfyUI internals.
"""
result = getattr(value, "result", None)
if result is None and not hasattr(value, "result"):
return value
return result
def _unwrap_single_output(value: Any, name: str) -> Any:
marker = object()
result = getattr(value, "result", marker)
# Ordinary tuples are valid values for the lightweight test doubles and
# for some legacy ComfyUI helpers. Only unwrap an actual NodeOutput-like
# object, identified by its result property.
if result is marker:
return value
if isinstance(result, (tuple, list)):
if len(result) != 1:
raise ValueError(f"{name} returned {len(result)} outputs; expected one")
return result[0]
return result
def _call_native(node_class, kwargs: dict[str, Any]):
"""Invoke a ComfyUI node through its declared FUNCTION contract.
ComfyUI node classes do not have a universal Python method name. The live
MiniMax node currently declares its executor through ``FUNCTION`` rather
than exposing a method named ``upscale``.
"""
instance = node_class()
declared = getattr(node_class, "FUNCTION", None)
candidates = []
if isinstance(declared, str) and declared:
candidates.append(declared)
candidates.extend(("execute", "run", "process", "sample", "upscale"))
seen = set()
for name in candidates:
if name in seen:
continue
seen.add(name)
method = getattr(instance, name, None)
if callable(method):
return _unwrap_node_output(method(**kwargs))
raise RuntimeError(
"MMH3UltimateUpscale exposes no callable ComfyUI FUNCTION method "
f"(declared={declared!r})"
)
def _one(value: Any, name: str) -> Any:
"""Unwrap ComfyUI list inputs while rejecting ambiguous values."""
if isinstance(value, list):
if len(value) != 1:
raise ValueError(f"{name} must contain one shared value")
return value[0]
return value
def _clips(value: Any) -> list[Any]:
if isinstance(value, list):
return value
return [value]
def _per_clip(value: Any, count: int, name: str) -> list[Any]:
values = _clips(value)
if len(values) == 1:
return values * count
if len(values) != count:
raise ValueError(f"{name} has {len(values)} values for {count} clips")
return values
class DumasH3ContinuumTiledLatentUpscalePerClip:
"""Upscale each Continuum physical clip separately with tiled H3 latent work.
This is intentionally a thin adapter around ComfyUI's native
``MMH3UltimateUpscale`` implementation. It does not vendor or replace
the model-specific implementation; it only supplies an independent
sampler/scheduler/noise/CFG schedule for each clip and preserves list
boundaries so clips never become one oversized VRAM job.
"""
DESCRIPTION = (
"Apply native MiniMax H3 tiled latent upscaling independently to every "
"Continuum physical clip. Clips remain separate LATENT list items."
)
SEARCH_ALIASES = [
"H3 tiled upscale per clip",
"MiniMax H3 clip upscale",
"Continuum latent upscale",
]
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"model": ("MODEL",),
"clip": ("CLIP",),
"video_latents": ("LATENT",),
"audio_latents": ("LATENT",),
"assembly_plan": ("H3_CONTINUUM_ASSEMBLY_PLAN",),
"refine_context": ("H3_CONTINUUM_REFINE_CONTEXT",),
"latent_upscale_param": ("H3_UPSCALE_PARAM",),
"spatial_split_param": ("H3_SPATIAL_PARAM",),
"upscale_sampler": (
_sampler_options(),
{"default": "euler_ancestral"},
),
"upscale_scheduler": (
_scheduler_options(),
{"default": "simple"},
),
"upscale_steps": ("INT", {"default": 3, "min": 1, "max": 50}),
"upscale_denoise": (
"FLOAT",
{"default": 0.2, "min": 0.0, "max": 1.0, "step": 0.01},
),
"upscale_cfg": (
"FLOAT",
{"default": 1.0, "min": 0.0, "max": 20.0, "step": 0.1},
),
"upscale_noise_seed": (
"INT",
{
"default": 363742558835919,
"min": 0,
"max": 0xFFFFFFFFFFFFFFFF,
"control_after_generate": True,
},
),
},
"optional": {
"conditioning": ("CONDITIONING",),
"video_vae": ("VAE",),
"negative": ("CONDITIONING",),
"temporal_split_param": ("H3_TEMPORAL_PARAM",),
"upscale_sigmas": ("SIGMAS",),
},
}
INPUT_IS_LIST = True
RETURN_TYPES = ("LATENT", "LATENT", "H3_CONTINUUM_ASSEMBLY_PLAN", "STRING")
RETURN_NAMES = ("refined_video_latents", "audio_latents", "updated_assembly_plan", "status")
OUTPUT_IS_LIST = (True, True, False, False)
FUNCTION = "upscale"
CATEGORY = "Dumas/MiniMax H3/Upscale"
def upscale(
self,
model,
clip,
video_latents,
audio_latents,
assembly_plan,
refine_context,
latent_upscale_param,
spatial_split_param,
upscale_sampler,
upscale_scheduler,
upscale_steps,
upscale_denoise,
upscale_cfg,
upscale_noise_seed,
conditioning=None,
video_vae=None,
negative=None,
temporal_split_param=None,
upscale_sigmas=None,
):
latents = _clips(video_latents)
if not latents:
raise ValueError("video_latents must contain at least one clip")
if conditioning is None:
# The Continuum sampler's refine context is a runtime contract, not
# a Core CONDITIONING value. Reuse Continuum's own bridge so each
# physical clip receives its captured prompt/reference conditioning
# and its context-aware model clone at the target geometry.
prepare_physical_refine_groups = _continuum_helper("prepare_physical_refine_groups")
prepared = prepare_physical_refine_groups(
model=_one(model, "model"),
clip=_one(clip, "clip"),
video_latents=latents,
assembly_plan=_one(assembly_plan, "assembly_plan"),
refine_context=_one(refine_context, "refine_context"),
video_vae=(
None if video_vae is None else _one(video_vae, "video_vae")
),
)
models = prepared["group_models"]
conditionings = prepared["conditioning"]
if len(models) != len(latents) or len(conditionings) != len(latents):
raise ValueError(
"refine context bridge did not produce one model and conditioning "
"value per physical clip"
)
else:
models = _per_clip(model, len(latents), "model")
conditionings = _per_clip(conditioning, len(latents), "conditioning")
negatives = (
[None] * len(latents)
if negative is None
else _per_clip(negative, len(latents), "negative")
)
temporal = (
[None] * len(latents)
if temporal_split_param is None
else _per_clip(temporal_split_param, len(latents), "temporal_split_param")
)
sigma_values = (
[None] * len(latents)
if upscale_sigmas is None
else _per_clip(upscale_sigmas, len(latents), "upscale_sigmas")
)
sampler_name = str(_one(upscale_sampler, "upscale_sampler"))
scheduler_name = str(_one(upscale_scheduler, "upscale_scheduler"))
steps = int(_one(upscale_steps, "upscale_steps"))
denoise = float(_one(upscale_denoise, "upscale_denoise"))
cfg = float(_one(upscale_cfg, "upscale_cfg"))
seed = int(_one(upscale_noise_seed, "upscale_noise_seed"))
upscale_param = _one(latent_upscale_param, "latent_upscale_param")
spatial_param = _one(spatial_split_param, "spatial_split_param")
native = _native_node("MMH3UltimateUpscale")
random_noise = _native_node("RandomNoise")
sampler_select = _native_node("KSamplerSelect")
scheduler = _native_node("BasicScheduler")
is_dumas_2d = isinstance(upscale_param, dict) and upscale_param.get("dumas_h3_2d")
missing = [
name
for name, value in (
("MMH3UltimateUpscale", native),
("RandomNoise", random_noise),
("KSamplerSelect", sampler_select),
("BasicScheduler", scheduler),
)
if value is None
]
if missing:
raise RuntimeError("Missing native ComfyUI nodes: " + ", ".join(missing))
outputs = []
video_outputs = []
reports = []
build_av_latent = _continuum_helper("latent_from_cpu")
extract_av_streams = _continuum_helper("extract_av_streams")
audio_values = _clips(audio_latents)
if len(audio_values) != len(latents):
raise ValueError(
"audio_latents must contain one first-pass audio latent per physical clip"
)
if is_dumas_2d:
from .dumas_h3_latent_upscale_2d import DumasMMH3LatentUpscale2D
processor = DumasMMH3LatentUpscale2D()
for index, (clip_latent, clip_model, clip_conditioning) in enumerate(
zip(latents, models, conditionings), start=1
):
samples = clip_latent.get("samples") if isinstance(clip_latent, dict) else None
if samples is None or getattr(samples, "ndim", None) != 5:
raise ValueError(f"clip {index} is not a 5-D H3 LATENT")
upscaled, report = processor.upscale(
{"samples": samples},
model_name=upscale_param["model_name"],
width=upscale_param["target_width"],
height=upscale_param["target_height"],
tile_size=upscale_param["tile_size"],
tile_overlap=upscale_param["tile_overlap"],
sharpness=upscale_param["sharpness"],
device=upscale_param["device"],
precision=upscale_param["precision"],
)
audio_latent = audio_values[index - 1]
audio_samples = audio_latent.get("samples")
nested_latent = build_av_latent(upscaled["samples"], audio_samples)
noise = _unwrap_single_output(
random_noise().get_noise(seed + index - 1), "RandomNoise"
)
sampler = _unwrap_single_output(
sampler_select().get_sampler(sampler_name), "KSamplerSelect"
)
sigmas = sigma_values[index - 1]
if sigmas is None:
sigmas = _unwrap_single_output(
scheduler().get_sigmas(
clip_model, scheduler_name, steps, denoise
),
"BasicScheduler",
)
refine_kwargs = {
"model": clip_model,
"conditioning": clip_conditioning,
"latent": nested_latent,
"noise": noise,
"sampler": sampler,
"sigmas": sigmas,
"cfg": cfg,
# The 2D model has already performed the resize. Passing no
# learned-upscale parameter makes the native node resample
# the target-size tiles only.
"latent_upscale_param": None,
"temporal_split_param": None,
"spatial_split_param": spatial_param,
}
if negatives[index - 1] is not None:
refine_kwargs["negative"] = negatives[index - 1]
refined = _call_native(native, refine_kwargs)
if not isinstance(refined, (tuple, list)) or not refined:
raise RuntimeError(f"native refinement returned no output for clip {index}")
output = refined[0]
outputs.append(output)
output_samples, _ = extract_av_streams(output)
video_outputs.append({"samples": output_samples})
reports.append(f"clip {index}: {report}; native tiled refinement applied")
audio_outputs = _clips(audio_latents)
update_geometry = _continuum_helper("update_second_pass_geometry")
updated_plan = update_geometry(
_one(assembly_plan, "assembly_plan"), video_outputs
)
return (
outputs, audio_outputs, updated_plan,
"H3 Continuum DUMAS 2D spatial latent upscale; "
+ "; ".join(reports),
)
for index, (clip_latent, clip_model, clip_conditioning) in enumerate(
zip(latents, models, conditionings), start=1
):
samples = clip_latent.get("samples") if isinstance(clip_latent, dict) else None
if samples is None or getattr(samples, "ndim", None) != 5:
raise ValueError(f"clip {index} is not a 5-D H3 LATENT")
audio_latent = audio_values[index - 1]
audio_samples = (
audio_latent.get("samples")
if isinstance(audio_latent, dict) else None
)
if audio_samples is None:
raise ValueError(f"audio clip {index} is not a LATENT mapping")
nested_latent = build_av_latent(samples, audio_samples)
noise = _unwrap_single_output(
random_noise().get_noise(seed + index - 1), "RandomNoise"
)
sampler = _unwrap_single_output(
sampler_select().get_sampler(sampler_name), "KSamplerSelect"
)
sigmas = sigma_values[index - 1]
if sigmas is None:
sigmas = _unwrap_single_output(
scheduler().get_sigmas(
clip_model, scheduler_name, steps, denoise
),
"BasicScheduler",
)
kwargs = {
"model": clip_model,
"conditioning": clip_conditioning,
"latent": nested_latent,
"noise": noise,
"sampler": sampler,
"sigmas": sigmas,
"cfg": cfg,
"latent_upscale_param": upscale_param,
"temporal_split_param": temporal[index - 1],
"spatial_split_param": spatial_param,
}
if negatives[index - 1] is not None:
kwargs["negative"] = negatives[index - 1]
result = _call_native(native, kwargs)
if not isinstance(result, (tuple, list)) or not result:
raise RuntimeError(f"native upscale returned no output for clip {index}")
output = result[0]
try:
output_samples, _ = extract_av_streams(output)
except Exception as exc:
raise RuntimeError(
f"native upscale returned an invalid AV latent for clip {index}: {exc}"
) from exc
if output_samples.shape[2] != samples.shape[2]:
raise RuntimeError(f"tiled upscale changed temporal length for clip {index}")
outputs.append(output)
# The native node returns an H3 AV latent (video + audio nested in
# ``samples``), while the Continuum geometry contract deliberately
# accepts plain video LATENT mappings. Keep the AV latent for the
# node output, but pass only the extracted video tensor to the
# geometry validator/update helper.
video_outputs.append({"samples": output_samples})
reports.append(
f"clip {index}: {tuple(samples.shape)} -> {tuple(output_samples.shape)}"
)
audio_outputs = _clips(audio_latents)
if len(audio_outputs) != len(outputs):
raise ValueError(
"audio_latents must contain one first-pass audio latent per physical clip"
)
update_geometry = _continuum_helper("update_second_pass_geometry")
updated_plan = update_geometry(
_one(assembly_plan, "assembly_plan"), video_outputs
)
return (
outputs,
audio_outputs,
updated_plan,
"H3 Continuum per-clip tiled upscale replacement; "
f"clips={len(outputs)}, sampler={sampler_name}, scheduler={scheduler_name}, "
f"steps={steps}, denoise={denoise:g}, cfg={cfg:g}, seed_base={seed}; "
"audio=first-pass passthrough; " + "; ".join(reports),
)
NODE_CLASS_MAPPINGS = {
"DumasH3ContinuumTiledLatentUpscalePerClip": DumasH3ContinuumTiledLatentUpscalePerClip,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"DumasH3ContinuumTiledLatentUpscalePerClip": (
"DUMAS H3 Continuum Tiled Latent Upscale (Per Clip)"
),
}
+222 -37
View File
@@ -1,7 +1,9 @@
"""Generic image utilities for ComfyUI."""
import os
import json
import re
import threading
import time
import uuid
from collections import OrderedDict
@@ -14,6 +16,7 @@ import folder_paths
_IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".webp", ".bmp", ".gif", ".tif", ".tiff"}
_SERVE_TOKENS = OrderedDict()
_SAVE_COUNTER_LOCK = threading.Lock()
def resolve_serve_token(token):
@@ -27,30 +30,81 @@ def _folder_is_image(name):
def _list_folder_image_files(real_folder, recursive=False):
root = Path(real_folder)
paths = root.rglob("*") if recursive else root.glob("*")
return sorted(str(path.relative_to(root)).replace(os.sep, "/") for path in paths if path.is_file() and _folder_is_image(path.name))
files = []
for path in paths:
if path.is_file() and _folder_is_image(path.name):
files.append({
"file": str(path.relative_to(root)).replace(os.sep, "/"),
"mtime": path.stat().st_mtime,
})
return sorted(files, key=lambda item: item["file"].lower())
def _next_counter_for_relative_path(base_directory, relative_template):
template = str(relative_template).replace("%counter%", "*")
parent = Path(base_directory) / Path(template).parent
stem = Path(template).name
if not parent.exists():
relative_template = str(relative_template).replace("\\", "/")
if "%counter%" not in relative_template:
return 1
pattern = re.compile(re.escape(stem).replace(r"\*", r"(\d+)") + r"(?:\.[^.]+)?$")
base = Path(base_directory)
if not base.exists():
return 1
pattern = re.compile(
re.escape(relative_template).replace(re.escape("%counter%"), r"(\d+)")
)
highest = 0
for path in parent.iterdir():
match = pattern.match(path.name)
for path in base.rglob("*"):
if not path.is_file():
continue
relative_path = path.relative_to(base).as_posix()
match = pattern.fullmatch(relative_path)
if match:
highest = max(highest, int(match.group(1)))
return highest + 1
def _next_available_relative_path(base_directory, relative_path):
"""Return a collision-free relative path, adding a counter when needed."""
relative_path = str(relative_path).replace("\\", "/")
if "%counter%" in relative_path:
counter = _next_counter_for_relative_path(base_directory, relative_path)
return relative_path.replace("%counter%", str(counter).zfill(3))
candidate = Path(base_directory) / Path(relative_path)
if not candidate.exists():
return relative_path
path = Path(relative_path)
suffix = path.suffix
name = path.name[:-len(suffix)] if suffix else path.name
counter_template = str(path.with_name(f"{name}_%counter%{suffix}")).replace("\\", "/")
counter = _next_counter_for_relative_path(base_directory, counter_template)
return counter_template.replace("%counter%", str(counter).zfill(3))
def _image_to_pil(image):
array = image.detach().cpu().numpy() if hasattr(image, "detach") else image.cpu().numpy()
array = (array[..., :3].clip(0, 1) * 255).astype("uint8")
return Image.fromarray(array)
def _is_within_directory(parent, child):
try:
return os.path.commonpath([os.path.realpath(parent), os.path.realpath(child)]) == os.path.realpath(parent)
except ValueError:
return False
def _build_pnginfo(prompt=None, extra_pnginfo=None):
if not prompt and not extra_pnginfo:
return None
from PIL.PngImagePlugin import PngInfo
info = PngInfo()
if prompt is not None:
info.add_text("prompt", json.dumps(prompt, ensure_ascii=False))
for key, value in (extra_pnginfo or {}).items():
info.add_text(str(key), json.dumps(value, ensure_ascii=False))
return info
class DumasImageCompareNode:
@classmethod
def INPUT_TYPES(cls):
@@ -67,14 +121,20 @@ class DumasImageCompareNode:
for slot, image in enumerate((image1, image2), 1):
if image is None:
continue
path = Path(folder_paths.get_temp_directory()) / f"dumas_compare_{slot}.png"
# The compare viewer can be used by several executions at once.
# Fixed filenames caused one run to replace another run's preview.
path = Path(folder_paths.get_temp_directory()) / f"dumas_compare_{uuid.uuid4().hex}_{slot}.png"
path.parent.mkdir(parents=True, exist_ok=True)
_image_to_pil(image[0]).save(path)
images.append({"filename": path.name, "subfolder": "", "type": "temp", "slot": slot})
return {"ui": {"images": images}, "result": (image2 or image1,)}
# Tensors cannot be used as Python booleans when they contain more
# than one value. Select the second slot by presence explicitly.
result = image2 if image2 is not None else image1
return {"ui": {"images": images}, "result": (result,)}
class DumasSaveImageNode:
DESCRIPTION = "Save image batches with collision-safe names and ComfyUI previews."
@classmethod
def INPUT_TYPES(cls):
return {
@@ -88,27 +148,85 @@ class DumasSaveImageNode:
"save_on_run": ("BOOLEAN", {"default": True}),
},
"optional": {"name": ("STRING", {"default": ""}), "name_2": ("STRING", {"default": ""})},
"hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"},
}
RETURN_TYPES = ()
@classmethod
def IS_CHANGED(cls, **_kwargs):
return float("nan")
RETURN_TYPES = ("IMAGE", "STRING", "STRING")
RETURN_NAMES = ("image", "folder", "filename")
# A batch can produce more than one filename; keep the image batch and
# folder scalar while exposing the generated names as a STRING list.
OUTPUT_IS_LIST = (False, False, True)
FUNCTION = "save_images"
CATEGORY = "Dumas/Image"
OUTPUT_NODE = True
def save_images(self, images, folder, pattern, format, quality, embed_workflow, save_on_run, name="", name_2="", **_kwargs):
del embed_workflow, save_on_run
base = Path(folder or folder_paths.get_output_directory())
def save_images(self, images, folder, pattern, format, quality, embed_workflow, save_on_run,
name="", name_2="", prompt=None, extra_pnginfo=None, **_kwargs):
if not save_on_run:
# Match the preview/save split used by Pixaroma: Preview mode must
# still produce visible, temporary images, but must not write to
# the selected destination folder.
temp_dir = Path(folder_paths.get_temp_directory()).resolve()
temp_dir.mkdir(parents=True, exist_ok=True)
preview_images = []
preview_format = str(format or "png").lower()
extension = ".jpg" if preview_format == "jpg" else (
".webp" if preview_format == "webp" else ".png"
)
for index, image in enumerate(images):
path = temp_dir / f"dumas_save_preview_{uuid.uuid4().hex}{extension}"
pil = _image_to_pil(image)
if preview_format == "jpg":
pil.convert("RGB").save(path, "JPEG", quality=max(1, min(100, int(quality))))
elif preview_format == "webp":
pil.save(path, "WEBP", quality=max(1, min(100, int(quality))))
else:
pil.save(path, "PNG", pnginfo=_build_pnginfo(prompt, extra_pnginfo) if embed_workflow else None)
preview_images.append({"filename": path.name, "subfolder": "", "type": "temp"})
return {
"ui": {"images": preview_images},
"result": (images, str(temp_dir), [item["filename"] for item in preview_images]),
}
output_dir = Path(folder_paths.get_output_directory()).resolve()
base = Path(folder).expanduser().resolve() if str(folder or "").strip() else output_dir
base.mkdir(parents=True, exist_ok=True)
for index, image in enumerate(images):
width, height = int(image.shape[2]), int(image.shape[1])
stem = pattern.replace("%input%", _safe_token(name)).replace("%input2%", _safe_token(name_2))
stem = stem.replace("%width%", str(width)).replace("%height%", str(height)).replace("%batch_num%", str(index))
stem = re.sub(r"%counter%", f"{index + 1:03d}", stem)
path = base / f"{stem}.{format}"
path.parent.mkdir(parents=True, exist_ok=True)
options = {"quality": quality} if format in {"jpg", "webp"} else {}
_image_to_pil(image).save(path, **options)
return {"ui": {"images": []}}
ui_images = []
extension = ".jpg" if format == "jpg" else f".{format}"
# Counter selection and the corresponding writes must be one critical
# section. Without this, overlapping ComfyUI executions can both see
# the same highest existing counter and overwrite one another.
with _SAVE_COUNTER_LOCK:
for index, image in enumerate(images):
width, height = int(image.shape[2]), int(image.shape[1])
stem = str(pattern or "image_%counter%")
stem = stem.replace("%input%", _safe_token(name)).replace("%input2%", _safe_token(name_2))
stem = stem.replace("%width%", str(width)).replace("%height%", str(height)).replace("%batch_num%", str(index))
relative = stem.replace("\\", "/") + extension
relative = _next_available_relative_path(str(base), relative)
path = base / Path(relative)
path.parent.mkdir(parents=True, exist_ok=True)
pil = _image_to_pil(image)
if format == "jpg":
pil.convert("RGB").save(path, "JPEG", quality=max(1, min(100, int(quality))))
elif format == "webp":
pil.save(path, "WEBP", quality=max(1, min(100, int(quality))))
else:
pil.save(path, "PNG", pnginfo=_build_pnginfo(prompt, extra_pnginfo) if embed_workflow else None)
if _is_within_directory(str(output_dir), str(path)):
subfolder = str(path.parent.relative_to(output_dir)).replace(os.sep, "/")
ui_images.append({"filename": path.name, "subfolder": "" if subfolder == "." else subfolder, "type": "output"})
else:
token = uuid.uuid4().hex
_SERVE_TOKENS[token] = str(path)
ui_images.append({"filename": path.name, "subfolder": str(path.parent).replace(os.sep, "/"), "type": "external", "token": token})
return {
"ui": {"images": ui_images},
"result": (images, str(base), [item["filename"] for item in ui_images]),
}
def _safe_token(value):
@@ -118,24 +236,91 @@ def _safe_token(value):
class DumasLoadImagesFolderNode:
@classmethod
def INPUT_TYPES(cls):
return {"required": {"folder": ("STRING", {"default": ""})}}
# The browser UI stores its complete selection in this hidden input.
# Keep an optional folder for old workflows which used the original
# single-folder widget before the Pixaroma-style picker was added.
return {
"optional": {"folder": ("STRING", {"default": ""})},
"hidden": {"LoadImagesFolderState": ("STRING", {"default": ""})},
}
RETURN_TYPES = ("IMAGE", "MASK", "INT", "INT", "STRING", "INT", "INT")
RETURN_NAMES = ("image", "mask", "width", "height", "filename", "index", "total")
RETURN_TYPES = ("IMAGE", "MASK", "INT", "INT", "STRING", "INT", "INT", "STRING")
RETURN_NAMES = ("image", "mask", "width", "height", "filename", "index", "total", "path")
OUTPUT_IS_LIST = (True, True, True, True, True, True, True, True)
FUNCTION = "load"
CATEGORY = "Dumas/Image"
def load(self, folder):
files = sorted(path for path in Path(folder).iterdir() if path.suffix.lower() in _IMAGE_EXTENSIONS) if folder and Path(folder).is_dir() else []
if not files:
raise ValueError("No image files found in the selected folder.")
image = Image.open(files[0]).convert("RGB")
import torch
def load(self, folder="", LoadImagesFolderState="", **_kwargs):
state = {}
if LoadImagesFolderState:
try:
state = json.loads(LoadImagesFolderState)
except (TypeError, ValueError):
state = {}
selected_folder = str(state.get("folder") or folder or "").strip()
root = Path(selected_folder).expanduser()
if not root.is_dir():
raise ValueError("Selected image folder does not exist.")
recursive = bool(state.get("recursive", False))
candidates = [Path(item["file"]) for item in _list_folder_image_files(str(root), recursive)]
by_relative = {path.as_posix(): path for path in candidates}
selected = [str(value).replace("\\", "/") for value in (state.get("selected") or [])]
mode = str(state.get("selection_mode") or "selected")
if state:
if mode == "all":
relative_files = [path.as_posix() for path in candidates]
elif mode == "first_n":
try:
count = max(0, int(state.get("first_n", 0)))
except (TypeError, ValueError):
count = 0
relative_files = [path.as_posix() for path in candidates[:count]]
elif mode == "random":
import random
relative_files = [random.choice([path.as_posix() for path in candidates])] if candidates else []
else:
relative_files = [value for value in selected if value in by_relative]
else:
# Legacy workflows without the hidden state load the whole folder.
relative_files = [path.as_posix() for path in candidates]
if not relative_files:
raise ValueError("No images selected in the folder.")
sort_name = str(state.get("sort") or "name")
reverse = str(state.get("sort_dir") or "asc").lower() == "desc"
if sort_name == "date":
relative_files.sort(key=lambda name: (root / name).stat().st_mtime, reverse=reverse)
else:
relative_files.sort(key=str.lower, reverse=reverse)
import numpy as np
tensor = torch.from_numpy(np.asarray(image).astype("float32") / 255.0)[None, ...]
height, width = image.height, image.width
mask = torch.zeros((1, height, width), dtype=torch.float32)
return tensor, mask, width, height, files[0].name, 0, len(files)
import torch
images, masks, widths, heights, names, indexes, totals, paths = [], [], [], [], [], [], [], []
total = len(relative_files)
for index, relative in enumerate(relative_files):
path = (root / relative).resolve()
if not _is_within_directory(root, path) or not path.is_file():
continue
with Image.open(path) as source:
source = source.convert("RGBA")
rgba = np.asarray(source).astype("float32") / 255.0
image = torch.from_numpy(rgba[..., :3].copy())[None, ...]
mask = torch.from_numpy((1.0 - rgba[..., 3]).copy())
images.append(image)
masks.append(mask)
widths.append(int(source.width))
heights.append(int(source.height))
names.append(path.name)
indexes.append(index)
totals.append(total)
paths.append(str(path))
if not images:
raise ValueError("No readable images were found in the selected folder.")
return images, masks, widths, heights, names, indexes, totals, paths
NODE_CLASS_MAPPINGS = {
+150
View File
@@ -0,0 +1,150 @@
"""Dumas MiniMax-H3 helpers.
This module intentionally does not vendor the third-party H3 LongVideos node.
It provides the missing tiled latent second pass around the native
``MMH3UltimateUpscale`` node that is already used by the user's H3 workflow.
The node keeps its own sampling controls, so changing the upscale pass cannot
silently change the base H3 render.
"""
def _sampler_options():
try:
import comfy.samplers
return list(comfy.samplers.KSampler.SAMPLERS)
except Exception: # import-time test fallback
return ["euler", "euler_ancestral", "res_multistep", "sa_solver"]
def _scheduler_options():
try:
import comfy.samplers
return list(comfy.samplers.KSampler.SCHEDULERS)
except Exception: # import-time test fallback
return ["simple", "beta", "sgm_uniform", "karras", "exponential"]
def _native_node(name):
try:
import nodes
mapping = getattr(nodes, "NODE_CLASS_MAPPINGS", {}) or {}
cls = mapping.get(name)
if cls is not None:
return cls
except Exception:
pass
return None
class DumasMMH3TiledLatentUpscale:
"""Run a tiled MiniMax-H3 latent upscale/refinement pass.
The incoming latent is normally the output of the base H3 sampler. The
native MMH3 upscale node performs the actual model-specific tiled work;
this wrapper creates its noise, sampler and sigma schedule from its own
widgets and passes through the user's spatial split parameter object.
"""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"model": ("MODEL",),
"conditioning": ("CONDITIONING",),
"latent": ("LATENT",),
"latent_upscale_param": ("H3_UPSCALE_PARAM",),
"spatial_split_param": ("H3_SPATIAL_PARAM",),
"upscale_sampler": (_sampler_options(), {"default": "euler_ancestral"}),
"upscale_scheduler": (_scheduler_options(), {"default": "simple"}),
"upscale_steps": ("INT", {"default": 3, "min": 1, "max": 50}),
"upscale_denoise": ("FLOAT", {"default": 0.2, "min": 0.0, "max": 1.0, "step": 0.01}),
"upscale_cfg": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 20.0, "step": 0.1}),
"upscale_noise_seed": ("INT", {"default": 363742558835919, "min": 0, "max": 0xffffffffffffffff, "control_after_generate": True}),
},
"optional": {
"negative": ("CONDITIONING",),
"temporal_split_param": ("H3_TEMPORAL_PARAM",),
"upscale_sigmas": ("SIGMAS",),
},
}
RETURN_TYPES = ("LATENT", "STRING")
RETURN_NAMES = ("upscaled_latent", "info")
FUNCTION = "upscale"
CATEGORY = "Dumas/MiniMax H3/Upscale"
def upscale(
self, model, conditioning, latent, latent_upscale_param,
spatial_split_param, upscale_sampler, upscale_scheduler,
upscale_steps, upscale_denoise, upscale_cfg, upscale_noise_seed,
negative=None, temporal_split_param=None, upscale_sigmas=None,
):
native = _native_node("MMH3UltimateUpscale")
if native is None:
raise RuntimeError(
"MMH3UltimateUpscale is not installed. Install/update the MiniMax-H3 "
"node pack that provides the native tiled upscale node."
)
random_noise = _native_node("RandomNoise")
sampler_select = _native_node("KSamplerSelect")
scheduler = _native_node("BasicScheduler")
missing = [
name for name, value in (("RandomNoise", random_noise),
("KSamplerSelect", sampler_select),
("BasicScheduler", scheduler))
if value is None
]
if missing:
raise RuntimeError("Missing native ComfyUI nodes: " + ", ".join(missing))
noise = random_noise().get_noise(int(upscale_noise_seed))
sampler = sampler_select().get_sampler(str(upscale_sampler))
sigmas = upscale_sigmas
if sigmas is None:
sigmas = scheduler().get_sigmas(
model, str(upscale_scheduler), int(upscale_steps), float(upscale_denoise)
)
kwargs = {
"model": model,
"conditioning": conditioning,
"latent": latent,
"noise": noise,
"sampler": sampler,
"sigmas": sigmas,
"cfg": float(upscale_cfg),
"latent_upscale_param": latent_upscale_param,
"temporal_split_param": temporal_split_param,
"spatial_split_param": spatial_split_param,
}
if negative is not None:
kwargs["negative"] = negative
result = native().upscale(**kwargs)
if not isinstance(result, (tuple, list)) or not result:
raise RuntimeError("MMH3UltimateUpscale returned no latent output.")
output = result[0]
if not isinstance(output, dict) or "samples" not in output:
raise RuntimeError("MMH3UltimateUpscale returned an unexpected latent object.")
samples = output["samples"]
if samples.ndim != 5:
raise RuntimeError(f"Expected a 5-D H3 latent, got shape {tuple(samples.shape)}.")
if samples.shape[2] != latent["samples"].shape[2]:
raise RuntimeError("Tiled spatial upscale changed the temporal latent length.")
info = (
"Dumas tiled MiniMax-H3 latent upscale: "
f"sampler={upscale_sampler}, scheduler={upscale_scheduler}, "
f"steps={int(upscale_steps)}, denoise={float(upscale_denoise):g}, "
f"cfg={float(upscale_cfg):g}, noise_seed={int(upscale_noise_seed)}; "
"spatial split supplied by MMH3SpatialSplitParams"
)
return output, info
NODE_CLASS_MAPPINGS = {
"DumasMMH3TiledLatentUpscale": DumasMMH3TiledLatentUpscale,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"DumasMMH3TiledLatentUpscale": "DUMAS MiniMax-H3 Tiled Latent Upscale",
}
+152
View File
@@ -0,0 +1,152 @@
"""Reference-image prompt helper for reusable image references."""
from __future__ import annotations
REFERENCE_TYPES = ("Character", "Object", "Scene", "Creature", "Vehicle")
REFERENCE_IDS = tuple(str(index) for index in range(1, 10))
def reference_token(reference_id: str | int) -> str:
"""Return the Continuum reference token for a user-facing ID."""
try:
index = int(reference_id)
except (TypeError, ValueError) as exc:
raise ValueError("reference_id must be an integer from 1 to 9") from exc
if index < 1 or index > 9:
raise ValueError("reference_id must be an integer from 1 to 9")
return f"@R{index}"
_TEMPLATES = {
"Character": (
"Describe the character in exquisite detail. Include clothing, accessories, body type, proportions, and size. "
"The character will be referred to as {token} and should be treated as a photographic representation of a real person, so start the description with {token}. "
"Do not refer to individual shots; treat this as a visual description of the character. "
"Please provide a comprehensive, well-organized, and formatted description that includes:"
"Age: Exact or approximate age (e.g., 28, young adult, elderly, etc.),"
"Ethnicity: Specify ethnicity (e.g., Caucasian, African American, Asian, Hispanic, Indigenous, Middle Eastern, etc.) — include any distinguishing physical traits if relevant,"
"Body Type & Proportions: Overall build (e.g., athletic, slender, curvy, tall, short, petite, stocky), limb length, facial structure, torso shape, and general body symmetry,"
"Size Metrics (where applicable):"
"- Height (in cm or ft/inches),"
"- Bust, waist, hips (if visible or inferred)"
"- Arm span / leg length (if relevant),"
"- Head size / facial features (e.g., chin, jawline, nose, brow shape),"
"Body Part Details:"
"Head: Hair color, texture, style, facial hair (if any), skin tone, facial features,"
"Eyes: Color, shape, size, expression,"
"Nose: Shape, size, prominence,"
"Lips: Shape, color, fullness,"
"Ears: Size, shape, earlobe detail,"
"Skin: Tone, texture, blemishes, scars, freckles, or other markings,"
"Torso: Chest, shoulders, neck, back, spine curvature,"
"Arms: Forearm thickness, bicep size, shoulder width, hand size and shape,"
"Legs: Thigh, calf, knee, ankle, foot size and shape,"
"Buttocks: Shape, size, muscle definition,"
"Intimate Areas** (include all where applicable based on gender):"
"Tits: Size, shape, firmness, areola color, nipple visibility,"
"Pussy**: Size, shape, labia, vaginal opening, surrounding skin tone and texture,"
"Cock: Length, girth, shape, pubic hair, surrounding skin, base size"
"Clothing & Accessories:"
"Type, color, fabric, fit, style (e.g., tight, loose, formal, casual, athletic)"
"Visible patterns, logos, stitching"
"Footwear, jewelry, headwear, bags, gloves, belts, or other accessories"
"Posture & Expression**: Body orientation, stance, facial expression, gaze direction"
"Format your response as follows:"
"{token}: [Detailed description here]"
"Example:"
"Token: A 32-year-old African American woman, 5'7\", athletic build with slim legs and hourglass figure. "
"Wearing black high-waisted leggings and a cropped tank top revealing toned abs. Her skin is medium-toned with faint freckles across cheeks. "
"Eyes are almond-shaped and dark brown, lips full and pink. Hair is curly, shoulder-length, and dark brown. "
"Bust 34D, waist 26\", hips 38\". "
"Titted slightly forward, nipples visible through thin fabric. Pussy is small, labia majora small, natural pink skin tone. "
"Cock is medium-length, girth around 10cm, erect with pubic hair neatly trimmed. Standing in a studio with soft backlighting."
"Lets begin with: "
"{token}:"
),
"Object": (
"Describe the object in the image in exquisite detail. Include its shape, "
"size, materials, colours, construction, surface detail, condition, and "
"distinctive features. The object will be referred to as {token}. Do not "
"refer to individual shots; treat this as a visual description of the object."
),
"Scene": (
"Describe the scene in the image in exquisite detail. Include the "
"environment, architecture, spatial layout, lighting, atmosphere, colours, "
"perspective, and important background elements. The scene will be referred "
"to as {token}. Do not refer to individual shots; treat this as a visual "
"description of the scene."
),
"Creature": (
"Describe the creature in the image in exquisite detail. Include its anatomy, "
"body structure, size, proportions, skin, fur, scales, colouring, distinctive "
"features, expression, and physical condition. The creature will be referred "
"to as {token}. Do not refer to individual shots; treat this as a visual "
"description of the creature."
),
"Vehicle": (
"Describe the vehicle in the image in exquisite detail. Include its type, "
"dimensions, shape, materials, colours, design, mechanical features, "
"condition, markings, and distinctive details. The vehicle will be referred "
"to as {token}. Do not refer to individual shots; treat this as a visual "
"description of the vehicle."
),
}
def build_reference_prompt(reference_type: str, reference_id: str | int, description: str = "") -> str:
"""Build the editable prompt shown by the node."""
if reference_type not in _TEMPLATES:
raise ValueError(f"reference_type must be one of: {', '.join(REFERENCE_TYPES)}")
token = reference_token(reference_id)
prompt = _TEMPLATES[reference_type].format(token=token)
extra = str(description or "").strip()
if extra:
prompt += f'\n\nAdditional information about the {reference_type.lower()}: "{extra}"'
return prompt
class DumasReferenceImagePreprocessor:
"""Keep an image unchanged and generate an editable reference prompt."""
CATEGORY = "Dumas/Reference"
DESCRIPTION = (
"Pass through a reference image and create an editable @R1–@R9 prompt "
"for a Character, Object, Scene, Creature, or Vehicle."
)
RETURN_TYPES = ("IMAGE", "STRING")
RETURN_NAMES = ("image", "reference_prompt")
FUNCTION = "process"
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"image": ("IMAGE",),
"reference_type": (list(REFERENCE_TYPES), {"default": "Character"}),
"reference_id": (list(REFERENCE_IDS), {"default": "1"}),
"description": ("STRING", {"default": "", "multiline": True}),
"generated_prompt": (
"STRING",
{
"default": build_reference_prompt("Character", "1"),
"multiline": True,
},
),
}
}
def process(self, image, reference_type, reference_id, description, generated_prompt):
prompt = str(generated_prompt or "").strip()
if not prompt:
prompt = build_reference_prompt(reference_type, reference_id, description)
return (image, prompt)
NODE_CLASS_MAPPINGS = {"DumasReferenceImagePreprocessor": DumasReferenceImagePreprocessor}
NODE_DISPLAY_NAME_MAPPINGS = {
"DumasReferenceImagePreprocessor": "DUMAS Reference Image Preprocessor",
}
+77
View File
@@ -0,0 +1,77 @@
"""DUMAS resolution helpers inspired by Pixaroma's Resolution node."""
from __future__ import annotations
import json
DEFAULT_STATE = {
"mode": "preset",
"ratio": "1:1",
"w": 1024,
"h": 1024,
"custom_w": 1024,
"custom_h": 1024,
"custom_ratio_w": 4,
"custom_ratio_h": 3,
"snap": 16,
"batch": 1,
}
def _clamp(value, low=64, high=16384):
return max(low, min(high, int(value)))
def resolution_wh(state_text):
try:
state = json.loads(state_text or "{}")
width = _clamp(state.get("w", DEFAULT_STATE["w"]))
height = _clamp(state.get("h", DEFAULT_STATE["h"]))
except (TypeError, ValueError, json.JSONDecodeError):
width, height = DEFAULT_STATE["w"], DEFAULT_STATE["h"]
return width, height
def _empty_latent(state_text, width, height):
import torch
try:
batch = int(json.loads(state_text or "{}").get("batch", 1))
except (TypeError, ValueError, json.JSONDecodeError):
batch = 1
batch = max(1, min(64, batch))
return {"samples": torch.zeros((batch, 4, max(1, height // 8), max(1, width // 8)))}
class DumasResolutionNode:
DESCRIPTION = (
"DUMAS Resolution picker based on Pixaroma. Choose an AI-friendly aspect "
"ratio and size, or enter a custom ratio/resolution with snapping. Outputs "
"width, height, and an Empty-Latent-compatible image latent."
)
@classmethod
def INPUT_TYPES(cls):
return {
"required": {},
"hidden": {
"ResolutionState": (
"STRING",
{"default": json.dumps(DEFAULT_STATE)},
),
},
}
RETURN_TYPES = ("INT", "INT", "LATENT")
RETURN_NAMES = ("width", "height", "latent")
FUNCTION = "get_resolution"
CATEGORY = "Dumas/Values"
def get_resolution(self, ResolutionState=""):
width, height = resolution_wh(ResolutionState)
return width, height, _empty_latent(ResolutionState, width, height)
NODE_CLASS_MAPPINGS = {"DumasResolution": DumasResolutionNode}
NODE_DISPLAY_NAME_MAPPINGS = {"DumasResolution": "DUMAS Resolution"}
+156
View File
@@ -0,0 +1,156 @@
"""Namespaced registrations for the complete vendored H3 upstream packs.
The source is kept under ``vendor/`` with its licenses and upstream layout
intact. This module is the only integration point: every upstream node gets a
DUMAS-prefixed ComfyUI id so the original packs can remain installed without
node-id collisions.
"""
from __future__ import annotations
import importlib
import logging
import copy
import dataclasses
import types
_PACKAGES = (
(".vendor.dumas_h3_continuum", "H3 Continuum", "DumasH3Continuum", "Dumas/MiniMax H3/Continuum"),
(".vendor.dumas_minimax_h3_refmod", "MiniMax H3 RefMod", "DumasMiniMaxH3RefMod", "Dumas/MiniMax H3/RefMod"),
(".vendor.dumas_h3_refmod_picker", "H3 RefMod Picker", "DumasH3RefModPicker", "Dumas/MiniMax H3/RefMod Picker"),
)
def _load_pack(package_name):
try:
return importlib.import_module(package_name)
except Exception:
logging.getLogger("DumasNodes").exception(
"Could not load vendored upstream pack %s", package_name,
)
return None
def _patch_schema(schema, *, node_id, category, display_name):
"""Return an upstream schema with DUMAS identity and category.
Comfy's modern schema objects have changed from mutable dataclasses to
immutable value objects across API revisions. Support both forms so the
vendored nodes remain usable on the same Comfy versions as their source
packs.
"""
changes = {"node_id": node_id, "category": category, "display_name": display_name}
if dataclasses.is_dataclass(schema):
try:
return dataclasses.replace(schema, **changes)
except (TypeError, ValueError):
pass
patched = copy.copy(schema)
for name, value in changes.items():
try:
setattr(patched, name, value)
except (AttributeError, TypeError):
try:
object.__setattr__(patched, name, value)
except (AttributeError, TypeError):
raise TypeError(
f"Cannot namespace Comfy schema {type(schema).__name__}.{name}"
) from None
return patched
def _namespace_class(node_class, *, node_id, category, display_name):
"""Wrap an upstream class without changing its execution implementation."""
define_schema = getattr(node_class, "define_schema", None)
if define_schema is None:
namespaced = types.new_class(node_class.__name__, (node_class,))
namespaced.CATEGORY = category
namespaced.NODE_CATEGORY = category
else:
def _define_schema(cls):
schema = node_class.define_schema()
return _patch_schema(
schema,
node_id=node_id,
category=category,
display_name=display_name,
)
namespaced = types.new_class(node_class.__name__, (node_class,))
namespaced.define_schema = classmethod(_define_schema)
# Older Comfy builds still inspect these class attributes while
# constructing the node search index.
namespaced.CATEGORY = category
namespaced.NODE_CATEGORY = category
if node_id == "DumasH3Continuum_H3ContinuumSamplerV39":
namespaced = _clean_v39_sampler_input(namespaced)
namespaced.__module__ = __name__
namespaced.__qualname__ = node_class.__qualname__
namespaced.__name__ = node_class.__name__
namespaced.__dumas_upstream_id__ = node_id
return namespaced
def _clean_v39_sampler_input(node_class):
"""Keep the DUMAS V3.9 manual-dimension surface without RefMods.
The sampler uses Continuum's native V3.9 ``reference_images`` bundle. We
retain the DUMAS cleanup that makes linked width/height authoritative and
removes duplicate legacy audio controls, without adding a second RefMod
conditioning path.
"""
original_input_types = node_class.INPUT_TYPES
@classmethod
def INPUT_TYPES(cls):
schema = original_input_types()
schema = {name: dict(value) for name, value in schema.items()}
required = dict(schema.get("required", {}))
for name in ("aspect", "preset", "custom_mp", "size_source"):
required.pop(name, None)
schema["required"] = required
optional = dict(schema.get("optional", {}))
for name in ("reference_audio_1", "reference_audio_vae"):
optional.pop(name, None)
schema["optional"] = optional
return schema
def run(self, **kwargs):
kwargs["size_source"] = "Manual"
kwargs.pop("aspect", None)
kwargs.pop("preset", None)
kwargs.pop("custom_mp", None)
return super(node_class, self).run(**kwargs)
node_class.run = run
node_class.INPUT_TYPES = INPUT_TYPES
return node_class
def _namespaced_mappings():
mappings = {}
display = {}
for relative_name, label, prefix, category in _PACKAGES:
package_name = (f"{__package__}{relative_name}" if __package__
else relative_name.lstrip("."))
pack = _load_pack(package_name)
if pack is None:
continue
source_mappings = getattr(pack, "NODE_CLASS_MAPPINGS", {}) or {}
source_display = getattr(pack, "NODE_DISPLAY_NAME_MAPPINGS", {}) or {}
for node_id, node_class in source_mappings.items():
dumas_id = f"{prefix}_{node_id}"
original_name = source_display.get(node_id, node_id)
dumas_name = f"DUMAS {label} · {original_name}"
mappings[dumas_id] = _namespace_class(
node_class,
node_id=dumas_id,
category=category,
display_name=dumas_name,
)
display[dumas_id] = dumas_name
return mappings, display
NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS = _namespaced_mappings()
+226 -22
View File
@@ -21,6 +21,11 @@ except ImportError: # The ComfyUI runtime provides NumPy; keep import-time test
import folder_paths
try:
from .dumas_image_nodes import _next_available_relative_path
except ImportError: # Support the lightweight standalone test import.
from dumas_image_nodes import _next_available_relative_path
_SAFE_NAME = re.compile(r"[^A-Za-z0-9_.-]+")
@@ -72,7 +77,7 @@ def _write_wav(audio, path, start_sample=0):
return sample_rate
def _encode_images(images, audio, output_path, fps, start_frame=0):
def _encode_images(images, audio, output_path, fps, start_frame=0, quality=18):
if images is None or len(images) <= start_frame:
raise ValueError("Dumas video output has no frames after the requested overlap.")
first = images[0].detach().cpu().numpy() if hasattr(images[0], "detach") else np.asarray(images[0])
@@ -93,7 +98,8 @@ def _encode_images(images, audio, output_path, fps, start_frame=0):
]
if wav_path is not None:
command += ["-i", str(wav_path)]
command += ["-map", "0:v:0", "-c:v", "libx264", "-preset", "fast", "-crf", "18", "-pix_fmt", "yuv420p"]
crf = max(1, min(51, int(quality)))
command += ["-map", "0:v:0", "-c:v", "libx264", "-preset", "fast", "-crf", str(crf), "-pix_fmt", "yuv420p"]
if wav_path is not None:
command += ["-map", "1:a:0", "-c:a", "aac", "-b:a", "192k", "-shortest"]
command += ["-movflags", "+faststart", str(output_path)]
@@ -144,6 +150,62 @@ def _join_signature(info):
)
def _video_fps(info):
streams = info.get("streams", [])
video = next((item for item in streams if item.get("codec_type") == "video"), None)
if video is None:
raise ValueError("Every joined clip must contain a video stream.")
raw = str(video.get("r_frame_rate") or video.get("avg_frame_rate") or "")
try:
numerator, denominator = raw.split("/", 1)
fps = float(numerator) / float(denominator)
except (ValueError, ZeroDivisionError):
fps = 0.0
if fps <= 0:
raise ValueError("Could not determine a valid video frame rate.")
return fps
def _trim_stream_copy(path, reference_frames, fps, temporary_directory):
"""Trim continuation overlap without decoding or re-encoding media."""
output = Path(temporary_directory) / f"trimmed_{time.time_ns()}.mp4"
start_seconds = float(reference_frames) / float(fps)
command = [
"ffmpeg", "-hide_banner", "-loglevel", "error", "-y",
"-ss", f"{start_seconds:.6f}", "-i", str(path),
"-map", "0", "-c", "copy", "-avoid_negative_ts", "make_zero",
"-movflags", "+faststart", str(output),
]
result = subprocess.run(command, capture_output=True, text=True, check=False)
if result.returncode != 0:
raise RuntimeError(f"ffmpeg could not trim continuation overlap: {result.stderr.strip()}")
return output
def _run_stream_copy(command, error_message):
result = subprocess.run(command, capture_output=True, text=True, check=False)
if result.returncode != 0:
raise RuntimeError(f"{error_message}: {result.stderr.strip()}")
def _stream_copy_trim_to_output(path, start_seconds, output):
_run_stream_copy([
"ffmpeg", "-hide_banner", "-loglevel", "error", "-y",
"-ss", f"{float(start_seconds):.6f}", "-i", str(path),
"-map", "0", "-c", "copy", "-avoid_negative_ts", "make_zero",
"-movflags", "+faststart", str(output),
], "ffmpeg could not create the clean continuation clip")
def _stream_copy_tail(path, seconds, output):
_run_stream_copy([
"ffmpeg", "-hide_banner", "-loglevel", "error", "-y",
"-sseof", f"-{float(seconds):.6f}", "-i", str(path),
"-map", "0", "-c", "copy", "-avoid_negative_ts", "make_zero",
"-movflags", "+faststart", str(output),
], "ffmpeg could not extract the continuation tail")
class DumasStandaloneVideoNode:
"""Save a full generated clip and a trimmed, assembly-ready clip."""
@@ -154,28 +216,136 @@ class DumasStandaloneVideoNode:
"images": ("IMAGE",),
"fps": ("FLOAT", {"default": 24.0, "min": 1.0, "max": 240.0, "step": 0.001}),
"overlap_frames": ("INT", {"default": 0, "min": 0, "max": 4096}),
"reference_frames": ("INT", {"default": 0, "min": 0, "max": 4096}),
"filename_prefix": ("STRING", {"default": "dumas/clip"}),
},
"optional": {"audio": ("AUDIO",)},
}
RETURN_TYPES = ("STRING", "STRING", "INT", "FLOAT")
RETURN_NAMES = ("full_clip", "complete_clip", "complete_frames", "duration")
RETURN_TYPES = ("STRING", "STRING", "INT", "FLOAT", "INT")
RETURN_NAMES = ("full_clip", "complete_clip", "complete_frames", "duration", "reference_frames")
FUNCTION = "save"
CATEGORY = "Dumas/Video"
OUTPUT_NODE = True
def save(self, images, fps, overlap_frames, filename_prefix, audio=None):
def save(self, images, fps, overlap_frames, filename_prefix, reference_frames=0, audio=None):
total = len(images)
overlap = int(overlap_frames)
reference = int(reference_frames)
if overlap >= total:
raise ValueError(f"Overlap ({overlap}) must be smaller than the clip ({total} frames).")
if reference >= total:
raise ValueError(f"Reference frames ({reference}) must be smaller than the clip ({total} frames).")
full = _output_path(f"{filename_prefix}_full")
complete = _output_path(f"{filename_prefix}_complete")
_encode_images(images, audio, full, float(fps), 0)
_encode_images(images, audio, complete, float(fps), overlap)
count = total - overlap
return str(full), str(complete), count, count / float(fps)
return str(full), str(complete), count, count / float(fps), reference
class DumasSaveVideoNode:
"""Save an IMAGE batch as an MP4 in any user-selected folder."""
DESCRIPTION = (
"Save Video DUMAS writes an image batch as an MP4 to any folder on the "
"server. Leave the folder empty for ComfyUI's output folder, or type "
"an absolute path. Existing files are never overwritten."
)
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"images": ("IMAGE",),
"fps": ("FLOAT", {"default": 24.0, "min": 1.0, "max": 240.0, "step": 0.001}),
"folder": ("STRING", {"default": "", "multiline": False}),
"filename": ("STRING", {"default": "dumas_video_%counter%", "multiline": False}),
"quality": ("INT", {"default": 18, "min": 1, "max": 51}),
"save_on_run": ("BOOLEAN", {"default": True}),
},
"optional": {"audio": ("AUDIO",)},
}
@classmethod
def IS_CHANGED(cls, **_kwargs):
return float("nan")
RETURN_TYPES = ("STRING", "INT", "FLOAT")
RETURN_NAMES = ("video_path", "frames", "duration")
FUNCTION = "save"
CATEGORY = "Dumas/Video"
OUTPUT_NODE = True
def save(self, images, fps, folder, filename, quality, save_on_run=True, audio=None):
if images is None or len(images) == 0:
raise ValueError("Save Video DUMAS received no frames.")
fps = float(fps)
if fps <= 0:
raise ValueError("FPS must be greater than zero.")
base = Path(folder).expanduser() if str(folder or "").strip() else Path(folder_paths.get_output_directory())
if not save_on_run:
base = Path(folder_paths.get_temp_directory())
base = base.resolve()
base.mkdir(parents=True, exist_ok=True)
relative = str(filename or "dumas_video_%counter%").replace("\\", "/").strip().lstrip("/")
if not relative.lower().endswith(".mp4"):
relative += ".mp4"
relative = _next_available_relative_path(str(base), relative)
target = (base / relative).resolve()
if os.path.commonpath((str(base), str(target))) != str(base):
raise ValueError("Video filename must stay inside the selected folder.")
_encode_images(images, audio, target, fps, 0, quality)
frames = len(images)
return {"ui": {"text": [str(target)]}, "result": (str(target), frames, frames / fps)}
class DumasPrepareContinuationNode:
"""Prepare a generated continuation for chaining and presentation.
The raw clip is never fed forward as a whole. The node extracts only its
trailing reference window for the next generation and creates a clean clip
with the regenerated lead removed.
"""
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"raw_clip": ("STRING", {"default": "", "multiline": False}),
"reference_frames": ("INT", {"default": 48, "min": 1, "max": 4096}),
"fps": ("FLOAT", {"default": 24.0, "min": 1.0, "max": 240.0, "step": 0.001}),
"filename_prefix": ("STRING", {"default": "dumas/continuation"}),
},
}
RETURN_TYPES = ("STRING", "STRING", "INT", "FLOAT")
RETURN_NAMES = ("clean_clip", "next_reference", "reference_frames", "clean_duration")
FUNCTION = "prepare"
CATEGORY = "Dumas/Video"
OUTPUT_NODE = True
def prepare(self, raw_clip, reference_frames, fps, filename_prefix):
path = str(raw_clip or "").strip().strip('"').strip("'")
if not path:
raise ValueError("Connect a raw generated continuation clip.")
if not os.path.isfile(path):
raise FileNotFoundError(f"Raw continuation clip not found: {path}")
reference = int(reference_frames)
source_info = _probe(path)
source_fps = _video_fps(source_info)
if abs(source_fps - float(fps)) > 0.01:
fps = source_fps
duration = float((source_info.get("format") or {}).get("duration") or 0.0)
reference_seconds = reference / float(fps)
if duration <= reference_seconds:
raise ValueError("Reference window must be shorter than the raw clip.")
clean = _output_path(f"{filename_prefix}_clean")
tail = _output_path(f"{filename_prefix}_tail")
_stream_copy_trim_to_output(path, reference_seconds, clean)
_stream_copy_tail(path, reference_seconds, tail)
clean_duration = max(0.0, duration - reference_seconds)
return str(clean), str(tail), reference, clean_duration
class DumasJoinVideoClipsNode:
@@ -191,6 +361,12 @@ class DumasJoinVideoClipsNode:
"clip_4": ("STRING", {"default": ""}),
"clip_5": ("STRING", {"default": ""}),
"clip_6": ("STRING", {"default": ""}),
"clip_1_reference_frames": ("INT", {"default": 0, "min": 0, "max": 4096}),
"clip_2_reference_frames": ("INT", {"default": 0, "min": 0, "max": 4096}),
"clip_3_reference_frames": ("INT", {"default": 0, "min": 0, "max": 4096}),
"clip_4_reference_frames": ("INT", {"default": 0, "min": 0, "max": 4096}),
"clip_5_reference_frames": ("INT", {"default": 0, "min": 0, "max": 4096}),
"clip_6_reference_frames": ("INT", {"default": 0, "min": 0, "max": 4096}),
"filename_prefix": ("STRING", {"default": "dumas/assembled_video"}),
},
}
@@ -201,40 +377,68 @@ class DumasJoinVideoClipsNode:
CATEGORY = "Dumas/Video"
OUTPUT_NODE = True
def join(self, clip_1, clip_2="", clip_3="", clip_4="", clip_5="", clip_6="", filename_prefix="dumas/assembled_video"):
clips = [str(path).strip().strip('"').strip("'") for path in (clip_1, clip_2, clip_3, clip_4, clip_5, clip_6) if str(path or "").strip()]
if not clips:
def join(
self, clip_1, clip_2="", clip_3="", clip_4="", clip_5="", clip_6="",
clip_1_reference_frames=0, clip_2_reference_frames=0,
clip_3_reference_frames=0, clip_4_reference_frames=0,
clip_5_reference_frames=0, clip_6_reference_frames=0,
filename_prefix="dumas/assembled_video",
):
raw_clips = (clip_1, clip_2, clip_3, clip_4, clip_5, clip_6)
raw_references = (
clip_1_reference_frames, clip_2_reference_frames, clip_3_reference_frames,
clip_4_reference_frames, clip_5_reference_frames, clip_6_reference_frames,
)
entries = [
(str(path).strip().strip('"').strip("'"), max(0, int(reference)))
for path, reference in zip(raw_clips, raw_references)
if str(path or "").strip()
]
if not entries:
raise ValueError("Connect at least one completed clip.")
clips = [path for path, _ in entries]
if any(not os.path.isfile(path) for path in clips):
missing = next(path for path in clips if not os.path.isfile(path))
raise FileNotFoundError(f"Completed clip not found: {missing}")
signatures = [_join_signature(_probe(path)) for path in clips]
probed = [_probe(path) for path in clips]
signatures = [_join_signature(info) for info in probed]
if any(signature != signatures[0] for signature in signatures[1:]):
raise ValueError("Clips do not share compatible codec, dimensions, frame rate, pixel format or audio format.")
output = _output_path(filename_prefix)
with tempfile.NamedTemporaryFile("w", suffix=".txt", delete=False, encoding="utf-8") as handle:
list_path = Path(handle.name)
for path in clips:
escaped = str(Path(path).resolve()).replace("'", "'\\''")
handle.write(f"file '{escaped}'\n")
try:
command = ["ffmpeg", "-hide_banner", "-loglevel", "error", "-y", "-f", "concat", "-safe", "0", "-i", str(list_path), "-c", "copy", "-movflags", "+faststart", str(output)]
result = subprocess.run(command, capture_output=True, text=True, check=False)
if result.returncode != 0:
raise RuntimeError(f"ffmpeg could not join the clips without re-encoding: {result.stderr.strip()}")
finally:
list_path.unlink(missing_ok=True)
with tempfile.TemporaryDirectory(prefix="dumas_join_") as temporary_directory:
prepared = []
for (path, reference), info in zip(entries, probed):
if reference:
prepared.append(_trim_stream_copy(path, reference, _video_fps(info), temporary_directory))
else:
prepared.append(Path(path).resolve())
with tempfile.NamedTemporaryFile("w", suffix=".txt", delete=False, encoding="utf-8") as handle:
list_path = Path(handle.name)
for path in prepared:
escaped = str(path).replace("'", "'\\''")
handle.write(f"file '{escaped}'\n")
try:
command = ["ffmpeg", "-hide_banner", "-loglevel", "error", "-y", "-f", "concat", "-safe", "0", "-i", str(list_path), "-c", "copy", "-movflags", "+faststart", str(output)]
result = subprocess.run(command, capture_output=True, text=True, check=False)
if result.returncode != 0:
raise RuntimeError(f"ffmpeg could not join the clips without re-encoding: {result.stderr.strip()}")
finally:
list_path.unlink(missing_ok=True)
duration = float((_probe(output).get("format") or {}).get("duration") or 0.0)
return str(output), len(clips), duration
NODE_CLASS_MAPPINGS = {
"DumasStandaloneVideo": DumasStandaloneVideoNode,
"DumasSaveVideo": DumasSaveVideoNode,
"DumasPrepareContinuation": DumasPrepareContinuationNode,
"DumasJoinVideoClips": DumasJoinVideoClipsNode,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"DumasStandaloneVideo": "Dumas Standalone Video",
"DumasSaveVideo": "DUMAS Pixaroma · Save Video",
"DumasPrepareContinuation": "Dumas Prepare Continuation",
"DumasJoinVideoClips": "Dumas Join Video Clips (No Re-encode)",
}
+5 -1
View File
@@ -20,7 +20,11 @@ const BUTTON_TOP = 10;
const INFO_TOP = 30;
const BTN_X = 80;
const MIN_W = BTN_X + 6 * 56 + BUTTON_GAP * 5 + 6;
const MIN_H = IMAGE_TOP + 100;
// The compare canvas is square and starts below the controls. The previous
// 154px minimum was smaller than the intended initial 494px node, so Vue
// Nodes could shrink the DOM widget until its output sockets overlapped the
// mode buttons and canvas.
const MIN_H = INIT_H;
const TOP_TRIM = 8;
const SIZE_FONT = "12px 'Segoe UI',sans-serif";
const BADGE_FONT = "10px 'Segoe UI',sans-serif";
+77
View File
@@ -0,0 +1,77 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
function openBrowser(node, widget) {
const overlay = document.createElement("div");
overlay.style.cssText = "position:fixed;inset:0;background:rgba(0,0,0,.72);z-index:10000;display:flex;align-items:center;justify-content:center;font:13px sans-serif;color:#eee";
const panel = document.createElement("div");
panel.style.cssText = "width:min(760px,92vw);max-height:80vh;background:#20242b;border:1px solid #596474;border-radius:10px;padding:12px;display:flex;flex-direction:column;gap:8px;box-shadow:0 12px 40px #000";
const header = document.createElement("div");
header.style.cssText = "display:flex;justify-content:space-between;align-items:center;font-weight:bold";
header.append("DUMAS H3 RefMod Browser");
const close = document.createElement("button");
close.textContent = "Close";
close.onclick = () => overlay.remove();
header.append(close);
panel.append(header);
const status = document.createElement("div");
status.textContent = "Loading registered RefMods…";
panel.append(status);
const body = document.createElement("div");
body.style.cssText = "overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:8px";
panel.append(body);
overlay.append(panel);
document.body.append(overlay);
const previewUrl = (path) => api.apiURL(`/dumas/h3-refmod-browser/file?path=${encodeURIComponent(path)}`);
void (async () => {
try {
const rootResponse = await api.fetchApi("/dumas/h3-refmod-browser/root");
const root = await rootResponse.json();
const listResponse = await api.fetchApi(`/dumas/h3-refmod-browser/list?path=${encodeURIComponent(root.root || "")}`);
const data = await listResponse.json();
if (!data.ok) throw new Error(data.error || "Could not list RefMods");
body.innerHTML = "";
status.textContent = `${data.mods.length} RefMod(s) found`;
for (const item of data.mods || []) {
const card = document.createElement("button");
card.style.cssText = "text-align:left;background:#303844;border:1px solid #566274;border-radius:7px;color:#eee;padding:6px;cursor:pointer;min-height:90px";
if (item.preview_path) {
const image = document.createElement("img");
image.src = previewUrl(item.preview_path);
image.style.cssText = "width:100%;height:58px;object-fit:cover;border-radius:4px";
card.append(image);
}
const label = document.createElement("div");
label.textContent = item.name;
label.style.marginTop = "5px";
card.append(label);
card.onclick = () => {
widget.value = item.path;
widget.callback?.(item.path);
node.setDirtyCanvas(true, true);
overlay.remove();
};
body.append(card);
}
if (!body.childElementCount) status.textContent = "No RefMods found in registered roots.";
} catch (error) {
status.textContent = error?.message || "Could not load RefMods.";
}
})();
}
app.registerExtension({
name: "DumasNodes.H3RefModPicker",
async beforeRegisterNodeDef(nodeType, nodeData) {
if (nodeData?.name !== "DumasH3RefModPicker") return;
const original = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function () {
original?.apply(this, arguments);
const widget = this.widgets?.find((item) => item.name === "mod_path");
if (!widget || this._dumasRefModButton) return;
this._dumasRefModButton = this.addWidget("button", "Browse RefMods", null, () => openBrowser(this, widget));
this.setSize([300, 180]);
};
},
});
File diff suppressed because it is too large Load Diff
+45
View File
@@ -0,0 +1,45 @@
import { app } from "/scripts/app.js";
const CLASS = "DumasSaveVideo";
function widget(node, name) { return node.widgets?.find((item) => item.name === name); }
app.registerExtension({
name: "Dumas.SaveVideo",
nodeCreated(node) {
if (node.comfyClass !== CLASS) return;
const folder = widget(node, "folder");
if (!folder || typeof node.addDOMWidget !== "function") return;
const root = document.createElement("div");
root.style.cssText = "display:flex;gap:5px;align-items:center;padding:4px 0;color:#bbb;font:11px system-ui";
const button = document.createElement("button");
button.type = "button";
button.textContent = "Browse folder";
button.title = "Choose the server-side folder used for the next save";
const label = document.createElement("span");
label.textContent = "Any server folder";
root.append(button, label);
const dom = node.addDOMWidget("dumas_save_video_folder", "custom", root, { serialize: false, getMinHeight: () => 28 });
dom.computeLayoutSize = () => ({ minHeight: 28, minWidth: 1 });
button.addEventListener("click", async (event) => {
event.preventDefault();
event.stopPropagation();
button.disabled = true;
try {
const response = await fetch(`/dumas/api/pick_directory?path=${encodeURIComponent(String(folder.value || ""))}`);
const data = await response.json();
if (data?.ok && data.path) {
folder.value = data.path;
folder.callback?.(data.path);
label.textContent = data.path;
node.setDirtyCanvas?.(true, true);
}
} catch (error) {
console.warn("DUMAS Save Video folder picker failed", error);
} finally {
button.disabled = false;
}
});
node._dumasSaveVideoFolderWidget = dom;
},
});
+29
View File
@@ -0,0 +1,29 @@
// Load the complete vendored upstream web extensions through DUMAS's single
// ComfyUI WEB_DIRECTORY. The source files remain under vendor/ with their
// original licenses; this file only makes their UI available from DumasNodes.
const modules = [
"./dumas_workflow_metadata.js",
"./vendor/dumas_h3_continuum/decode_cache_helper.js",
"./vendor/dumas_h3_continuum/easy_bypass_toggle.js",
"./vendor/dumas_h3_continuum/easy_load_audio.js",
"./vendor/dumas_h3_continuum/easy_load_image.js",
"./vendor/dumas_h3_continuum/easy_load_video.js",
"./vendor/dumas_h3_continuum/easy_v38.js",
"./vendor/dumas_h3_continuum/project_id.js",
"./vendor/dumas_h3_continuum/reference_audio_ui.js",
"./vendor/dumas_h3_continuum/reference_image_ui.js",
"./vendor/dumas_h3_continuum/reference_images_v39.js",
"./vendor/dumas_h3_continuum/storage_settings.js",
"./vendor/dumas_h3_continuum/video_reference_mode_ui.js",
"./vendor/dumas_minimax_h3_refmod/library_dialog.js",
"./vendor/dumas_minimax_h3_refmod/refmod_apply.js",
"./vendor/dumas_minimax_h3_refmod/refmod_creation_labels.js",
"./vendor/dumas_minimax_h3_refmod/refmod_library.js",
"./vendor/dumas_minimax_h3_refmod/refmod_slots.js",
"./vendor/dumas_h3_refmod_picker/refmod_create.js",
"./vendor/dumas_h3_refmod_picker/refmod_loader.js",
"./vendor/dumas_h3_refmod_picker/visual_refmod_picker.js",
];
for (const module of modules) import(module);
+14
View File
@@ -0,0 +1,14 @@
// DUMAS nodes are namespaced copies of upstream nodes. Remove copied
// upstream aux_id metadata because it is invalid for the namespaced node.
function sanitizeDumasMetadata(node) {
if (!node || typeof node.type !== "string" || !node.type.startsWith("Dumas")) return;
const properties = node.properties;
if (!properties || !Object.prototype.hasOwnProperty.call(properties, "aux_id")) return;
delete properties.aux_id;
}
app.registerExtension({
name: "DumasNodes.WorkflowMetadata",
nodeCreated: sanitizeDumasMetadata,
loadedGraphNode: sanitizeDumasMetadata,
});
+76
View File
@@ -0,0 +1,76 @@
import { app } from "../../scripts/app.js";
const CLASS = "DumasReferenceImagePreprocessor";
const get = (node, name) => node.widgets?.find((widget) => widget.name === name);
const promptFor = (node) => {
const type = String(get(node, "reference_type")?.value || "Character");
const id = String(get(node, "reference_id")?.value || "1");
const description = String(get(node, "description")?.value || "").trim();
const token = `@R${id}`;
const opening = {
Character: `Describe the character in exquisite detail. Include clothing, accessories, body type, proportions, and size. The character will be referred to as ${token} and should be treated as a photographic representation of a real person, so start the description with "${token} is". Do not refer to individual shots; treat this as a visual description of the character. Provide an organized, structured response that explicitly includes:
- Age (e.g., 24 years old, young adult, middle-aged, elderly)
- Ethnicity (e.g., Caucasian, Black, Asian, South Asian, Latino, Indigenous, etc.)
- Gender identity (if known or implied)
- Body type (e.g., athletic, curvy, petite, tall, slender, robust, muscular, etc.)
- Proportions (e.g., long legs, short torso, wide hips, narrow waist, etc.)
- Specific measurements or relative sizes (e.g., 5'8", 36-24-36, 180cm height, 52kg weight, etc.)
- Clothing (type, color, fabric, fit, style, brand if relevant)
- Accessories (e.g., jewelry, watches, glasses, hats, bags, footwear)
- Facial features (eyes, nose, mouth, skin tone, hair texture/length/color, facial structure)
- Hair (color, length, style, grooming, any accessories like clips or braids)
- Body parts including all intimate regions: breasts (size, shape, areola, firmness), nipples, pubic area, genitalia (cock size, girth, curvature, foreskin, etc.), labia, clitoris, vaginal opening, buttocks (firmness, shape, skin tone), thighs, hips, calves, feet, hands, fingers, arms, shoulders, neck, jawline, collarbone, back, belly, chest, waist, etc.
- Skin tone and texture (e.g., smooth, tanned, freckled, acne-prone, etc.)
- Posture and stance (standing, sitting, lying down, etc.)
- Expression (smile, frown, neutral, etc.)
- Lighting and environment context (if visible, e.g., studio lighting, natural daylight, indoor/outdoor)
Ensure each section is clearly labeled and presented in a clean, hierarchical format for easy reading.`,
Object: `Describe the object in the image in exquisite detail. Include its shape, size, materials, colours, construction, surface detail, condition, and distinctive features. The object will be referred to as ${token}. Do not refer to individual shots; treat this as a visual description of the object.`,
Scene: `Describe the scene in the image in exquisite detail. Include the environment, architecture, spatial layout, lighting, atmosphere, colours, perspective, and important background elements. The scene will be referred to as ${token}. Do not refer to individual shots; treat this as a visual description of the scene.`,
Creature: `Describe the creature in the image in exquisite detail. Include its anatomy, body structure, size, proportions, skin, fur, scales, colouring, distinctive features, expression, and physical condition. The creature will be referred to as ${token}. Do not refer to individual shots; treat this as a visual description of the creature.`,
Vehicle: `Describe the vehicle in the image in exquisite detail. Include its type, dimensions, shape, materials, colours, design, mechanical features, condition, markings, and distinctive details. The vehicle will be referred to as ${token}. Do not refer to individual shots; treat this as a visual description of the vehicle.`,
}[type] || "";
return `${opening}${description ? `\n\nAdditional information about the ${type.toLowerCase()}: "${description}"` : ""}`;
};
function setPrompt(node) {
const widget = get(node, "generated_prompt");
if (!widget) return;
widget.value = promptFor(node);
widget.callback?.(widget.value);
node.setDirtyCanvas?.(true, true);
}
function configure(node) {
if (node?.comfyClass !== CLASS || node.__dumasReferencePreprocessor) return;
node.__dumasReferencePreprocessor = true;
const type = get(node, "reference_type");
const id = get(node, "reference_id");
const prompt = get(node, "generated_prompt");
const wrap = (widget) => {
if (!widget) return;
const callback = widget.callback;
widget.callback = function (value) {
const result = callback?.call(this, value);
setPrompt(node);
return result;
};
};
wrap(type);
wrap(id);
if (prompt) {
prompt.options ||= {};
prompt.options.multiline = true;
prompt.computeSize = (width) => [Math.max(320, Number(width) || 420), 150];
}
const button = node.addWidget?.("button", "regenerate_prompt", "Regenerate prompt", () => setPrompt(node));
if (button) button.serialize = false;
setPrompt(node);
}
app.registerExtension({
name: "Dumas.ReferenceImagePreprocessor",
nodeCreated(node) { configure(node); },
});
+14 -4
View File
@@ -120,7 +120,7 @@ function resolveDateTokens(value) {
function buildPreviewPath(node, ui) {
const folder = (ui.folderInput.value || "").trim() || "ComfyUI output";
const format = ui.format === "jpg" ? ".jpg" : ".png";
const format = ui.format === "jpg" ? ".jpg" : (ui.format === "webp" ? ".webp" : ".png");
let pattern = ui.patternInput.value || DEFAULT_PATTERN;
pattern = resolveDateTokens(pattern);
pattern = pattern
@@ -141,7 +141,7 @@ function buildPreviewPath(node, ui) {
function scheduleCounterFetch(node, ui) {
const folder = (ui.folderInput.value || "").trim();
const format = ui.format === "jpg" ? ".jpg" : ".png";
const format = ui.format === "jpg" ? ".jpg" : (ui.format === "webp" ? ".webp" : ".png");
let pattern = ui.patternInput.value || DEFAULT_PATTERN;
pattern = resolveDateTokens(pattern)
.replaceAll("%input%", "input")
@@ -254,11 +254,13 @@ function renderPreview(node, ui) {
function syncFromWidgets(node, ui) {
ui.folderInput.value = String(getWidget(node, "folder")?.value || "");
ui.patternInput.value = String(getWidget(node, "pattern")?.value || DEFAULT_PATTERN);
ui.format = String(getWidget(node, "format")?.value || "png").toLowerCase() === "jpg" ? "jpg" : "png";
const selectedFormat = String(getWidget(node, "format")?.value || "png").toLowerCase();
ui.format = ["png", "jpg", "webp"].includes(selectedFormat) ? selectedFormat : "png";
ui.saveOnRun = !!getWidget(node, "save_on_run")?.value;
ui.embedWorkflow = !!getWidget(node, "embed_workflow")?.value;
ui.fmtPng.classList.toggle("on", ui.format === "png");
ui.fmtJpg.classList.toggle("on", ui.format === "jpg");
ui.fmtWebp.classList.toggle("on", ui.format === "webp");
ui.modeSave.classList.toggle("on", ui.saveOnRun);
ui.modePreview.classList.toggle("on", !ui.saveOnRun);
renderPreview(node, ui);
@@ -329,7 +331,9 @@ function createRoot(node) {
fmtPng.type = "button";
const fmtJpg = el("button", null, "JPG");
fmtJpg.type = "button";
formatSeg.append(fmtPng, fmtJpg);
const fmtWebp = el("button", null, "WebP");
fmtWebp.type = "button";
formatSeg.append(fmtPng, fmtJpg, fmtWebp);
const modeSeg = el("div", "dsi-seg");
const modeSave = el("button", null, "Save");
modeSave.type = "button";
@@ -362,6 +366,7 @@ function createRoot(node) {
prevPath: previewPath,
fmtPng,
fmtJpg,
fmtWebp,
modeSave,
modePreview,
openButton,
@@ -421,6 +426,11 @@ function createRoot(node) {
setWidgetValue(node, "format", "jpg");
syncFromWidgets(node, ui);
});
fmtWebp.addEventListener("click", () => {
ui.format = "webp";
setWidgetValue(node, "format", "webp");
syncFromWidgets(node, ui);
});
modeSave.addEventListener("click", () => {
ui.saveOnRun = true;
setWidgetValue(node, "save_on_run", true);
File diff suppressed because it is too large Load Diff
+105
View File
@@ -0,0 +1,105 @@
import { app } from "../../scripts/app.js";
const NODE_CLASS = "DumasH3Continuum_H3DecodeCacheHelper";
const MAX_TOKEN = 2147483647;
function isJapanese() {
let locale = "";
try {
locale = String(app?.ui?.settings?.getSettingValue?.("Comfy.Locale") || "");
} catch {}
if (!locale) {
locale = String(
globalThis.document?.documentElement?.lang
|| globalThis.navigator?.language
|| "en",
);
}
return /^ja(?:-|$)/i.test(locale);
}
function labels() {
if (isJapanese()) {
return {
button: "キャッシュをクリア",
tooltip: "次回QueueでこのHelperのキャッシュを破棄します。次回は通常Decodeとなります。普段は操作不要です。",
};
}
return {
button: "Clear cache",
tooltip: "Clear this Helper's cache on the next Queue. The next run uses normal Decode. Usually no action is needed.",
};
}
// 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) {
const text = labels();
// Create the control before hiding the numeric widget, so a failed
// control installation leaves the traditional input available.
const button = node.addWidget("button", text.button, 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 = text.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);
},
});
+111
View File
@@ -0,0 +1,111 @@
// Convenience toggles delegate to Core node.mode; Core owns persistence/drawing.
const NODE_MODE_ALWAYS =
typeof LiteGraph !== "undefined" && Number.isInteger(LiteGraph.ALWAYS)
? LiteGraph.ALWAYS : 0;
const NODE_MODE_BYPASS =
typeof LiteGraph !== "undefined" && Number.isInteger(LiteGraph.BYPASS)
? LiteGraph.BYPASS : 4;
function isConfiguredNode(node, nodeClass) {
return node?.comfyClass === nodeClass || node?.type === nodeClass;
}
export function findEasyBypassWidget(node) {
const name = node.__h3EasyBypassToggle?.widgetName;
return name ? node.widgets?.find((widget) => widget.name === name) : undefined;
}
function syncWidgetFromMode(node) {
const widget = findEasyBypassWidget(node);
if (widget) widget.value = node.mode === NODE_MODE_ALWAYS;
}
function findModeDescriptor(node) {
for (let owner = node; owner; owner = Object.getPrototypeOf(owner)) {
const descriptor = Object.getOwnPropertyDescriptor(owner, "mode");
if (descriptor) return descriptor;
}
return undefined;
}
function installModeSourceOfTruth(node) {
if (node.__h3EasyBypassModeObserved) return true;
const own = Object.getOwnPropertyDescriptor(node, "mode");
if (own?.configurable === false) return false;
const descriptor = findModeDescriptor(node);
const accessor = descriptor && ("get" in descriptor || "set" in descriptor);
// Never replace a read-only property or manufacture a second store value.
if (accessor && (!descriptor.get || !descriptor.set)) return false;
if (descriptor && !accessor && descriptor.writable === false) return false;
let currentMode = Number(node.mode ?? NODE_MODE_ALWAYS);
Object.defineProperty(node, "mode", {
configurable: true,
enumerable: own?.enumerable ?? descriptor?.enumerable ?? true,
get() {
return accessor ? descriptor.get.call(this) : currentMode;
},
set(value) {
if (accessor) descriptor.set.call(this, value);
else currentMode = Number(value);
syncWidgetFromMode(this);
},
});
node.__h3EasyBypassModeObserved = true;
return true;
}
function setModeFromToggle(node, enabled) {
node.mode = enabled ? NODE_MODE_ALWAYS : NODE_MODE_BYPASS;
syncWidgetFromMode(node);
node.graph?.change?.();
node.setDirtyCanvas?.(true, true);
}
export function configureEasyBypassToggleNode(
node, { nodeClass, widgetName, tooltip },
) {
if (!isConfiguredNode(node, nodeClass)) return;
node.__h3EasyBypassToggle = { nodeClass, widgetName };
let widget = findEasyBypassWidget(node);
if (!widget) {
widget = node.addWidget(
"toggle", widgetName, node.mode === NODE_MODE_ALWAYS,
(value) => setModeFromToggle(node, Boolean(value)),
{ on: "ON", off: "OFF", serialize: false },
);
widget.serialize = false; // Workflow persistence.
widget.options ||= {};
widget.options.serialize = false; // API prompt serialization.
widget.tooltip = tooltip;
// Append only. Never splice/reassign widgets in draw/serialize/configure:
// newer Core uses a stable mutation view backed by its widget store.
}
if (!installModeSourceOfTruth(node)) {
console.warn(`${nodeClass}: native mode could not be observed; use Core Bypass.`);
}
syncWidgetFromMode(node);
node.setDirtyCanvas?.(true, true);
}
// Retained for existing callers; new Video Adapter has no Enable widget.
export function configureExistingEasyBypassWidgetNode(
node, { nodeClass, widgetNames },
) {
if (!isConfiguredNode(node, nodeClass)) return;
const names = Array.isArray(widgetNames) ? widgetNames : [widgetNames];
const widget = node.widgets?.find((item) => names.includes(item.name));
if (!widget) return;
node.__h3EasyBypassToggle = { nodeClass, widgetName: widget.name };
if (!widget.__h3EasyBypassCallbackObserved) {
const originalCallback = widget.callback;
widget.callback = function (value, ...args) {
const result = originalCallback?.call(this, value, ...args);
setModeFromToggle(node, Boolean(value));
return result;
};
widget.__h3EasyBypassCallbackObserved = true;
}
installModeSourceOfTruth(node);
if (node.mode === NODE_MODE_BYPASS) syncWidgetFromMode(node);
else setModeFromToggle(node, Boolean(widget.value));
}
+69
View File
@@ -0,0 +1,69 @@
import { app } from "../../scripts/app.js";
import { configureEasyBypassToggleNode } from "./easy_bypass_toggle.js";
const EASY_LOAD_AUDIO_CLASS = "DumasH3Continuum_H3EasyLoadAudio";
function configureEasyLoadAudioNode(node) {
if (
node?.comfyClass !== EASY_LOAD_AUDIO_CLASS &&
node?.type !== EASY_LOAD_AUDIO_CLASS
) {
return;
}
// A frontend-only convenience control must never make the Core loader
// itself unplaceable. Some ComfyUI frontend paths initialize upload
// widgets later than nodeCreated; fail open and keep the native node.
try {
configureEasyBypassToggleNode(node, {
nodeClass: EASY_LOAD_AUDIO_CLASS,
widgetName: "Enable Audio",
tooltip:
"ON runs Core Load Audio. OFF uses ComfyUI native Bypass and behaves like an unconnected optional audio input.",
});
} catch (error) {
console.warn(
"H3 Easy Load Audio bypass control was skipped; the Core audio loader remains available.",
error,
);
}
}
app.registerExtension({
name: "H3Continuum.EasyLoadAudio",
beforeRegisterNodeDef(nodeType, nodeData) {
if (
nodeType?.prototype?.comfyClass !== EASY_LOAD_AUDIO_CLASS &&
nodeData?.name !== EASY_LOAD_AUDIO_CLASS
) {
return;
}
const required = nodeData?.input?.required;
if (!required?.audio?.[1]?.audio_upload || required.audioUI) return;
// ComfyUI Frontend 1.49.x adds AUDIOUPLOAD to every audio_upload
// schema, but adds its required AUDIO_UI preview only to a hard-coded
// list containing Core LoadAudio. Insert the same Core preview widget
// before AUDIOUPLOAD so the upload callback always receives it.
const { upload, ...inputs } = required;
nodeData.input.required = {
...inputs,
audioUI: ["AUDIO_UI", {}],
...(upload ? { upload } : {}),
};
},
nodeCreated(node) {
configureEasyLoadAudioNode(node);
},
loadedGraphNode(node) {
configureEasyLoadAudioNode(node);
},
afterConfigureGraph() {
for (const node of app.graph?._nodes || []) configureEasyLoadAudioNode(node);
},
});
+29
View File
@@ -0,0 +1,29 @@
import { app } from "../../scripts/app.js";
import { configureEasyBypassToggleNode } from "./easy_bypass_toggle.js";
const EASY_LOAD_IMAGE_CLASS = "DumasH3Continuum_H3EasyLoadImage";
function configureEasyLoadImageNode(node) {
configureEasyBypassToggleNode(node, {
nodeClass: EASY_LOAD_IMAGE_CLASS,
widgetName: "Enable Image",
tooltip:
"ON runs Core Load Image. OFF uses ComfyUI native Bypass and behaves like an unconnected optional image input.",
});
}
app.registerExtension({
name: "H3Continuum.EasyLoadImage",
nodeCreated(node) {
configureEasyLoadImageNode(node);
},
loadedGraphNode(node) {
configureEasyLoadImageNode(node);
},
afterConfigureGraph() {
for (const node of app.graph?._nodes || []) configureEasyLoadImageNode(node);
},
});
+3
View File
@@ -0,0 +1,3 @@
// Legacy H3ContinuumLoadVideo keeps its saved backend enable_video input.
// Do not mirror it into node.mode or alter Core widget arrays/drawing.
// New workflows use Core LoadVideo -> H3ContinuumVideoAdapter (no Enable).
+135
View File
@@ -0,0 +1,135 @@
import { app } from "../../scripts/app.js";
const EASY_NODE_CLASS = "DumasH3Continuum_H3ContinuumEasyV38";
const CUSTOM_PRESET = "Custom";
const STORAGE_ENABLED = "Save + Auto Resume";
function findWidget(node, name) {
return node.widgets?.find((widget) => widget.name === name);
}
function setWidgetVisible(widget, visible) {
if (!widget) return;
if (!widget.__h3EasyOriginal) {
widget.__h3EasyOriginal = {
type: widget.type,
computeSize: widget.computeSize,
hidden: widget.hidden,
optionsHidden: widget.options?.hidden,
};
}
widget.options ||= {};
if (visible) {
const original = widget.__h3EasyOriginal;
widget.type = original.type;
widget.computeSize = original.computeSize;
widget.hidden = original.hidden;
if (original.optionsHidden === undefined) {
delete widget.options.hidden;
} else {
widget.options.hidden = original.optionsHidden;
}
return;
}
widget.hidden = true;
widget.type = "converted-widget";
widget.options.hidden = true;
widget.computeSize = () => [0, -4];
}
function attachRefresh(widget, key, refresh) {
if (!widget || widget[key]) return;
const previous = widget.callback;
widget.callback = function(value, ...args) {
const result = previous?.call(this, value, ...args);
refresh();
return result;
};
widget[key] = true;
}
function createProjectId() {
if (globalThis.crypto?.randomUUID) return globalThis.crypto.randomUUID();
const bytes = new Uint8Array(16);
globalThis.crypto.getRandomValues(bytes);
bytes[6] = (bytes[6] & 0x0f) | 0x40;
bytes[8] = (bytes[8] & 0x3f) | 0x80;
const hex = Array.from(bytes, (value) => value.toString(16).padStart(2, "0")).join("");
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;
}
function seedControlWidget(node) {
return node.widgets?.find((widget) => (
widget.name === "control_after_generate"
|| widget.name === "seed_control_after_generate"
));
}
function configureEasyNode(node) {
if (node.comfyClass !== EASY_NODE_CLASS) return null;
const projectWidget = findWidget(node, "project_id");
const presetWidget = findWidget(node, "preset");
const customWidget = findWidget(node, "custom_mp");
const storageWidget = findWidget(node, "run_storage");
const runNameWidget = findWidget(node, "run_name");
const seedModeWidget = findWidget(node, "seed_mode");
const controlWidget = seedControlWidget(node);
if (projectWidget && !String(projectWidget.value || "").trim()) {
projectWidget.value = createProjectId();
}
const refresh = () => {
setWidgetVisible(customWidget, presetWidget?.value === CUSTOM_PRESET);
setWidgetVisible(runNameWidget, storageWidget?.value === STORAGE_ENABLED);
if (controlWidget) {
controlWidget.value = seedModeWidget?.value === "Fixed" ? "fixed" : "randomize";
controlWidget.callback?.(controlWidget.value);
}
setWidgetVisible(controlWidget, false);
setWidgetVisible(projectWidget, false);
node.setDirtyCanvas?.(true, true);
};
attachRefresh(presetWidget, "__h3EasyPresetCallback", refresh);
attachRefresh(storageWidget, "__h3EasyStorageCallback", refresh);
attachRefresh(seedModeWidget, "__h3EasySeedModeCallback", refresh);
refresh();
return projectWidget;
}
function configureEasyNodeAfterSetup(node) {
configureEasyNode(node);
setTimeout(() => configureEasyNode(node), 0);
setTimeout(() => configureEasyNode(node), 100);
}
app.registerExtension({
name: "H3Continuum.EasyV38",
nodeCreated(node) {
configureEasyNodeAfterSetup(node);
},
loadedGraphNode(node) {
configureEasyNodeAfterSetup(node);
},
afterConfigureGraph() {
for (const node of app.graph?._nodes || []) configureEasyNodeAfterSetup(node);
},
async beforeQueuePrompt(prompt) {
const seen = new Set();
for (const node of app.graph?._nodes || []) {
const projectWidget = configureEasyNode(node);
if (!projectWidget) continue;
let projectId = String(projectWidget.value || "").trim();
if (!projectId || seen.has(projectId)) {
projectId = createProjectId();
projectWidget.value = projectId;
}
seen.add(projectId);
const apiNode = prompt.output?.[String(node.id)];
if (apiNode?.inputs) apiNode.inputs.project_id = projectId;
}
},
});
File diff suppressed because it is too large Load Diff
+29
View File
@@ -0,0 +1,29 @@
const NORMALIZED_INPUT_LABELS = {
reference_video_1: "Video Guide Frames",
driving_audio: "Driving Audio",
audio_vae: "Driving Audio VAE",
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.comfyClass === "DumasH3Continuum_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 = input.name === "reference_video_1"
&& node.comfyClass === "DumasH3Continuum_H3ContinuumSamplerV38"
? "Timeline Video Frames"
: NORMALIZED_INPUT_LABELS[input.name];
if (label) {
input.label = label;
}
}
return true;
}
+71
View File
@@ -0,0 +1,71 @@
import { app } from "../../scripts/app.js";
const BUNDLE_NODE = "DumasH3Continuum_H3ContinuumReferenceImages";
const BUNDLE_INPUT = "image_references";
const BUNDLE_TYPE = "H3_CONTINUUM_IMAGE_REFERENCES";
export function migrateReferenceImageInputs(node) {
if (node.comfyClass !== "DumasH3Continuum_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);
}
+264
View File
@@ -0,0 +1,264 @@
const CLASS = "DumasH3Continuum_H3ContinuumReferenceImagesV39";
const SAMPLER = "DumasH3Continuum_H3ContinuumSamplerV39";
const MAX = 16;
const LEGACY_SAMPLER_INPUTS = new Set([
...Array.from({ length: 5 }, (_, index) => `reference_image_${index + 1}`),
"image_references",
]);
const getWidget = (node, name) => node.widgets?.find((item) => item.name === name);
const element = (tag, value = "") => {
const item = document.createElement(tag);
item.textContent = value;
return item;
};
function savedChunks(value) {
const text = String(value ?? "off").trim().toLowerCase();
if (text === "off") return new Set();
if (text === "all") return new Set(Array.from({ length: MAX }, (_, i) => i + 1));
const result = new Set();
for (const token of text.split(",")) {
const match = token.trim().match(/^(\d+)(?:\s*-\s*(\d+))?$/);
if (!match) return null;
const first = Number(match[1]);
const last = Number(match[2] || match[1]);
if (first < 1 || last > MAX || first > last) return null;
for (let n = first; n <= last; n += 1) result.add(n);
}
return result;
}
function linkedSamplers(node) {
const output = node.outputs?.find((item) => item.name === "reference_images");
return (output?.links || []).map((id) => {
const link = node.graph?.links?.[id];
return node.graph?.getNodeById?.(link?.target_id);
}).filter((target) => target?.comfyClass === SAMPLER);
}
function destination(node) {
const targets = linkedSamplers(node);
const unknown = (reason) => ({ count: MAX, known: false, reason });
if (!targets.length) return unknown("no_sampler");
if (targets.some((target) => target.inputs?.some((input) => input.name === "chunks" && input.link != null))) {
return unknown("external_chunks");
}
const counts = targets.map((target) => Number(getWidget(target, "chunks")?.value));
if (!counts.every((n) => Number.isInteger(n) && n >= 1 && n <= MAX)) return unknown("unavailable_count");
if (!counts.every((n) => n === counts[0])) return unknown("different_counts");
return { count: counts[0], known: true, reason: "direct_count" };
}
function invalidate(node) {
for (const target of linkedSamplers(node)) {
target.__h3ContinuumReferencePlan = null;
target.__h3ContinuumIntuitiveUxRefresh?.();
target.setDirtyCanvas?.(true, true);
}
}
export function connectedV39LegacyReferenceInputs(node) {
if (node?.comfyClass !== SAMPLER) return [];
return (node.inputs || []).filter((input) =>
LEGACY_SAMPLER_INPUTS.has(input.name) && input.link != null
).map((input) => input.name);
}
export function pruneV39LegacyReferenceInputs(node) {
if (node?.comfyClass !== SAMPLER || typeof node.removeInput !== "function") return 0;
let removed = 0;
for (let index = (node.inputs?.length || 0) - 1; index >= 0; index -= 1) {
const input = node.inputs[index];
if (!LEGACY_SAMPLER_INPUTS.has(input.name) || input.link != null) continue;
node.removeInput(index);
removed += 1;
}
if (removed) {
node.__h3ContinuumReferencePlan = null;
node.setDirtyCanvas?.(true, true);
}
return removed;
}
export function configureV39ReferenceImages(node) {
if (node?.comfyClass !== CLASS || typeof document === "undefined") return;
const mode = getWidget(node, "reference_use");
const selectors = Array.from({ length: 9 }, (_, i) => getWidget(node, `reference_r${i + 1}_chunks`));
if (!mode || selectors.some((item) => !item)) return;
if (node.__h3ReferenceImagesRefresh) return node.__h3ReferenceImagesRefresh();
if (typeof node.addDOMWidget !== "function") return;
// The standard STRING widgets remain serializable; only their presentation is hidden.
for (const item of selectors) {
item.type = "hidden";
item.hidden = true;
item.options ||= {};
item.options.hidden = true;
item.computeSize = () => [0, 0];
item.draw = () => {};
}
const panel = element("div");
panel.style.cssText = "box-sizing:border-box;min-width:340px;max-height:360px;overflow:auto;padding:7px;color:#e7f4e9;background:#203827;font:12px Arial;pointer-events:auto";
const host = element("div");
host.style.cssText = "box-sizing:border-box;padding-top:8px;pointer-events:auto";
host.append(panel);
for (const name of ["pointerdown", "mousedown", "mouseup", "dblclick"]) {
host.addEventListener(name, (event) => event.stopPropagation());
}
const display = node.addDOMWidget("reference_assignment", "h3_reference_assignment", host, { serialize: false });
display.options ||= {};
display.options.serialize = false;
let panelHeight = 54;
display.computeSize = (width) => [Math.max(340, Number(width) || Number(node.size?.[0]) || 340), panelHeight + 8];
const reservePanelSpace = (height) => {
panelHeight = height;
panel.style.height = `${height}px`;
const computedHeight = Number(node.computeSize?.()[1]);
const width = Number(node.size?.[0]) || 340;
if (Number.isFinite(computedHeight) && typeof node.setSize === "function"
&& (Number(node.size?.[0]) !== width || Number(node.size?.[1]) !== computedHeight)) {
node.setSize([width, computedHeight]);
}
};
let page = 0;
let previousKey = null;
const setSelection = (slot, selection) => {
const target = selectors[slot - 1];
target.value = [...selection].sort((a, b) => a - b).join(",") || "off";
// The wrapped native callback owns invalidation and the immediate refresh.
target.callback?.(target.value);
};
const refresh = () => {
const { count, known, reason } = destination(node);
const rows = Array.from({ length: 9 }, (_, i) => i + 1).filter((slot) =>
node.inputs?.some((input) => input.name === `reference_image_${slot}` && input.link != null));
const key = JSON.stringify([mode.value, count, known, reason, rows, selectors.map((item) => item.value), page]);
if (key === previousKey) return;
previousKey = key;
panel.replaceChildren();
if (mode.value !== "Per chunk") {
panel.append(element("div", "Connected images are used in all chunks."));
reservePanelSpace(54);
return;
}
panel.append(element("div", known ? `Per-chunk assignments · ${count} chunks` : "Per-chunk assignments · range 1–16"));
if (!known) {
const explanation = {
no_sampler: "Connect this helper to a Sampler to determine its chunk count.",
external_chunks: "Chunk count is supplied by a connected node.",
unavailable_count: "The Sampler chunk count is not available.",
different_counts: "Connected Samplers have different chunk counts.",
};
panel.append(element("div", explanation[reason]));
panel.append(element("div", "Assignments apply only to chunks generated by the Sampler."));
}
if (!rows.length) {
panel.append(element("div", "Connect Reference Images to assign them."));
reservePanelSpace(known ? 64 : 104);
return;
}
page = Math.min(page, Math.ceil(count / 6) - 1);
const first = page * 6 + 1;
const last = Math.min(first + 5, count);
if (count > 6) {
const nav = element("div");
for (const [label, targetPage] of [["◀", page - 1], [`${first}–${last} / ${count}`, page], ["▶", page + 1]]) {
const button = element("button", label);
button.type = "button";
button.disabled = targetPage < 0 || targetPage >= Math.ceil(count / 6) || targetPage === page;
button.onclick = () => { page = targetPage; previousKey = null; refresh(); };
nav.append(button);
}
panel.append(nav);
}
const table = element("table");
table.style.cssText = "width:100%;border-collapse:collapse;text-align:center;color:#e7f4e9";
const header = element("tr");
header.append(element("th", "Image"));
for (let n = first; n <= last; n += 1) header.append(element("th", String(n)));
header.append(element("th", "All / Off"));
table.append(header);
for (const slot of rows) {
const selected = savedChunks(selectors[slot - 1].value);
const row = element("tr");
row.append(element("td", `Image ${slot} · @R${slot}`));
for (let n = first; n <= last; n += 1) {
const cell = element("td");
const checkbox = element("input");
checkbox.type = "checkbox";
checkbox.checked = selected?.has(n) || false;
checkbox.disabled = selected === null;
checkbox.setAttribute("aria-label", `Image ${slot}, Chunk ${n}`);
checkbox.onchange = () => {
const updated = new Set(selected);
if (checkbox.checked) updated.add(n); else updated.delete(n);
setSelection(slot, updated);
};
cell.append(checkbox);
row.append(cell);
}
const actions = element("td");
for (const [label, on] of [["All", true], ["Off", false]]) {
const button = element("button", known ? label : `${label} 1–16`);
button.type = "button";
button.disabled = selected === null;
button.onclick = () => {
const updated = new Set(selected);
for (let n = 1; n <= count; n += 1) {
if (on) updated.add(n); else updated.delete(n);
}
setSelection(slot, updated);
};
actions.append(button);
}
row.append(actions);
table.append(row);
}
panel.append(table);
for (const slot of rows) {
const selected = savedChunks(selectors[slot - 1].value);
if (selected === null) {
panel.append(element("div", `Image ${slot}: invalid saved selection.`));
continue;
}
if (!known) {
const saved = [...selected].sort((a, b) => a - b);
panel.append(element("div", `Image ${slot} → Saved assignments: ${saved.join(", ") || "none"}`));
continue;
}
const active = [...selected].filter((n) => n <= count).sort((a, b) => a - b);
const future = [...selected].filter((n) => n > count).sort((a, b) => a - b);
panel.append(element("div", `Image ${slot} → Chunks ${active.join(", ") || "none"}${future.length ? ` · saved beyond range: ${future.join(", ")}` : ""}`));
}
if (rows.every((slot) => ![...(savedChunks(selectors[slot - 1].value) || [])].some((n) => n <= count))) {
panel.append(element("div", known ? "No references assigned. Check the chunks to use." : "No saved assignments. Check the chunks to use."));
}
reservePanelSpace(Math.min(360, 77 + rows.length * 36 + (count > 6 ? 32 : 0) + (known ? 0 : 40)));
node.setDirtyCanvas?.(true, true);
};
node.__h3ReferenceImagesRefresh = refresh;
const oldConnections = node.onConnectionsChange;
node.onConnectionsChange = function(...args) {
const result = oldConnections?.apply(this, args);
invalidate(this);
refresh();
return result;
};
for (const control of [mode, ...selectors]) {
const previous = control.callback;
control.callback = function(...args) {
const result = previous?.apply(this, args);
invalidate(node);
refresh();
return result;
};
}
refresh();
}
export function refreshV39ReferenceImagesForSampler(node) {
if (node?.comfyClass !== SAMPLER) return;
const input = node.inputs?.find((item) => item.name === "reference_images");
const link = node.graph?.links?.[input?.link];
const source = node.graph?.getNodeById?.(link?.origin_id);
if (source?.comfyClass === CLASS) configureV39ReferenceImages(source);
}
+240
View File
@@ -0,0 +1,240 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
const words = {
en: {
title: "H3 Continuum — Temporary Storage", open: "Manage temporary storage", close: "Close",
path: "Scratch folder on the ComfyUI server", default: "Blank: keep existing temporary folders",
volumes: "Choose a server storage location…", validate: "Validate", save: "Save", refresh: "Refresh",
cleanup: "Delete unused temporary files", free: "Free", total: "Temporary files", in_use: "In use",
deletable: "Deletable", unknown: "Protected / unknown", current: "Current", previous: "Previous",
loading: "Loading…", saved: "Saved. New files will use this location; existing files stay where they are.",
valid: "The selected folder passed the write and memory-map checks.", removed: "Deleted",
files: "files", busy: "Wait until the running and pending queues are empty to change or clean storage.",
readonly: "Shared storage is read-only in multi-user mode. The server operator manages this setting.",
note: "This is the server's storage, not the browser device. File sizes are logical sizes, not SSD write totals. Moving to another folder on the same physical disk does not reduce its writes.",
modes: "Keep choosing Auto / RAM / Disk-backed in Finalize, and Auto / RAM / Off in Decode Cache Helper. They are independent. Deleting a cache can require decoding and writing it again.",
memory: "Available CPU RAM", last: "Last Finalize allocation", never: "No Finalize allocation in this process yet",
noVolumes: "No storage candidates found. Enter an absolute server folder above.",
unavailable: "Storage service unavailable (HTTP {status}). The old ComfyUI process may still be running, or the updated process failed to start. Check the startup log for a port already in use.",
invalidResponse: "Empty or invalid storage response (HTTP {status}). Click Refresh to retry; if it persists, check the ComfyUI startup log.",
networkError: "Cannot reach ComfyUI at the current address. Click Refresh to retry.",
unloaded: "Storage data unavailable — click Refresh",
},
ja: {
title: "H3 Continuum — 一時ストレージ", open: "一時ストレージを管理", close: "閉じる",
path: "ComfyUIサーバー側の一時保存先フォルダー", default: "空欄:従来の一時保存先を使用",
volumes: "サーバーのストレージ候補を選択…", validate: "検証", save: "保存", refresh: "更新",
cleanup: "未使用の一時ファイルを削除", free: "空き容量", total: "一時ファイル量", in_use: "使用中",
deletable: "削除可能", unknown: "保護中/判定不能", current: "現在", previous: "以前",
loading: "読み込み中…", saved: "保存しました。新規ファイルから適用し、既存ファイルは元の場所で保持します。",
valid: "指定先の書き込みとメモリマップの検証に成功しました。", removed: "削除済み",
files: "ファイル", busy: "保存先の変更・削除は、実行中と待機中のQueueが空になるまでお待ちください。",
readonly: "マルチユーザー運用では閲覧のみです。共有保存先はサーバー管理者が管理します。",
note: "対象はブラウザー端末ではなくComfyUIサーバーです。表示容量はファイルの論理サイズで、SSDの累計書き込み量ではありません。同じ物理ディスク内の移動では、そのディスクへの書き込みは減りません。",
modes: "使用方式は従来どおりFinalizeのAuto/RAM/Disk-backedと、Decode Cache HelperのAuto/RAM/Offで選びます。両者は独立しています。キャッシュ削除後は再デコード・再書き込みが必要になる場合があります。",
memory: "利用可能なCPU RAM", last: "直近のFinalize確保", never: "このプロセスではまだFinalizeを実行していません",
noVolumes: "候補を取得できません。上の欄にサーバー側の絶対パスを入力できます。",
unavailable: "一時ストレージ機能に接続できません(HTTP {status})。旧ComfyUIが残っているか、更新後の起動に失敗した可能性があります。起動ログのポート使用中エラーを確認してください。",
invalidResponse: "一時ストレージの応答が空か、不正な形式です(HTTP {status})。更新で再取得し、続く場合はComfyUI起動ログを確認してください。",
networkError: "現在のアドレスでComfyUIへ接続できません。更新で再取得してください。",
unloaded: "保存先の状態を取得できません — 更新で再取得",
},
};
function language() {
const locale = app.ui?.settings?.getSettingValue?.("Comfy.Locale") || navigator.language || "en";
return String(locale).startsWith("ja") ? words.ja : words.en;
}
function size(bytes) {
if (!Number.isFinite(bytes)) return "—";
if (bytes < 1024) return `${bytes} B`;
if (bytes < 1024 ** 2) return `${(bytes / 1024).toFixed(2)} KiB`;
if (bytes < 1024 ** 3) return `${(bytes / 1024 ** 2).toFixed(2)} MiB`;
return `${(bytes / 1024 ** 3).toFixed(2)} GiB`;
}
function element(tag, text, parent) {
const result = document.createElement(tag);
if (text != null) result.textContent = text;
parent?.append(result);
return result;
}
async function request(operation, body) {
const path = `/h3-continuum/storage/${operation}`;
const options = body === undefined
? { cache: "no-store" }
: { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) };
const t = language();
let response;
try {
// Core retains the UI address, base path and user/auth handling.
// Never replay a save or cleanup after an empty/failed response:
// it may already have run on the server.
response = await api.fetchApi(path, options);
} catch {
throw new Error(t.networkError);
}
let value;
try { value = JSON.parse(await response.text()); } catch { /* Report HTTP status instead of a JSON parser exception. */ }
if (!response.ok) {
const fallback = response.status === 404 ? t.unavailable : `HTTP ${response.status}`;
throw new Error(typeof value?.error === "string" ? value.error : fallback.replace("{status}", response.status));
}
if (!value || typeof value !== "object" || Array.isArray(value)
|| (operation === "status" && (typeof value.path !== "string" || !Number.isInteger(value.revision)
|| !Array.isArray(value.roots) || !Array.isArray(value.volumes) || !value.memory))) {
throw new Error(t.invalidResponse.replace("{status}", response.status));
}
return value;
}
let opened = null;
export function openStorageDialog(event) {
if (opened?.isConnected && opened.open) { opened.focus(); return; }
const t = language();
const dialog = element("dialog");
opened = dialog;
dialog.dataset.h3Storage = "true";
dialog.setAttribute("aria-label", t.title);
Object.assign(dialog.style, {
width: "min(760px, 92vw)", maxHeight: "88vh", overflow: "auto", padding: "20px",
background: "var(--comfy-menu-bg, #222)", color: "var(--fg-color, #ddd)",
border: "1px solid var(--border-color, #666)", borderRadius: "10px",
});
const abort = new AbortController();
element("h2", t.title, dialog);
element("p", t.note, dialog);
const label = element("label", t.path, dialog);
const input = element("input", null, label);
input.type = "text"; input.placeholder = t.default; input.setAttribute("aria-label", t.path);
Object.assign(input.style, { display: "block", width: "100%", margin: "8px 0", padding: "8px", boxSizing: "border-box" });
const volumeLabel = element("label", t.volumes, dialog);
const select = element("select", null, volumeLabel);
select.setAttribute("aria-label", t.volumes);
Object.assign(select.style, { display: "block", width: "100%", minHeight: "34px", margin: "8px 0", boxSizing: "border-box" });
const placeholder = element("option", t.loading, select); placeholder.value = "";
const actions = element("div", null, dialog);
Object.assign(actions.style, { display: "flex", gap: "8px", flexWrap: "wrap", margin: "12px 0" });
const buttons = {};
for (const action of ["validate", "save", "refresh", "cleanup", "close"]) {
const button = element("button", t[action], actions);
button.type = "button"; button.style.padding = "6px 10px"; buttons[action] = button;
}
const notice = element("p", null, dialog);
const message = element("p", t.loading, dialog); message.setAttribute("role", "status");
const memory = element("p", null, dialog);
const last = element("p", null, dialog);
const roots = element("div", null, dialog);
element("p", t.modes, dialog);
let state = null, pending = true, dirty = false, closed = false;
function controls() {
for (const name of ["validate", "save", "cleanup"]) buttons[name].disabled = pending || !state || state.busy || state.read_only;
buttons.refresh.disabled = pending;
input.disabled = pending || !state || !!state.read_only;
select.disabled = input.disabled || !state?.volumes?.length;
notice.textContent = state?.read_only ? t.readonly : state?.busy ? t.busy : "";
}
function render(value) {
state = value;
if (!dirty) input.value = value.path;
select.replaceChildren();
const option = element("option", value.volumes.length ? t.volumes : t.noVolumes, select); option.value = "";
for (const volume of value.volumes) {
const option = element("option", `${volume.path} (${t.free}: ${size(volume.free_bytes)})`, select);
option.value = volume.path;
}
memory.textContent = `${t.memory}: ${size(value.memory.available_bytes)}`;
last.textContent = value.last_backend
? `${t.last}: ${value.last_backend.backend}, ${size(value.last_backend.image_bytes)}${value.last_backend.path ? ` — ${value.last_backend.path}` : ""}`
: t.never;
roots.replaceChildren();
for (const root of value.roots) {
const section = element("section", null, roots);
Object.assign(section.style, { borderTop: "1px solid #666", padding: "10px 0", overflowWrap: "anywhere" });
element("strong", `${root.kind === "finalize" ? "Finalize" : "Decode Cache"} — ${root.current ? t.current : t.previous}`, section);
element("div", root.path, section);
element("div", `${t.total}: ${size(root.bytes)} · ${t.free}: ${size(root.free_bytes)}`, section);
element("div", `${t.in_use}: ${size(root.in_use_bytes)} · ${t.deletable}: ${size(root.deletable_bytes)} · ${t.unknown}: ${size(root.unknown_bytes)}`, section);
for (const error of root.errors) element("p", error, section);
}
}
async function refresh() {
try {
const value = await request("status");
if (!closed) render(value);
} catch (error) {
if (!closed) {
state = null;
select.replaceChildren();
const option = element("option", t.unloaded, select); option.value = "";
}
throw error;
}
}
async function perform(action) {
if (pending) return;
pending = true; controls(); message.textContent = t.loading;
try {
if (action === "refresh") { await refresh(); message.textContent = ""; }
if (action === "validate") {
const result = await request("validate", { path: input.value });
message.textContent = result.path
? `${t.valid} ${result.path} (${t.free}: ${size(result.roots[0]?.free_bytes)})`
: t.default;
}
if (action === "save") {
await request("settings", { path: input.value, revision: state.revision });
dirty = false; await refresh(); message.textContent = t.saved;
}
if (action === "cleanup") {
const result = await request("cleanup", {});
const files = result.roots.reduce((sum, root) => sum + root.removed_files, 0);
const bytes = result.roots.reduce((sum, root) => sum + root.removed_bytes, 0);
const errors = result.roots.flatMap(root => root.errors);
await refresh(); message.textContent = `${t.removed}: ${files} ${t.files}, ${size(bytes)}${errors.length ? ` — ${errors.join("; ")}` : ""}`;
}
} catch (error) { if (!closed) message.textContent = error.message; }
finally { pending = false; if (!closed) controls(); }
}
input.addEventListener("input", () => { dirty = true; });
select.addEventListener("change", () => { if (select.value) { input.value = select.value; dirty = true; } });
for (const name of ["validate", "save", "refresh", "cleanup"]) buttons[name].addEventListener("click", () => perform(name));
buttons.close.addEventListener("click", () => dialog.close());
dialog.addEventListener("close", () => { closed = true; abort.abort(); dialog.remove(); if (opened === dialog) opened = null; }, { once: true });
dialog.addEventListener("keydown", event => { if (event.key === "Escape") event.stopPropagation(); });
api.addEventListener("status", event => {
const remaining = event.detail?.exec_info?.queue_remaining;
if (state && typeof remaining === "number") { state.busy = remaining > 0; controls(); }
}, { signal: abort.signal });
// Keep the native modal inside the settings dialog's DOM so Core's
// outside-click handling does not dismiss the underlying settings page.
const parent = event?.currentTarget?.closest?.('[role="dialog"], dialog') || document.body;
parent.append(dialog); dialog.showModal(); controls();
refresh().then(() => { if (!closed) message.textContent = ""; })
.catch(error => { if (!closed) message.textContent = error.message; })
.finally(() => { pending = false; if (!closed) controls(); });
}
app.registerExtension({
name: "H3Continuum.TemporaryStorage",
setup() {
app.ui.settings.addSetting({
id: "H3Continuum.Storage.Manager",
name: "H3 Continuum: Temporary Storage",
category: ["H3Continuum", "Storage", "Temporary Storage"],
type: () => {
const row = element("tr");
const cell = element("td", null, row); cell.colSpan = 2;
const button = element("button", language().open, cell);
button.type = "button"; button.addEventListener("click", openStorageDialog);
return row;
},
defaultValue: null,
});
},
});
+42
View File
@@ -0,0 +1,42 @@
import { app } from "../../scripts/app.js";
const NODE_CLASS = "DumasH3Continuum_H3ContinuumSamplerV38";
const MODE = "video_reference_mode";
const REPEAT = "Repeat Reference";
const FOLLOW = "Follow Timeline";
export function restoreVideoReferenceMode(node, info) {
const widget = node.widgets?.find((item) => item.name === MODE);
if (!widget) return;
const linked = info?.inputs?.some((input) => (
(input.name === MODE || input.widget?.name === MODE) && input.link != null
));
if (linked) return; // The connected input, not a hidden widget, owns its value.
let value;
const named = info?.widgets_values_named;
if (named && Object.prototype.hasOwnProperty.call(named, MODE)) {
value = named[MODE];
} else if (!named) {
// The existing V38X2 backend widgets occupy slots 0..29. This new
// optional scalar is appended; no upload/UI/transient row is inserted.
const values = info?.widgets_values;
if (Array.isArray(values) && values.length > 30) value = values[30];
}
// In particular A(Follow)->B(old workflow) must not inherit A's mode.
widget.value = value === FOLLOW ? FOLLOW : REPEAT;
node.__h3ContinuumIntuitiveUxRefresh?.();
}
app.registerExtension({
name: "H3Continuum.TimelineVideoModeExperimental",
beforeRegisterNodeDef(nodeType, nodeData) {
if (nodeData?.name !== NODE_CLASS && nodeType?.prototype?.comfyClass !== NODE_CLASS) return;
const previous = nodeType.prototype.onConfigure;
nodeType.prototype.onConfigure = function(info, ...args) {
const result = previous?.call(this, info, ...args);
restoreVideoReferenceMode(this, info);
return result;
};
},
});
Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

+392
View File
@@ -0,0 +1,392 @@
import { app } from "../../scripts/app.js";
const TARGET_NODES = new Set([
"DumasH3RefModPicker_H3RefModCreateFromFolder",
]);
const MIN_NODE_WIDTH = 320;
const CREATE_FOLDER_INSTRUCTIONS = [
"Keep image count to a minimum; around six to ten well-chosen",
"images can suffice. Add audio if wanted. Videos are ignored.",
"",
"Folder: absolute path or folder inside ComfyUI's input/.",
"Connect the H3 video VAE; audio VAE is optional.",
"use_subfolders creates one RefMod per immediate subfolder.",
"include_images stores grounding pictures; off by default.",
"Saves to models/refmods/ when save is enabled.",
"Or use directly as a mod, by connecting to mods output.",
].join("\n");
function addAspectRatioReminder(node) {
let tooltip = null;
let tooltipStyle = null;
function hideTooltip() {
tooltip?.remove();
tooltip = null;
tooltipStyle?.remove();
tooltipStyle = null;
}
const onDrawForeground = node.onDrawForeground;
node.onDrawForeground = function (context) {
const result = onDrawForeground?.apply(this, arguments);
if (!this.flags?.collapsed) {
context.save();
context.fillStyle = "#facc15";
context.font = "bold 18px sans-serif";
context.textAlign = "center";
context.textBaseline = "middle";
context.fillText("?", this.size[0] - 18, -15);
context.restore();
}
return result;
};
const onMouseMove = node.onMouseMove;
node.onMouseMove = function (event, position) {
const result = onMouseMove?.apply(this, arguments);
const overReminder = !this.flags?.collapsed && position &&
Math.abs(position[0] - (this.size[0] - 18)) <= 12 &&
Math.abs(position[1] + 15) <= 12;
if (!overReminder) {
hideTooltip();
return result;
}
if (!tooltip) {
tooltip = document.createElement("div");
tooltip.setAttribute("role", "tooltip");
const warning = document.createElement("strong");
warning.textContent = "Warning: images should all have the same aspect ratio within each dataset folder.";
warning.style.cssText = "display:block;margin-bottom:8px;color:#facc15;";
tooltip.append(warning, document.createTextNode(CREATE_FOLDER_INSTRUCTIONS));
tooltip.style.cssText = "position:fixed;z-index:10000;pointer-events:none;box-sizing:border-box;max-width:min(480px,calc(100vw - 16px));padding:12px 14px;border:1px solid #facc15;border-radius:4px;background:#252525;color:#fff;font-size:15px;line-height:1.45;white-space:pre-line;overflow-wrap:anywhere;";
tooltipStyle = document.createElement("style");
tooltipStyle.textContent = ".node-tooltip { display: none !important; }";
document.body.append(tooltip, tooltipStyle);
}
const bounds = tooltip.getBoundingClientRect();
tooltip.style.left = `${Math.max(8, Math.min(event.clientX + 12, window.innerWidth - bounds.width - 8))}px`;
tooltip.style.top = `${Math.max(8, Math.min(event.clientY + 12, window.innerHeight - bounds.height - 8))}px`;
return result;
};
const onMouseLeave = node.onMouseLeave;
node.onMouseLeave = function () {
hideTooltip();
return onMouseLeave?.apply(this, arguments);
};
const onRemoved = node.onRemoved;
node.onRemoved = function () {
hideTooltip();
return onRemoved?.apply(this, arguments);
};
}
const COMMON_PRESET_FIELDS = [
"concept_type",
"audio_concept_type",
"mode",
"ref_resolution",
"pool_h",
"pool_w",
"max_tokens",
"identity",
"merge",
"multiplier",
"audio_max_seconds",
"audio_max_tokens",
"audio_budget_policy",
"max_total_tokens",
"budget_policy",
];
const PRESET_CONFIG = {
DumasH3RefModPicker_H3RefModCreateFromFolder: {
manual: {
values: {
concept_type: "identity",
audio_concept_type: "voice",
mode: "Full Reference",
ref_resolution: 1024,
pool_h: 16,
pool_w: 16,
max_tokens: 8192,
identity: 500,
merge: false,
multiplier: 1,
audio_max_seconds: 30.0,
audio_max_tokens: 5120,
audio_budget_policy: "error",
max_total_tokens: 0,
budget_policy: "truncate",
},
fields: [],
compactFields: [],
},
identity_encode: {
values: {
concept_type: "identity",
audio_concept_type: "voice",
mode: "Full Reference",
ref_resolution: 1024,
pool_h: 16,
pool_w: 16,
max_tokens: 8192,
identity: 0,
merge: false,
multiplier: 1,
audio_max_seconds: 30.0,
audio_max_tokens: 5120,
audio_budget_policy: "error",
max_total_tokens: 0,
budget_policy: "truncate",
},
fields: [
"concept_type",
"audio_concept_type",
"mode",
"ref_resolution",
"identity",
"merge",
],
compactFields: COMMON_PRESET_FIELDS,
},
style_experimental: {
values: {
concept_type: "style",
audio_concept_type: "voice",
mode: "Compressed Reference",
ref_resolution: 1024,
pool_h: 8,
pool_w: 8,
max_tokens: 8192,
identity: 150,
merge: false,
multiplier: 1,
audio_max_seconds: 30.0,
audio_max_tokens: 5120,
audio_budget_policy: "error",
max_total_tokens: 0,
budget_policy: "truncate",
},
fields: [
"concept_type",
"audio_concept_type",
"mode",
"pool_h",
"pool_w",
"identity",
"merge",
],
compactFields: COMMON_PRESET_FIELDS,
},
motion_sequence: {
values: {
concept_type: "pose_motion",
audio_concept_type: "voice",
mode: "Compressed Reference",
ref_resolution: 1024,
pool_h: 16,
pool_w: 16,
max_tokens: 8192,
identity: 500,
merge: false,
multiplier: 1,
audio_max_seconds: 30.0,
audio_max_tokens: 5120,
audio_budget_policy: "error",
max_total_tokens: 0,
budget_policy: "truncate",
},
fields: [
"concept_type",
"audio_concept_type",
"mode",
"pool_h",
"pool_w",
"merge",
],
compactFields: COMMON_PRESET_FIELDS,
},
},
};
function findWidget(node, name) {
return node.widgets?.find((widget) => widget?.name === name) || null;
}
function moveWidgetAfter(node, widgetName, afterName) {
if (!node.widgets) return;
const widget = findWidget(node, widgetName);
const after = findWidget(node, afterName);
if (!widget || !after) return;
const from = node.widgets.indexOf(widget);
const afterIndex = node.widgets.indexOf(after);
if (from < 0 || afterIndex < 0) return;
node.widgets.splice(from, 1);
const insertAt = node.widgets.indexOf(after) + 1;
node.widgets.splice(insertAt, 0, widget);
}
function setWidgetVisible(widget, visible) {
if (!widget) return;
if (!widget.__h3VisibilityWrapped) {
widget.__h3VisibilityWrapped = true;
widget.__h3BaseComputeSize = widget.computeSize;
widget.computeSize = function (...args) {
if (widget.__h3Hidden) {
return [0, -4];
}
if (typeof widget.__h3BaseComputeSize === "function") {
return widget.__h3BaseComputeSize.apply(this, args);
}
return [MIN_NODE_WIDTH, Number(LiteGraph?.NODE_WIDGET_HEIGHT || 24)];
};
}
if (typeof widget.__h3OriginalDisplay === "undefined" && widget.inputEl) {
widget.__h3OriginalDisplay = widget.inputEl.style.display;
}
widget.__h3Hidden = !visible;
widget.hidden = !visible;
if (widget.inputEl) {
widget.inputEl.style.display = visible ? (widget.__h3OriginalDisplay || "") : "none";
}
}
function refreshNodeLayout(node) {
if (Array.isArray(node.size)) {
node.size[0] = Math.max(Number(node.size[0]) || 0, MIN_NODE_WIDTH);
}
const nextWidth = Math.max(node.size?.[0] || 0, MIN_NODE_WIDTH);
const nextHeight = node.computeSize?.()?.[1] || node.size?.[1] || 0;
node.setSize?.([nextWidth, nextHeight]);
node.onResize?.(node.size);
node.setDirtyCanvas(true, true);
app.graph?.setDirtyCanvas(true, true);
}
function syncPresetValues(node) {
const presetWidget = findWidget(node, "extraction_preset");
const preset = String(presetWidget?.value || "manual");
const nodeType = String(node.comfyClass || "");
const nodePresets = PRESET_CONFIG[nodeType];
if (!nodePresets) return;
const config = nodePresets[preset] || nodePresets.manual;
for (const [name, value] of Object.entries(config.values)) {
const widget = findWidget(node, name);
if (!widget) continue;
widget.value = value;
if (widget.inputEl) {
widget.inputEl.value = String(value);
if (typeof widget.inputEl.checked === "boolean" && typeof value === "boolean") {
widget.inputEl.checked = value;
}
}
}
}
function applyFolderNamingVisibility(node) {
if (String(node.comfyClass || "") !== "DumasH3RefModPicker_H3RefModCreateFromFolder") return;
const useSubfoldersWidget = findWidget(node, "use_subfolders");
const useFolderAsNameWidget = findWidget(node, "use_folder_as_name");
const nameWidget = findWidget(node, "name");
const useSubfolders = Boolean(useSubfoldersWidget?.value);
const useFolderAsName = Boolean(useFolderAsNameWidget?.value);
setWidgetVisible(useFolderAsNameWidget, !useSubfolders);
setWidgetVisible(nameWidget, !useSubfolders && !useFolderAsName);
}
function applyPresetVisibility(node) {
const presetWidget = findWidget(node, "extraction_preset");
const advancedWidget = findWidget(node, "advanced");
const preset = String(presetWidget?.value || "manual");
const advanced = Boolean(advancedWidget?.value);
const nodeType = String(node.comfyClass || "");
const nodePresets = PRESET_CONFIG[nodeType];
if (!nodePresets) return;
const config = nodePresets[preset] || nodePresets.manual;
const active = new Set(advanced ? config.fields : (config.compactFields || config.fields));
const known = new Set(Object.values(nodePresets).flatMap((configEntry) => [
...(configEntry.fields || []),
...(configEntry.compactFields || []),
]));
for (const name of known) {
setWidgetVisible(findWidget(node, name), !(preset !== "manual" && active.has(name)));
}
setWidgetVisible(advancedWidget, preset !== "manual");
applyFolderNamingVisibility(node);
refreshNodeLayout(node);
}
function attachWidgetRefresh(node, widgetName, onAfterChange) {
const widget = findWidget(node, widgetName);
if (!widget || widget.__h3RefreshAttached) return;
widget.__h3RefreshAttached = true;
const originalCallback = widget.callback;
widget.callback = function () {
const result = originalCallback?.apply(this, arguments);
onAfterChange();
return result;
};
}
function enhanceCreateNode(node) {
if (node.__h3CreateUiEnhanced) return;
node.__h3CreateUiEnhanced = true;
const originalOnResize = node.onResize;
node.onResize = function (size) {
if (size) {
size[0] = Math.max(size[0] || 0, MIN_NODE_WIDTH);
}
return originalOnResize?.apply(this, arguments);
};
addAspectRatioReminder(node);
moveWidgetAfter(node, "extraction_preset", "name");
moveWidgetAfter(node, "advanced", "extraction_preset");
moveWidgetAfter(node, "budget_policy", "max_total_tokens");
syncPresetValues(node);
applyPresetVisibility(node);
attachWidgetRefresh(node, "extraction_preset", () => {
syncPresetValues(node);
applyPresetVisibility(node);
});
attachWidgetRefresh(node, "advanced", () => applyPresetVisibility(node));
attachWidgetRefresh(node, "use_subfolders", () => applyPresetVisibility(node));
attachWidgetRefresh(node, "use_folder_as_name", () => applyPresetVisibility(node));
const onConfigure = node.onConfigure;
node.onConfigure = function () {
const result = onConfigure?.apply(this, arguments);
moveWidgetAfter(this, "extraction_preset", "name");
moveWidgetAfter(this, "advanced", "extraction_preset");
moveWidgetAfter(this, "budget_policy", "max_total_tokens");
syncPresetValues(this);
applyPresetVisibility(this);
attachWidgetRefresh(this, "extraction_preset", () => {
syncPresetValues(this);
applyPresetVisibility(this);
});
attachWidgetRefresh(this, "advanced", () => applyPresetVisibility(this));
attachWidgetRefresh(this, "use_subfolders", () => applyPresetVisibility(this));
attachWidgetRefresh(this, "use_folder_as_name", () => applyPresetVisibility(this));
return result;
};
}
app.registerExtension({
name: "H3RefModPicker.RefModCreate",
async beforeRegisterNodeDef(nodeType, nodeData) {
if (!TARGET_NODES.has(nodeData?.name)) return;
const onNodeCreated = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function () {
const result = onNodeCreated?.apply(this, arguments);
enhanceCreateNode(this);
return result;
};
},
});
console.log("[H3RefModPicker] RefModCreate extension loaded");
+116
View File
@@ -0,0 +1,116 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
function findWidget(node, name) {
return node.widgets?.find((widget) => widget?.name === name) || null;
}
function setWidgetVisible(widget, visible) {
if (!widget) return;
if (!widget.__h3LoaderVisibilityWrapped) {
widget.__h3LoaderVisibilityWrapped = true;
widget.__h3LoaderBaseComputeSize = widget.computeSize;
widget.computeSize = function (...args) {
if (widget.__h3LoaderHidden) {
return [0, -4];
}
if (typeof widget.__h3LoaderBaseComputeSize === "function") {
return widget.__h3LoaderBaseComputeSize.apply(this, args);
}
return [200, Number(LiteGraph?.NODE_WIDGET_HEIGHT || 24)];
};
}
if (typeof widget.__h3LoaderOriginalDisplay === "undefined" && widget.inputEl) {
widget.__h3LoaderOriginalDisplay = widget.inputEl.style.display;
}
widget.__h3LoaderHidden = !visible;
widget.hidden = !visible;
if (widget.inputEl) {
widget.inputEl.style.display = visible ? (widget.__h3LoaderOriginalDisplay || "") : "none";
}
}
function refreshNodeLayout(node) {
node.setDirtyCanvas(true, true);
app.graph?.setDirtyCanvas(true, true);
}
async function fetchLoaderCapabilities(mod) {
const query = mod ? `?mod=${encodeURIComponent(mod)}` : "";
const resp = await api.fetchApi(`/h3refmods/refmod-loader/capabilities${query}`);
if (!resp.ok) {
throw new Error(`Request failed (${resp.status})`);
}
return await resp.json();
}
function applyModalityVisibility(node, caps) {
const videoWidget = findWidget(node, "video_weight");
const audioWidget = findWidget(node, "audio_weight");
const hasVisual = typeof caps?.has_visual === "boolean" ? caps.has_visual : true;
const hasAudio = typeof caps?.has_audio === "boolean" ? caps.has_audio : true;
setWidgetVisible(videoWidget, hasVisual);
setWidgetVisible(audioWidget, hasAudio);
refreshNodeLayout(node);
}
async function refreshLoaderVisibility(node) {
const modWidget = findWidget(node, "mod");
const mod = String(modWidget?.value || "").trim();
if (!mod) {
applyModalityVisibility(node, { has_visual: true, has_audio: true });
return;
}
try {
const data = await fetchLoaderCapabilities(mod);
applyModalityVisibility(node, data.ok ? data : { has_visual: true, has_audio: true });
} catch (error) {
console.warn("[DumasH3RefModPicker_H3RefModLoader] Could not refresh capabilities:", error);
applyModalityVisibility(node, { has_visual: true, has_audio: true });
}
}
app.registerExtension({
name: "H3RefModPicker.RefModLoader",
async beforeRegisterNodeDef(nodeType, nodeData) {
if (nodeData?.name !== "DumasH3RefModPicker_H3RefModLoader") return;
const onNodeCreated = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function () {
const result = onNodeCreated?.apply(this, arguments);
const node = this;
const legacyWeightWidget = findWidget(node, "weight");
const modWidget = findWidget(node, "mod");
if (legacyWeightWidget) {
setWidgetVisible(legacyWeightWidget, false);
}
if (modWidget && !modWidget.__h3LoaderRefreshAttached) {
modWidget.__h3LoaderRefreshAttached = true;
const originalCallback = modWidget.callback;
modWidget.callback = function () {
const callbackResult = originalCallback?.apply(this, arguments);
void refreshLoaderVisibility(node);
return callbackResult;
};
}
const onConfigure = node.onConfigure;
node.onConfigure = function () {
const configureResult = onConfigure?.apply(this, arguments);
if (legacyWeightWidget) {
setWidgetVisible(legacyWeightWidget, false);
}
void refreshLoaderVisibility(this);
return configureResult;
};
void refreshLoaderVisibility(node);
return result;
};
},
});
console.log("[H3RefModPicker] RefModLoader extension loaded");
File diff suppressed because it is too large Load Diff
+128
View File
@@ -0,0 +1,128 @@
export function openRefModLibrary(node, fetchEntries) {
const previousFocus = document.activeElement;
const dialog = document.createElement("dialog");
dialog.className = "refmod-library";
dialog.setAttribute("aria-label", "RefMod library");
const style = document.createElement("style");
style.textContent = `
.refmod-library {box-sizing:border-box;width:min(1100px,96vw);height:90vh;max-height:90vh;padding:24px;border:1px solid #455266;border-radius:14px;background:#111820;color:#e8edf5;font:14px system-ui;}
.refmod-library::backdrop {background:#000b}
.refmod-library .layout {height:100%;display:flex;flex-direction:column;gap:16px;min-height:0}
.refmod-library header {display:flex;gap:12px;align-items:center;justify-content:space-between}
.refmod-library h2 {margin:0;font-size:23px}
.refmod-library .controls {display:flex;gap:10px;flex-wrap:wrap}
.refmod-library input,.refmod-library select,.refmod-library button {font:inherit;color:inherit;background:#222f3e;border:1px solid #455266;border-radius:7px;padding:9px 12px}
.refmod-library input {flex:1;min-width:180px}
.refmod-library button {cursor:pointer}
.refmod-library button:focus-visible,.refmod-library input:focus-visible,.refmod-library select:focus-visible {outline:2px solid #ffb257;outline-offset:2px}
.refmod-library .results {overflow:auto;min-height:0;flex:1;display:flex;flex-direction:column;gap:10px}
.refmod-library article {padding:16px;border:1px solid #334254;border-radius:9px;background:#18222d;display:grid;grid-template-columns:1fr auto;gap:8px 18px}
.refmod-library .description,.refmod-library .path {grid-column:1/-1;color:#afbed0;overflow-wrap:anywhere}
.refmod-library .path {font-size:12px}
.refmod-library .use {background:#ffb257;border-color:#ffb257;color:#171c22;font-weight:650}
.refmod-library .status {color:#afbed0;min-height:20px}
@media(max-width:600px){.refmod-library{padding:14px}.refmod-library article{grid-template-columns:1fr}.refmod-library header{flex-wrap:wrap}}
`;
const make = (tag, text, className) => {
const el = document.createElement(tag);
if (text !== undefined) el.textContent = text;
if (className) el.className = className;
return el;
};
const layout = make("div", undefined, "layout");
const header = make("header");
const close = make("button", "Close");
header.append(make("h2", "RefMod library"), close);
const controls = make("div", undefined, "controls");
const search = make("input");
search.placeholder = "Search name, folder or description";
search.setAttribute("aria-label", "Search RefMods");
const kind = make("select");
kind.setAttribute("aria-label", "Reference type");
for (const value of ["all", "image", "video", "audio", "bundle"]) {
const option = make("option", value === "all" ? "All reference types" : value);
option.value = value;
kind.append(option);
}
const slot = make("select");
slot.setAttribute("aria-label", "Loader slot");
const widgets = (node.widgets || []).filter(w => /^mod_(?:[ab]_)?\d+$/.test(w.name));
for (const widget of widgets) {
const option = make("option", widget.name);
option.value = widget.name;
slot.append(option);
}
const refresh = make("button", "Refresh");
controls.append(search, kind, slot, refresh);
const status = make("div", "Loading library…", "status");
status.setAttribute("role", "status");
const results = make("div", undefined, "results");
layout.append(header, controls, status, results);
dialog.append(style, layout);
document.body.append(dialog);
let entries = [], disposed = false, controller;
const cleanup = () => {
if (disposed) return;
disposed = true;
controller?.abort();
dialog.remove();
previousFocus?.focus();
};
close.onclick = () => dialog.close();
dialog.addEventListener("close", cleanup, {once:true});
const render = () => {
const query = search.value.trim().toLocaleLowerCase();
const filtered = entries.filter(e => (kind.value === "all" || e.kind === kind.value)
&& [e.name,e.concept,e.description].join(" ").toLocaleLowerCase().includes(query));
status.textContent = `${filtered.length} of ${entries.length} RefMods · choose a loader slot, then Use`;
results.replaceChildren();
for (const entry of filtered) {
const row = make("article");
const title = make("strong", entry.name);
const use = make("button", "Use", "use");
use.disabled = widgets.length === 0;
use.onclick = () => {
const widget = widgets.find(w => w.name === slot.value);
const linked = node.inputs?.find(i => i.name === slot.value)?.link;
if (linked != null) {
status.textContent = `${slot.value} is connected. Select an unconnected slot.`;
return;
}
if (!widget) return;
widget.value = entry.name;
widget.callback?.(entry.name);
node.setDirtyCanvas?.(true, true);
dialog.close();
};
const tokens = entry.tokens == null ? "tokens available after loading" : `${entry.tokens.toLocaleString()} tokens / copy`;
row.append(title, use, make("div", `${entry.kind} · ${entry.concept} · ${tokens}`, "description"),
make("div", entry.description || "No description saved", "description"),
make("div", entry.path, "path"));
results.append(row);
}
if (!filtered.length) results.append(make("p", "No matching RefMods. Try another search or Refresh after adding files."));
};
const load = async () => {
controller?.abort();
controller = new AbortController();
const signal = controller.signal;
refresh.disabled = true;
try {
const data = await fetchEntries(signal);
if (disposed || signal.aborted) return;
entries = data;
render();
} catch (error) {
if (!disposed && !signal.aborted) status.textContent = `Could not load library: ${error.message}`;
} finally {
if (!disposed && !signal.aborted) refresh.disabled = false;
}
};
search.oninput = render;
kind.onchange = render;
refresh.onclick = load;
dialog.showModal();
search.focus();
load();
return dialog;
}
+34
View File
@@ -0,0 +1,34 @@
import { app } from "../../scripts/app.js";
export function installRefModApply(nodeType) {
const created = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function(...args) {
const result = created?.apply(this, args);
// MatchType installs its callback on the instance during construction.
const connections = this.onConnectionsChange;
this.onConnectionsChange = function(...args) {
const index = this.inputs?.findIndex(input => input.name === "conditioning") ?? -1;
if (index >= 0) {
const input = this.inputs[index];
try {
// Frontend 1.39.2 proxies MatchType slots, but NodeSlot.node
// reads a #private field. That throws during canvas drawing.
void input.node;
} catch (error) {
if (!(error instanceof TypeError)) throw error;
this.inputs[index] = new input.constructor({...input}, this);
if (args[4] === input) args[4] = this.inputs[index];
}
}
return connections?.apply(this, args);
};
return result;
};
}
app.registerExtension({
name: "MiniMaxH3.ApplyCanvasCompatibility",
beforeRegisterNodeDef(nodeType, nodeData) {
if (nodeData.name === "DumasMiniMaxH3RefMod_MiniMaxH3RefModApply") installRefModApply(nodeType);
},
});
@@ -0,0 +1,28 @@
import { app } from "../../scripts/app.js";
const modes = { training: "Compressed Reference", encode: "Full Reference" };
function updateLabels(node) {
const mode = node.widgets?.find(widget => widget.name === "mode");
if (mode) {
mode.options.values = Object.values(modes);
mode.value = modes[mode.value] ?? mode.value;
}
const steps = node.widgets?.find(widget => widget.name === "identity");
if (steps) steps.label = "Refinement Steps";
}
app.registerExtension({
name: "MiniMaxH3.CreationLabels",
beforeRegisterNodeDef(nodeType, nodeData) {
if (!["DumasMiniMaxH3RefMod_MiniMaxH3RefModExtract", "DumasMiniMaxH3RefMod_MiniMaxH3RefModMasterExtract"].includes(nodeData.name)) return;
for (const hook of ["onNodeCreated", "onConfigure"]) {
const previous = nodeType.prototype[hook];
nodeType.prototype[hook] = function(...args) {
const result = previous?.apply(this, args);
updateLabels(this);
return result;
};
}
}
});
+67
View File
@@ -0,0 +1,67 @@
import { app } from "../../scripts/app.js";
import { api } from "../../scripts/api.js";
import { openRefModLibrary } from "./library_dialog.js";
export function updateRefModChoices(node, entries) {
const names = ["(none)", ...new Set(entries.map(entry => entry.name))];
for (const widget of node.widgets || []) {
if (!/^mod_(?:[ab]_)?\d+$/.test(widget.name)) continue;
// Preserve selections, including missing files, for an explicit load
// error instead of silently switching the subject after a refresh.
widget.options.values = names.includes(widget.value) || !widget.value
? [...names] : [...names, widget.value];
}
node.setDirtyCanvas?.(true, true);
}
app.registerExtension({
name: "MiniMaxH3.RefModLibrary",
beforeRegisterNodeDef(nodeType, nodeData) {
if (!["DumasMiniMaxH3RefMod_MiniMaxH3RefModsLoader", "DumasMiniMaxH3RefMod_MiniMaxH3RefModsAxis"].includes(nodeData.name)) return;
const removed = nodeType.prototype.onRemoved;
nodeType.prototype.onRemoved = function(...args) {
this._refmodRefresh?.abort();
this._refmodDialog?.close();
return removed?.apply(this, args);
};
const previous = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function(...args) {
const result = previous?.apply(this, args);
const refresh = this.addWidget("button", "Refresh RefMods", null, async () => {
this._refmodRefresh?.abort();
const controller = new AbortController();
this._refmodRefresh = controller;
refresh.name = "Refreshing RefMods…";
this.setDirtyCanvas?.(true, true);
try {
const response = await api.fetchApi("/refmods/library", {signal: controller.signal, cache: "no-store"});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const entries = await response.json();
if (controller.signal.aborted) return;
updateRefModChoices(this, entries);
refresh.name = "Refresh RefMods";
} catch (error) {
if (controller.signal.aborted) return;
refresh.name = "Refresh failed — click to retry";
console.error("RefMod refresh failed:", error);
} finally {
if (!controller.signal.aborted) {
this._refmodRefresh = null;
this.setDirtyCanvas?.(true, true);
}
}
}, {serialize:false});
this.addWidget("button", "RefMod library", null, () => {
this._refmodDialog?.close();
this._refmodDialog = openRefModLibrary(this, async signal => {
const response = await api.fetchApi("/refmods/library", {signal});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const entries = await response.json();
if (!signal.aborted) updateRefModChoices(this, entries);
return entries;
});
}, {serialize:false});
return result;
};
}
});
+158
View File
@@ -0,0 +1,158 @@
import { app } from "../../scripts/app.js";
const SLOT = /^(?:mod_(?:[ab]_)?|strength_|copies_|value_|components_|visual_strength_|audio_strength_)(\d+)$/;
const NONE = new Set(["", "None", "(none)"]);
export function installRefModSlots(nodeType) {
const created = nodeType.prototype.onNodeCreated;
nodeType.prototype.onNodeCreated = function(...args) {
const result = created?.apply(this, args);
setupSlots(this);
return result;
};
// LiteGraph stores widget values by position. Keep the original schema
// order for saving/loading even though the canvas groups them by slot.
// ComfyUI frontend >= 1.5x saves via serializeFromStoreState() and never
// calls serialize(), so that path has to be covered as well or workflows
// get written in display order and shift on the next load.
for (const method of ["serialize", "serializeFromStoreState", "configure"]) {
const original = nodeType.prototype[method];
nodeType.prototype[method] = function(...args) {
const state = this._refmodSlots;
if (!state) return original?.apply(this, args);
// Nodes 2.0 exposes a stable array view: assigning widgets mutates
// that same view, so retain a snapshot rather than its reference.
const displayOrder = [...this.widgets];
state.schemaOrderDepth++;
this.widgets = [...state.originals, ...displayOrder.filter(w => !state.originals.includes(w))];
try {
return original?.apply(this, args);
} finally {
this.widgets = displayOrder;
state.schemaOrderDepth--;
if (method === "configure") state.sync();
}
};
}
const connections = nodeType.prototype.onConnectionsChange;
nodeType.prototype.onConnectionsChange = function(...args) {
const result = connections?.apply(this, args);
this._refmodSlots?.sync();
return result;
};
}
function setupSlots(node) {
if (node._refmodSlots) return;
const originals = [...(node.widgets || [])];
const groups = new Map();
for (const widget of originals) {
const match = widget.name.match(SLOT);
if (!match) continue;
const slot = Number(match[1]);
if (!groups.has(slot)) groups.set(slot, []);
groups.get(slot).push(widget);
}
const slots = [...groups.keys()].sort((a, b) => a - b);
if (!slots.length) return;
const defaults = new Map(originals.map(w => [w, w.value]));
const hidden = new Map();
const removers = new Map();
node.properties ??= {};
node.properties.refmod_visible_slots ??= [slots[0]];
const linked = slot => node.inputs?.some(input => Number(input.name.match(SLOT)?.[1]) === slot && input.link != null);
const used = slot => groups.get(slot).some(w => w.name.startsWith("mod_")
? w.value != null && !NONE.has(String(w.value).trim())
: w.value !== defaults.get(w));
function show(widget, visible) {
if (!visible && !hidden.has(widget)) {
hidden.set(widget, {computeSize: widget.computeSize,
draw: widget.draw, mouse: widget.mouse, hidden: widget.hidden,
optionsHidden: widget.options?.hidden});
// converted-widget means a socket row in Nodes 2.0, not a hidden
// widget. Its empty row was responsible for the large gaps.
widget.options = {...widget.options, hidden: true};
widget.computeSize = () => [0, -4];
widget.draw = () => {};
widget.mouse = () => false;
widget.hidden = true;
} else if (visible && hidden.has(widget)) {
const saved = hidden.get(widget);
widget.options = {...widget.options, hidden: saved.optionsHidden};
widget.computeSize = saved.computeSize;
widget.draw = saved.draw;
widget.mouse = saved.mouse;
widget.hidden = saved.hidden;
hidden.delete(widget);
}
}
function sync() {
// configure fires connection callbacks before assigning widget values.
// Keep schema order until the entire positional restore has finished.
if (node._refmodSlots.schemaOrderDepth) return;
const requested = node.properties.refmod_visible_slots;
// A saved workflow can bring this back as {0: 1, 1: 2, ...} rather than
// an array, so accept either shape before falling back to slot one.
const requestedSlots = Array.isArray(requested)
? requested
: requested && typeof requested === "object"
? Object.values(requested)
: [slots[0]];
const visible = new Set(requestedSlots.filter(slot => groups.has(slot)));
for (const slot of slots) if (used(slot) || linked(slot)) visible.add(slot);
node.properties.refmod_visible_slots = [...visible].sort((a, b) => a - b);
const grouped = [...groups.values()].flat();
const extras = node.widgets.filter(w => !originals.includes(w) && ![...removers.values(), add].includes(w));
const displayOrder = [];
for (const slot of slots) {
for (const widget of groups.get(slot)) {
show(widget, visible.has(slot));
displayOrder.push(widget);
}
const remove = removers.get(slot);
remove.disabled = !!linked(slot);
show(remove, visible.has(slot));
displayOrder.push(remove);
}
show(add, visible.size < slots.length);
displayOrder.push(add, ...originals.filter(w => !grouped.includes(w)), ...extras);
node.widgets = displayOrder;
node.setSize?.([node.size[0], node.computeSize()[1]]);
node.setDirtyCanvas?.(true, true);
}
for (const slot of slots) {
removers.set(slot, node.addWidget("button", `Remove RefMod ${slot}`, null, () => {
if (linked(slot)) return;
for (const widget of groups.get(slot)) widget.value = defaults.get(widget);
node.properties.refmod_visible_slots = node.properties.refmod_visible_slots.filter(i => i !== slot);
sync();
}, {serialize: false}));
for (const widget of groups.get(slot)) {
const callback = widget.callback;
widget.callback = function(...args) {
const result = callback?.apply(this, args);
sync();
return result;
};
}
}
const add = node.addWidget("button", "+ Add RefMod", null, () => {
const next = slots.find(slot => !node.properties.refmod_visible_slots.includes(slot));
if (next != null) node.properties.refmod_visible_slots.push(next);
sync();
}, {serialize: false});
node._refmodSlots = {originals, sync, schemaOrderDepth: 0};
sync();
}
app.registerExtension({
name: "MiniMaxH3.AdditiveSlots",
beforeRegisterNodeDef(nodeType, nodeData) {
if (["DumasMiniMaxH3RefMod_MiniMaxH3RefModsLoader", "DumasMiniMaxH3RefMod_MiniMaxH3RefModsAxis"].includes(nodeData.name)) {
installRefModSlots(nodeType);
}
},
});
+167
View File
@@ -0,0 +1,167 @@
from __future__ import annotations
import importlib.util
import json
import pathlib
import unittest
ROOT = pathlib.Path(__file__).parents[1]
spec = importlib.util.spec_from_file_location(
"dumas_clothing_layout_planner_test",
ROOT / "dumas_clothing_layout_planner.py",
)
PLANNER = importlib.util.module_from_spec(spec)
assert spec.loader is not None
spec.loader.exec_module(PLANNER)
def inventory(*items):
return json.dumps({"items": list(items)})
class ClothingLayoutPlannerTests(unittest.TestCase):
def test_accepts_markdown_fenced_json_and_preserves_description(self):
items = PLANNER.normalize_inventory("```json\n" + inventory({
"id": "shirt", "name": "shirt", "description": "blue linen",
}) + "\n```")
self.assertEqual(items[0]["description"], "blue linen")
def test_repairs_literal_newlines_and_unescaped_prose_quotes(self):
raw = '{"items":[{"id":"shirt","name":"shirt","description":"Blue shirt\nwith a "soft" collar"}]}'
items = PLANNER.normalize_inventory(raw)
self.assertEqual(items[0]["description"], 'Blue shirt\nwith a "soft" collar')
def test_repairs_truncated_vlm_json_by_closing_open_containers(self):
raw = '{"items":[{"id":"shoe","name":"shoe","description":"Black leather'
items = PLANNER.normalize_inventory(raw)
self.assertEqual(items[0]["description"], "Black leather")
def test_ignores_vlm_prose_after_json_object(self):
raw = inventory({"id": "hat", "name": "hat"}) + "\nHere is the inventory."
self.assertEqual(PLANNER.normalize_inventory(raw)[0]["id"], "hat")
def test_salvages_schema_items_when_json_repair_cannot_parse(self):
raw = '{"items":[{"id":"shirt","name":"shirt","quantity":1,"description":"blue shirt'
original_repair = PLANNER._repair_vlm_json
PLANNER._repair_vlm_json = lambda _text: '{broken'
try:
items = PLANNER.normalize_inventory(raw)
finally:
PLANNER._repair_vlm_json = original_repair
self.assertEqual(items[0]["id"], "shirt")
self.assertEqual(items[0]["description"], "blue shirt")
def test_quantities_and_pairs_create_deterministic_instances(self):
plan = PLANNER.plan_layout(inventory(
{"id": "sock", "name": "sock", "quantity": 3},
{"id": "shoes", "name": "shoes", "quantity": 2, "unit": "pair"},
), 1200, 800)
self.assertEqual(len(plan["regions"]), 5)
self.assertEqual([region["id"] for region in plan["regions"]], [
"sock_001", "sock_002", "sock_003", "shoes_001", "shoes_002",
])
self.assertEqual(plan["regions"][3]["original_id"], "shoes")
self.assertEqual(plan["regions"][3]["unit"], "pair")
def test_regions_are_in_bounds_and_do_not_overlap(self):
plan = PLANNER.plan_layout(inventory(*[
{"id": f"item_{index}", "name": f"Object {index}", "size": "large" if index == 1 else "small"}
for index in range(1, 11)
]), 1536, 1024, "balanced")
regions = plan["regions"]
for region in regions:
self.assertGreaterEqual(region["x"], 0)
self.assertGreaterEqual(region["y"], 0)
self.assertLessEqual(region["x"] + region["width"], 1)
self.assertLessEqual(region["y"] + region["height"], 1)
for left_index, left in enumerate(regions):
for right in regions[left_index + 1:]:
overlap_x = min(left["x"] + left["width"], right["x"] + right["width"]) - max(left["x"], right["x"])
overlap_y = min(left["y"] + left["height"], right["y"] + right["height"]) - max(left["y"], right["y"])
self.assertFalse(overlap_x > 1e-7 and overlap_y > 1e-7)
def test_same_inputs_are_deterministic(self):
value = inventory({"id": "a", "name": "A", "aspect_ratio": "portrait"}, {"id": "b", "name": "B"})
self.assertEqual(PLANNER.plan_layout(value), PLANNER.plan_layout(value))
def test_balanced_mode_gives_large_items_more_area(self):
plan = PLANNER.plan_layout(inventory(
{"id": "large", "name": "Large", "size": "large"},
{"id": "small", "name": "Small", "size": "small"},
), 1200, 800)
areas = {region["id"]: region["width"] * region["height"] for region in plan["regions"]}
self.assertGreater(areas["large"], areas["small"])
@unittest.skipUnless(importlib.util.find_spec("PIL"), "Pillow is only available in the ComfyUI runtime")
def test_empty_inventory_has_empty_layout_and_preview(self):
plan = PLANNER.plan_layout('{"items": []}', 640, 480)
preview = PLANNER.render_preview(plan, "#EEE8DC")
self.assertEqual(plan["regions"], [])
self.assertEqual(preview.size, (640, 480))
self.assertEqual(PLANNER.build_layout_prompt(plan), "")
def test_layout_prompt_contains_ids_descriptions_and_positions(self):
plan = PLANNER.plan_layout(inventory({
"id": "item_001", "name": "blue shirt", "description": "cotton shirt",
}))
prompt = PLANNER.build_layout_prompt(plan)
self.assertIn("item_001", prompt)
self.assertIn("blue shirt", prompt)
self.assertIn("cotton shirt", prompt)
self.assertIn("region", prompt)
def test_flux3_boxes_use_official_order_and_1000_grid(self):
plan = PLANNER.plan_layout(inventory(
{"id": "item_001", "name": "blue shirt", "description": "blue cotton"},
{"id": "item_002", "name": "red bag", "description": "red leather"},
), 1200, 800, "grid")
rows = PLANNER.build_flux3_boxes(plan)
self.assertEqual(len(rows), 2)
for row in rows:
top, left, bottom, right = row["bbox"]
self.assertTrue(0 <= top < bottom <= 1000)
self.assertTrue(0 <= left < right <= 1000)
self.assertEqual(rows[0]["desc"], "blue cotton")
def test_flux3_prompt_has_matching_tags_and_trailing_json(self):
plan = PLANNER.plan_layout(inventory({
"id": "item_001", "name": "blue shirt", "description": "blue cotton",
}))
prompt, boxes_json = PLANNER.build_flux3_prompt(plan)
self.assertIn("<item_001>", prompt)
self.assertTrue(prompt.endswith(boxes_json))
self.assertEqual(json.loads(boxes_json)[0]["id"], "item_001")
def test_flux3_padding_shrinks_without_changing_legacy_plan(self):
plan = PLANNER.plan_layout(inventory({"id": "item_001", "name": "shirt"}))
original = dict(plan["regions"][0])
padded = PLANNER.build_flux3_boxes(plan, 10)[0]["bbox"]
self.assertEqual(plan["regions"][0], original)
self.assertGreater(padded[2] - padded[0], 0)
self.assertGreater(padded[3] - padded[1], 0)
def test_flux3_editing_mode_requires_source_coordinates(self):
with self.assertRaisesRegex(ValueError, "editing.*source bounding boxes"):
PLANNER.DumasClothingLayoutPlanner().plan(
inventory({"id": "item_001", "name": "shirt"}),
640, 480, "balanced", 5, 3, "#EEE8DC", True,
"flux3", 0, True, "editing",
)
def test_invalid_fields_have_actionable_errors(self):
with self.assertRaisesRegex(ValueError, "invalid unit"):
PLANNER.normalize_inventory(inventory({"id": "x", "name": "X", "unit": "trio"}))
with self.assertRaisesRegex(ValueError, "invalid JSON"):
PLANNER.normalize_inventory("{not-json}")
@unittest.skipUnless(importlib.util.find_spec("PIL"), "Pillow is only available in the ComfyUI runtime")
def test_preview_matches_requested_dimensions_and_labels(self):
plan = PLANNER.plan_layout(inventory({"id": "hat", "name": "hat"}), 777, 333, "grid")
preview = PLANNER.render_preview(plan, "#123456", True)
self.assertEqual(preview.size, (777, 333))
self.assertEqual(preview.getpixel((0, 0)), (18, 52, 86))
if __name__ == "__main__":
unittest.main()
+29
View File
@@ -0,0 +1,29 @@
import importlib.util
import pathlib
import unittest
ROOT = pathlib.Path(__file__).parents[1]
spec = importlib.util.spec_from_file_location(
"dumas_h3_latent_upscale_2d_test", ROOT / "dumas_h3_latent_upscale_2d.py"
)
module = importlib.util.module_from_spec(spec)
assert spec.loader is not None
spec.loader.exec_module(module)
class H3LatentUpscale2DTests(unittest.TestCase):
def test_ranges_cover_dimension_without_overlap_gap(self):
ranges = module.DumasMMH3LatentUpscale2D._ranges(150, 64, 8)
self.assertEqual(ranges[0], (0, 64))
self.assertEqual(ranges[-1], (86, 150))
for (_, end), (start, _) in zip(ranges, ranges[1:]):
self.assertLessEqual(start, end)
def test_rejects_overlap_equal_to_tile(self):
with self.assertRaises(ValueError):
module.DumasMMH3LatentUpscale2D._ranges(64, 32, 32)
if __name__ == "__main__":
unittest.main()
+250
View File
@@ -0,0 +1,250 @@
from __future__ import annotations
import importlib.util
import pathlib
import sys
import types
import unittest
from dataclasses import dataclass
ROOT = pathlib.Path(__file__).parents[1]
def load_module(name, path):
spec = importlib.util.spec_from_file_location(name, ROOT / path)
module = importlib.util.module_from_spec(spec)
assert spec.loader is not None
spec.loader.exec_module(module)
return module
PROMPT = load_module("dumas_h3_prompt_test", "dumas_h3_prompt_nodes.py")
UPSCALE = load_module("dumas_h3_upscale_test", "dumas_h3_upscale_nodes.py")
class FakeSamples:
def __init__(self, shape):
self.shape = shape
self.ndim = len(shape)
class FakeNoise:
def get_noise(self, seed):
return ("noise", seed)
class FakeSampler:
def get_sampler(self, name):
return ("sampler", name)
class FakeScheduler:
def get_sigmas(self, model, scheduler, steps, denoise):
return ("sigmas", scheduler, steps, denoise)
class FakeUpscale:
FUNCTION = "execute"
calls = []
def execute(self, **kwargs):
self.calls.append(kwargs)
source = kwargs["latent"]["samples"]
_, _, frames, height, width = source.shape
return ({"samples": FakeSamples((1, 16, frames, height * 2, width * 2))},)
@dataclass(frozen=True)
class FakeReferenceBundle:
images: tuple
reference_use: str
selectors: tuple
class FakeRefMod:
kind = "video"
path = ""
def __init__(self, name):
self.name = name
class H3NodeTests(unittest.TestCase):
def test_prompt_builder_prefers_dumas_continuum_bundle_class(self):
dumas_name = "vendor.dumas_h3_continuum.v3.reference_images_v39"
original_name = "v3.reference_images_v39"
dumas_module = types.ModuleType(dumas_name)
original_module = types.ModuleType(original_name)
class DumasBundle:
pass
class OriginalBundle:
pass
dumas_module.ReferenceImagesV39Bundle = DumasBundle
original_module.ReferenceImagesV39Bundle = OriginalBundle
old_modules = {name: sys.modules.get(name) for name in (dumas_name, original_name)}
sys.modules[dumas_name] = dumas_module
sys.modules[original_name] = original_module
try:
self.assertIs(PROMPT._continuum_reference_bundle_type(), DumasBundle)
finally:
for name, module in old_modules.items():
if module is None:
sys.modules.pop(name, None)
else:
sys.modules[name] = module
def test_prompt_schema_and_full_chunk_reference_routing(self):
self.assertEqual(
PROMPT.DumasH3SequencePromptBuilder.CATEGORY,
"Dumas/MiniMax H3/Prompt",
)
optional = PROMPT.DumasH3SequencePromptBuilder.INPUT_TYPES()["optional"]
self.assertEqual(optional["reference_image_1"][0], "IMAGE")
self.assertEqual(optional["reference_image_9"][0], "IMAGE")
reference_module = types.ModuleType("upstream.v3.reference_images_v39")
reference_module.ReferenceImagesV39Bundle = FakeReferenceBundle
sys.modules[reference_module.__name__] = reference_module
try:
node = PROMPT.DumasH3SequencePromptBuilder()
result = node.build(
2, 4, "Keep @R1 present.",
'{"clips":[{"slots":[{"start":0,"end":4,"text":"Walk."}]},'
'{"slots":[{"start":0,"end":4,"text":"Turn."}]}]}',
"Use @R2 ambience.", "Music.",
reference_image_1="environment",
reference_image_2="hero",
)
self.assertEqual(result[1], 2)
self.assertEqual(result[2], 4.0)
self.assertEqual(result[3].selectors, ("1,2", "1,2") + ("off",) * 7)
self.assertIn("[0-4s]", result[0])
self.assertIn("[4-8s]", result[0])
self.assertIn("Walk.", result[0])
self.assertIn("Turn.", result[0])
finally:
sys.modules.pop(reference_module.__name__, None)
def test_prompt_builder_emits_connected_images(self):
reference_module = types.ModuleType("upstream.v3.reference_images_v39")
reference_module.ReferenceImagesV39Bundle = FakeReferenceBundle
sys.modules[reference_module.__name__] = reference_module
try:
result = PROMPT.DumasH3SequencePromptBuilder().build(
2, 4, "", '{"clips":[{"slots":[{"start":0,"end":4,"text":"Use @R1."}]},'
'{"slots":[{"start":0,"end":4,"text":"Continue with @R1."}]}]}',
"", "", reference_image_1="hero_ref",
)
self.assertEqual(result[3].images[0], "hero_ref")
self.assertEqual(result[3].selectors[0], "1,2")
finally:
sys.modules.pop(reference_module.__name__, None)
def test_disabled_chunks_are_removed_from_prompt_and_routing_outputs(self):
reference_module = types.ModuleType("upstream.v3.reference_images_v39")
reference_module.ReferenceImagesV39Bundle = FakeReferenceBundle
sys.modules[reference_module.__name__] = reference_module
try:
result = PROMPT.DumasH3SequencePromptBuilder().build(
3, 4, "", '{"clips":['
'{"enabled":true,"slots":[{"start":0,"end":4,"text":"Use @R1."}]},'
'{"enabled":false,"slots":[{"start":0,"end":4,"text":"Do not emit @R1."}]},'
'{"enabled":true,"slots":[{"start":0,"end":4,"text":"Continue @R1."}]}]}',
"", "", reference_image_1="hero",
)
self.assertEqual(result[1], 2)
self.assertEqual(result[3].selectors[0], "1,2")
self.assertNotIn("Do not emit", result[0])
self.assertIn("[0-4s]", result[0])
self.assertIn("[4-8s]", result[0])
self.assertNotIn("[8-12s]", result[0])
finally:
sys.modules.pop(reference_module.__name__, None)
def test_image_slots_are_preserved_even_when_not_referenced(self):
reference_module = types.ModuleType("upstream.v3.reference_images_v39")
reference_module.ReferenceImagesV39Bundle = FakeReferenceBundle
sys.modules[reference_module.__name__] = reference_module
try:
result = PROMPT.DumasH3SequencePromptBuilder().build(
2, 4, "", '{"clips":['
'{"slots":[{"start":0,"end":4,"text":"Use @R2."}]},'
'{"slots":[{"start":0,"end":4,"text":"No extra reference."}]}]}',
"", "", reference_image_1="unused",
reference_image_2="used",
reference_image_3="also_unused",
)
self.assertEqual(result[3].images[1], "used")
self.assertEqual(result[3].images[0], "unused")
self.assertEqual(result[3].images[2], "also_unused")
finally:
sys.modules.pop(reference_module.__name__, None)
def test_two_shot_script_is_preserved_as_two_slots(self):
reference_module = types.ModuleType("upstream.v3.reference_images_v39")
reference_module.ReferenceImagesV39Bundle = FakeReferenceBundle
sys.modules[reference_module.__name__] = reference_module
try:
result = PROMPT.DumasH3SequencePromptBuilder().build(
1, 4, "", '{"clips":[{"slots":['
'{"start":0,"end":2,"text":"Shot 1: the subject walks."},'
'{"start":2,"end":4,"text":"Shot 2: the subject turns."}]}]}',
"", "",
)
self.assertEqual(result[1], 1)
self.assertIn("Shot 1: the subject walks.", result[0])
self.assertIn("Shot 2: the subject turns.", result[0])
finally:
sys.modules.pop(reference_module.__name__, None)
def test_per_clip_upscale_uses_connected_sigmas(self):
original = UPSCALE._native_node
original_helper = UPSCALE._continuum_helper
FakeUpscale.calls = []
UPSCALE._native_node = lambda name: {
"MMH3UltimateUpscale": FakeUpscale,
"RandomNoise": FakeNoise,
"KSamplerSelect": FakeSampler,
"BasicScheduler": FakeScheduler,
}.get(name)
geometry_inputs = []
def fake_helper(name):
if name == "latent_from_cpu":
return lambda video, audio: {"samples": video}
if name == "extract_av_streams":
return lambda latent: (latent["samples"], None)
def update_geometry(plan, latents):
geometry_inputs.append(latents)
return {**plan, "updated": True}
return update_geometry
UPSCALE._continuum_helper = fake_helper
try:
node = UPSCALE.DumasH3ContinuumTiledLatentUpscalePerClip()
outputs, audio, plan, report = node.upscale(
model=["model"], clip=["clip"],
video_latents=[{"samples": FakeSamples((1, 16, 85, 48, 84))}],
audio_latents=[{"samples": "first-pass"}],
assembly_plan=[{"plan": True}], refine_context=["context"],
latent_upscale_param=["upscale"], spatial_split_param=["spatial"],
upscale_sampler=["euler"], upscale_scheduler=["simple"],
upscale_steps=[3], upscale_denoise=[0.2], upscale_cfg=[1.0],
upscale_noise_seed=[100], conditioning=["conditioning"],
upscale_sigmas=["connected-sigmas"],
)
self.assertEqual(len(outputs), 1)
self.assertEqual(audio, [{"samples": "first-pass"}])
self.assertTrue(plan["updated"])
self.assertEqual(FakeUpscale.calls[0]["sigmas"], "connected-sigmas")
self.assertEqual(len(geometry_inputs), 1)
self.assertIsInstance(geometry_inputs[0][0]["samples"], FakeSamples)
self.assertIn("clips=1", report)
finally:
UPSCALE._native_node = original
UPSCALE._continuum_helper = original_helper
if __name__ == "__main__":
unittest.main()
+118
View File
@@ -0,0 +1,118 @@
import importlib.util
import os
import sys
import tempfile
import types
import unittest
try:
import torch
except ImportError:
torch = None
class FakeMod:
def __init__(self, name):
self.name = name
self.path = ""
def save(self, path):
with open(path + ".safetensors", "wb") as handle:
handle.write(b"test")
return path + ".safetensors"
class FakeVisualMod:
kind = "video"
name = "hero"
latent = torch.zeros(1, 24, 1, 2, 2) if torch is not None else None
class FakeAudioMod:
kind = "audio"
name = "voice"
class DumasRefModSaveTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
folder_paths = types.ModuleType("folder_paths")
folder_paths.models_dir = tempfile.gettempdir()
folder_paths.get_folder_paths = lambda _name: []
sys.modules.setdefault("folder_paths", folder_paths)
spec = importlib.util.spec_from_file_location(
"dumas_h3_refmod_nodes", "dumas_h3_refmod_nodes.py")
cls.module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(cls.module)
def test_input_folder_is_explicit_and_collision_safe(self):
with tempfile.TemporaryDirectory() as folder:
node = self.module.DumasH3RefModSave()
first = node.save([ (FakeMod("hero"), 1.0) ],
save_location="Input folder", input_folder=folder)
second = node.save([ (FakeMod("hero"), 1.0) ],
save_location="Input folder", input_folder=folder)
self.assertIn("hero.safetensors", first["result"][1])
self.assertIn("hero_2.safetensors", second["result"][1])
def test_fail_policy_does_not_overwrite(self):
with tempfile.TemporaryDirectory() as folder:
node = self.module.DumasH3RefModSave()
node.save([ (FakeMod("hero"), 1.0) ],
save_location="Input folder", input_folder=folder)
with self.assertRaises(FileExistsError):
node.save([ (FakeMod("hero"), 1.0) ],
save_location="Input folder", input_folder=folder,
collision_policy="Fail")
def test_duplicate_names_in_one_bundle_are_numbered(self):
with tempfile.TemporaryDirectory() as folder:
node = self.module.DumasH3RefModSave()
result = node.save([(FakeMod("hero"), 1.0), (FakeMod("hero"), 1.0)],
save_location="Input folder", input_folder=folder)
report = result["result"][1]
self.assertIn("hero.safetensors", report)
self.assertIn("hero_2.safetensors", report)
def test_requires_folder_for_external_modes(self):
node = self.module.DumasH3RefModSave()
with self.assertRaisesRegex(ValueError, "input_folder"):
node.save([ (FakeMod("hero"), 1.0) ], save_location="Input folder")
@unittest.skipUnless(torch is not None, "PyTorch is only available in the ComfyUI runtime")
def test_refmods_to_continuum_decodes_and_routes_prompt_tags(self):
bundle_module = types.SimpleNamespace(
ReferenceImagesV39Bundle=lambda **kwargs: kwargs)
sys.modules["fake.v3.reference_images_v39"] = bundle_module
try:
class VAE:
def decode(self, latent):
return torch.ones(1, 1, 4, 3)
bundle, info = self.module.DumasH3RefModsToContinuum().convert(
[(FakeVisualMod(), 1.0)], VAE(), routing="Prompt @R tags", chunk_count=2,
sequence_prompt="[0-4s]\n@R1 action\n\n[4-8s]\ncontinue")
self.assertEqual(bundle["reference_use"], "Per chunk")
self.assertEqual(bundle["selectors"][0], "1")
self.assertIn("decoded 1 visual", info)
finally:
sys.modules.pop("fake.v3.reference_images_v39", None)
@unittest.skipUnless(torch is not None, "PyTorch is only available in the ComfyUI runtime")
def test_refmods_to_continuum_skips_audio_only_rows(self):
bundle_module = types.SimpleNamespace(
ReferenceImagesV39Bundle=lambda **kwargs: kwargs)
sys.modules["fake.v3.reference_images_v39"] = bundle_module
try:
class VAE:
def decode(self, latent):
return torch.ones(1, 1, 4, 3)
with self.assertRaisesRegex(ValueError, "No visual RefMods"):
self.module.DumasH3RefModsToContinuum().convert(
[(FakeAudioMod(), 1.0)], VAE(), routing="All chunks")
finally:
sys.modules.pop("fake.v3.reference_images_v39", None)
if __name__ == "__main__":
unittest.main()
+71
View File
@@ -0,0 +1,71 @@
import importlib.util
import os
import sys
import tempfile
import types
import unittest
class FakeMod:
def __init__(self, kind="video", description="hero"):
self.kind = kind
self.description = description
self.concept_type = "identity"
class DumasRefModPickerTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
folder_paths = types.ModuleType("folder_paths")
folder_paths.models_dir = tempfile.gettempdir()
folder_paths.get_folder_paths = lambda _name: []
folder_paths.add_model_folder_path = lambda *_args: None
sys.modules.setdefault("folder_paths", folder_paths)
spec = importlib.util.spec_from_file_location(
"dumas_h3_refmod_picker", "dumas_h3_refmod_picker.py")
cls.module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(cls.module)
def test_weight_expands_into_full_and_fractional_rows(self):
self.assertEqual(self.module._expand_weight(2.4), [1.0, 1.0, 0.4])
self.assertEqual(self.module._expand_weight(0.0), [])
def test_browser_lists_only_refmod_metadata_files(self):
with tempfile.TemporaryDirectory() as folder:
old_roots = self.module._roots
self.module._roots = lambda: [folder]
try:
with open(os.path.join(folder, "not_a_refmod.safetensors"), "wb") as handle:
handle.write(b"not a safetensors file")
original_meta = self.module._read_meta
self.module._read_meta = lambda path: {"kind": "video", "description": "test"}
try:
result = self.module.list_browser_dir(folder)
finally:
self.module._read_meta = original_meta
self.assertEqual(len(result["mods"]), 1)
self.assertEqual(result["mods"][0]["kind"], "video")
finally:
self.module._roots = old_roots
def test_picker_loads_legacy_loader_api_and_appends_existing_rows(self):
loaded = [FakeMod("video"), FakeMod("audio", "voice")]
loader_module = types.SimpleNamespace(
load_refmods_from_file=lambda _path, device="cpu": loaded)
old_modules = dict(sys.modules)
sys.modules["fake_refmod_core"] = loader_module
old_safe = self.module._safe_file
self.module._safe_file = lambda _path: "/tmp/hero.safetensors"
try:
result = self.module.DumasH3RefModPicker().pick(
"/tmp/hero.safetensors", video_weight=1.0, audio_weight=0.5,
mods=[(FakeMod(), 1.0)])
self.assertEqual(len(result[0]), 3)
finally:
self.module._safe_file = old_safe
sys.modules.clear()
sys.modules.update(old_modules)
if __name__ == "__main__":
unittest.main()
+136 -2
View File
@@ -11,6 +11,8 @@ class FakeImage:
def save(self, path, *args, **kwargs):
self.saved_paths.append((path, args, kwargs))
os.makedirs(os.path.dirname(path), exist_ok=True)
open(path, "wb").close()
def convert(self, _mode):
return self
@@ -19,8 +21,23 @@ class FakeImage:
class FakeBatch:
shape = (1, 6, 8, 3)
def cpu(self):
return self
def numpy(self):
return self
def clip(self, _low, _high):
return self
def __mul__(self, _value):
return self
def astype(self, _dtype):
return self
def __getitem__(self, _index):
return types.SimpleNamespace(cpu=lambda: self, numpy=lambda: self, astype=lambda _dtype: self)
return self
class DumasImageNodeTests(unittest.TestCase):
@@ -56,16 +73,133 @@ class DumasImageNodeTests(unittest.TestCase):
{"DumasImageCompare", "DumasSaveImage", "DumasLoadImagesFolder"},
)
def test_save_image_exposes_image_folder_and_filename_outputs(self):
node = self.nodes.DumasSaveImageNode
self.assertEqual(node.RETURN_NAMES, ("image", "folder", "filename"))
self.assertEqual(node.OUTPUT_IS_LIST, (False, False, True))
def test_compare_without_inputs_returns_empty_result(self):
result = self.nodes.DumasImageCompareNode().compare_images()
self.assertEqual(result["ui"]["images"], [])
self.assertIsNone(result["result"][0])
def test_compare_preview_names_are_unique(self):
first = self.nodes.DumasImageCompareNode().compare_images(FakeBatch())
second = self.nodes.DumasImageCompareNode().compare_images(FakeBatch())
self.assertNotEqual(
first["ui"]["images"][0]["filename"],
second["ui"]["images"][0]["filename"],
)
def test_compare_uses_second_tensor_without_boolean_coercion(self):
image1 = FakeBatch()
image2 = FakeBatch()
result = self.nodes.DumasImageCompareNode().compare_images(image1, image2)
self.assertIs(result["result"][0], image2)
def test_load_folder_node_has_expected_outputs(self):
self.assertEqual(
self.nodes.DumasLoadImagesFolderNode.RETURN_NAMES,
("image", "mask", "width", "height", "filename", "index", "total"),
("image", "mask", "width", "height", "filename", "index", "total", "path"),
)
self.assertEqual(self.nodes.DumasLoadImagesFolderNode.OUTPUT_IS_LIST, (True,) * 8)
def test_folder_listing_includes_thumbnail_metadata(self):
with tempfile.TemporaryDirectory() as directory:
path = os.path.join(directory, "frame.png")
open(path, "wb").close()
files = self.nodes._list_folder_image_files(directory)
self.assertEqual(files[0]["file"], "frame.png")
self.assertIn("mtime", files[0])
def test_counter_uses_highest_existing_file(self):
with tempfile.TemporaryDirectory() as directory:
for name in ("image_001.png", "image_004.png", "image_002.png.jpg"):
open(os.path.join(directory, name), "wb").close()
self.assertEqual(
self.nodes._next_counter_for_relative_path(directory, "image_%counter%.png"),
5,
)
def test_counter_can_be_in_a_folder_name(self):
with tempfile.TemporaryDirectory() as directory:
os.makedirs(os.path.join(directory, "renders001"))
os.makedirs(os.path.join(directory, "renders004"))
open(os.path.join(directory, "renders001", "cover.png"), "wb").close()
open(os.path.join(directory, "renders004", "cover.png"), "wb").close()
self.assertEqual(
self.nodes._next_counter_for_relative_path(
directory, "renders%counter%/cover.png"
),
5,
)
def test_save_batch_assigns_distinct_counter_names(self):
with tempfile.TemporaryDirectory() as directory:
FakeImage.saved_paths.clear()
node = self.nodes.DumasSaveImageNode()
node.save_images(
[FakeBatch(), FakeBatch()],
directory,
"batch_%counter%",
"png",
95,
False,
True,
)
node.save_images(
[FakeBatch(), FakeBatch()],
directory,
"batch_%counter%",
"png",
95,
False,
True,
)
self.assertEqual(
[os.path.basename(path) for path, _args, _kwargs in FakeImage.saved_paths[-2:]],
["batch_003.png", "batch_004.png"],
)
def test_save_without_counter_token_does_not_overwrite(self):
with tempfile.TemporaryDirectory() as directory:
FakeImage.saved_paths.clear()
nested = os.path.join(directory, "renders")
os.makedirs(nested)
open(os.path.join(nested, "cover.png"), "wb").close()
self.nodes.DumasSaveImageNode().save_images(
[FakeBatch()], directory, "renders/cover", "png", 95, False, True
)
self.assertEqual(
os.path.basename(FakeImage.saved_paths[-1][0]),
"cover_001.png",
)
self.assertEqual(
os.path.dirname(FakeImage.saved_paths[-1][0]),
nested,
)
def test_preview_mode_writes_temp_images_without_touching_destination(self):
with tempfile.TemporaryDirectory() as directory:
FakeImage.saved_paths.clear()
self.nodes.DumasSaveImageNode().save_images(
[FakeBatch()], directory, "preview_%counter%", "webp", 90, False, False
)
self.assertEqual(len(FakeImage.saved_paths), 1)
saved_path = FakeImage.saved_paths[-1][0]
self.assertTrue(str(saved_path).startswith(self.temp_dir))
self.assertTrue(str(saved_path).endswith(".webp"))
self.assertFalse(os.path.exists(os.path.join(directory, "preview_001.webp")))
result = self.nodes.DumasSaveImageNode().save_images(
[FakeBatch()], directory, "preview_%counter%", "webp", 90, False, False
)
self.assertEqual(result["result"][1], self.temp_dir)
self.assertEqual(len(result["result"][2]), 1)
if __name__ == "__main__":
+102
View File
@@ -0,0 +1,102 @@
import importlib.util
import sys
import types
import unittest
class DumasMiniMaxNodeTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
comfy = types.ModuleType("comfy")
samplers = types.ModuleType("comfy.samplers")
samplers.KSampler = types.SimpleNamespace(
SAMPLERS=["euler", "euler_ancestral"],
SCHEDULERS=["simple", "beta"],
)
comfy.samplers = samplers
sys.modules.setdefault("comfy", comfy)
sys.modules.setdefault("comfy.samplers", samplers)
spec = importlib.util.spec_from_file_location("dumas_minimax_nodes", "dumas_minimax_nodes.py")
cls.module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(cls.module)
def test_registers_tiled_upscale_node(self):
self.assertEqual(set(self.module.NODE_CLASS_MAPPINGS), {"DumasMMH3TiledLatentUpscale"})
def test_exposes_independent_upscale_controls_and_param_inputs(self):
inputs = self.module.DumasMMH3TiledLatentUpscale.INPUT_TYPES()
required = inputs["required"]
self.assertEqual(required["latent_upscale_param"][0], "H3_UPSCALE_PARAM")
self.assertEqual(required["spatial_split_param"][0], "H3_SPATIAL_PARAM")
self.assertEqual(required["upscale_steps"][1]["default"], 3)
self.assertIn("upscale_noise_seed", required)
self.assertEqual(inputs["optional"]["temporal_split_param"][0], "H3_TEMPORAL_PARAM")
self.assertIn("upscale_sigmas", inputs["optional"])
def test_missing_native_node_is_reported(self):
original = self.module._native_node
self.module._native_node = lambda name: None
try:
with self.assertRaisesRegex(RuntimeError, "MMH3UltimateUpscale"):
self.module.DumasMMH3TiledLatentUpscale().upscale(
object(), object(), {"samples": object()}, {}, {},
"euler_ancestral", "simple", 3, 0.2, 1.0, 1,
)
finally:
self.module._native_node = original
def test_calls_native_upscale_with_tiled_params_and_own_schedule(self):
calls = {}
class Noise:
def get_noise(self, seed):
calls["seed"] = seed
return "noise"
class Sampler:
def get_sampler(self, name):
calls["sampler"] = name
return "sampler"
class Scheduler:
def get_sigmas(self, model, name, steps, denoise):
calls["schedule"] = (name, steps, denoise)
return "sigmas"
class Native:
def upscale(self, **kwargs):
calls["kwargs"] = kwargs
return ({"samples": FakeTensor((1, 24, 9, 48, 72))}, {}, {})
class FakeTensor:
def __init__(self, shape):
self.shape = shape
self.ndim = len(shape)
original = self.module._native_node
mapping = {
"MMH3UltimateUpscale": Native,
"RandomNoise": Noise,
"KSamplerSelect": Sampler,
"BasicScheduler": Scheduler,
}
self.module._native_node = lambda name: mapping[name]
try:
latent = {"samples": FakeTensor((1, 24, 9, 24, 36))}
result, info = self.module.DumasMMH3TiledLatentUpscale().upscale(
"model", "conditioning", latent, "upscale", "spatial",
"euler_ancestral", "simple", 3, 0.2, 1.0, 123,
temporal_split_param="temporal",
)
self.assertEqual(result["samples"].shape[2], 9)
self.assertEqual(calls["seed"], 123)
self.assertEqual(calls["schedule"], ("simple", 3, 0.2))
self.assertEqual(calls["kwargs"]["spatial_split_param"], "spatial")
self.assertEqual(calls["kwargs"]["temporal_split_param"], "temporal")
self.assertIn("Dumas tiled MiniMax-H3", info)
finally:
self.module._native_node = original
if __name__ == "__main__":
unittest.main()
+21
View File
@@ -0,0 +1,21 @@
import json
import unittest
import dumas_resolution_nodes as nodes
class DumasResolutionTests(unittest.TestCase):
def test_registers_dumas_resolution_node(self):
self.assertIn("DumasResolution", nodes.NODE_CLASS_MAPPINGS)
self.assertEqual(nodes.DumasResolutionNode.RETURN_NAMES, ("width", "height", "latent"))
self.assertIn("ResolutionState", nodes.DumasResolutionNode.INPUT_TYPES()["hidden"])
def test_resolution_state_is_clamped(self):
self.assertEqual(nodes.resolution_wh(json.dumps({"w": 32, "h": 20000})), (64, 16384))
def test_malformed_state_falls_back_to_default(self):
self.assertEqual(nodes.resolution_wh("not json"), (1024, 1024))
if __name__ == "__main__":
unittest.main()
+109
View File
@@ -0,0 +1,109 @@
import dataclasses
import unittest
import dumas_vendored_nodes as vendored
@dataclasses.dataclass(frozen=True)
class _Schema:
node_id: str
category: str
display_name: str
class _LegacyNode:
CATEGORY = "Upstream"
class _ModernNode:
@classmethod
def define_schema(cls):
return _Schema("UpstreamModern", "Upstream", "Modern")
class _SamplerBase:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"model": ("MODEL",),
"aspect": ("STRING",),
"preset": ("STRING",),
"custom_mp": ("FLOAT",),
"size_source": ("STRING",),
"width": ("INT",),
"height": ("INT",),
},
"optional": {
"reference_audio_1": ("AUDIO",),
"reference_audio_vae": ("VAE",),
},
}
def run(self, **kwargs):
return kwargs
class _Sampler(_SamplerBase):
pass
class VendoredNamespaceTests(unittest.TestCase):
def test_v39_sampler_keeps_clean_image_reference_surface(self):
sampler = vendored._clean_v39_sampler_input(_Sampler)
inputs = sampler.INPUT_TYPES()
self.assertNotIn("aspect", inputs["required"])
self.assertNotIn("preset", inputs["required"])
self.assertNotIn("custom_mp", inputs["required"])
self.assertNotIn("size_source", inputs["required"])
self.assertIn("width", inputs["required"])
self.assertIn("height", inputs["required"])
self.assertNotIn("reference_audio_1", inputs["optional"])
self.assertNotIn("reference_audio_vae", inputs["optional"])
self.assertNotIn("refmods", inputs["optional"])
self.assertNotIn("refmod_retention", inputs["optional"])
self.assertNotIn("refmod_max_total_tokens", inputs["optional"])
result = sampler().run(
model=object(), width=128, height=64, size_source="Legacy",
aspect="Auto", preset="Draft", custom_mp=0.3,
)
self.assertEqual(result["size_source"], "Manual")
def test_legacy_and_modern_nodes_get_distinct_dumas_identity(self):
original_packages = vendored._PACKAGES
original_loader = vendored._load_pack
try:
vendored._PACKAGES = (
(".one", "One", "DumasOne", "Dumas/Test"),
)
vendored._load_pack = lambda _name: type(
"Pack",
(),
{
"NODE_CLASS_MAPPINGS": {
"UpstreamLegacy": _LegacyNode,
"UpstreamModern": _ModernNode,
},
"NODE_DISPLAY_NAME_MAPPINGS": {},
},
)
mappings, display = vendored._namespaced_mappings()
self.assertEqual(
set(mappings), {"DumasOne_UpstreamLegacy", "DumasOne_UpstreamModern"}
)
self.assertNotIn("UpstreamLegacy", mappings)
self.assertEqual(mappings["DumasOne_UpstreamLegacy"].CATEGORY, "Dumas/Test")
self.assertEqual(
mappings["DumasOne_UpstreamModern"].define_schema(),
_Schema("DumasOne_UpstreamModern", "Dumas/Test", "DUMAS One · UpstreamModern"),
)
self.assertTrue(all(name.startswith("DUMAS ") for name in display.values()))
finally:
vendored._PACKAGES = original_packages
vendored._load_pack = original_loader
if __name__ == "__main__":
unittest.main()
+33 -3
View File
@@ -14,16 +14,46 @@ class DumasVideoNodeTests(unittest.TestCase):
cls.module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(cls.module)
def test_registers_two_generic_video_nodes(self):
def test_registers_generic_video_nodes(self):
self.assertEqual(
set(self.module.NODE_CLASS_MAPPINGS),
{"DumasStandaloneVideo", "DumasJoinVideoClips"},
{"DumasStandaloneVideo", "DumasSaveVideo", "DumasPrepareContinuation", "DumasJoinVideoClips"},
)
def test_save_video_exposes_external_folder_and_safe_outputs(self):
node = self.module.DumasSaveVideoNode
required = node.INPUT_TYPES()["required"]
self.assertIn("folder", required)
self.assertIn("filename", required)
self.assertEqual(node.RETURN_NAMES, ("video_path", "frames", "duration"))
def test_standalone_node_exposes_full_and_complete_outputs(self):
node = self.module.DumasStandaloneVideoNode
self.assertEqual(node.RETURN_NAMES, ("full_clip", "complete_clip", "complete_frames", "duration"))
self.assertEqual(
node.RETURN_NAMES,
("full_clip", "complete_clip", "complete_frames", "duration", "reference_frames"),
)
self.assertIn("overlap_frames", node.INPUT_TYPES()["required"])
self.assertIn("reference_frames", node.INPUT_TYPES()["required"])
def test_join_exposes_reference_frame_inputs(self):
optional = self.module.DumasJoinVideoClipsNode.INPUT_TYPES()["optional"]
self.assertEqual(optional["clip_2_reference_frames"][1]["default"], 0)
self.assertEqual(optional["clip_6_reference_frames"][1]["max"], 4096)
def test_prepare_continuation_exposes_clean_and_tail_outputs(self):
node = self.module.DumasPrepareContinuationNode
self.assertEqual(
node.RETURN_NAMES,
("clean_clip", "next_reference", "reference_frames", "clean_duration"),
)
self.assertIn("raw_clip", node.INPUT_TYPES()["required"])
def test_video_fps_parses_frame_rate(self):
self.assertEqual(
self.module._video_fps({"streams": [{"codec_type": "video", "r_frame_rate": "24/1"}]}),
24.0,
)
def test_join_signature_contains_stream_compatibility_fields(self):
signature = self.module._join_signature(
@@ -0,0 +1,49 @@
from __future__ import annotations
import importlib.util
import pathlib
import unittest
ROOT = pathlib.Path(__file__).parents[1]
spec = importlib.util.spec_from_file_location(
"dumas_reference_image_preprocessor_test",
ROOT / "dumas_reference_image_preprocessor.py",
)
MODULE = importlib.util.module_from_spec(spec)
assert spec.loader is not None
spec.loader.exec_module(MODULE)
class ReferenceImagePreprocessorTests(unittest.TestCase):
def test_all_reference_types_use_the_selected_token(self):
for reference_type in MODULE.REFERENCE_TYPES:
prompt = MODULE.build_reference_prompt(reference_type, "3", "blue details")
self.assertIn("@R3", prompt)
self.assertIn("Additional information about the", prompt)
self.assertIn('"blue details"', prompt)
def test_invalid_reference_id_is_rejected(self):
with self.assertRaises(ValueError):
MODULE.build_reference_prompt("Character", "10")
def test_empty_description_is_not_appended(self):
prompt = MODULE.build_reference_prompt("Scene", 1)
self.assertNotIn("Additional information", prompt)
def test_node_preserves_image_and_allows_manual_prompt(self):
image = object()
node = MODULE.DumasReferenceImagePreprocessor()
result = node.process(image, "Vehicle", "9", "red van", "my edited prompt")
self.assertIs(result[0], image)
self.assertEqual(result[1], "my edited prompt")
def test_node_generates_prompt_when_widget_is_empty(self):
node = MODULE.DumasReferenceImagePreprocessor()
result = node.process(object(), "Object", "2", "wooden handle", "")
self.assertIn("@R2", result[1])
self.assertIn("wooden handle", result[1])
if __name__ == "__main__":
unittest.main()
+1
View File
@@ -0,0 +1 @@
"""DUMAS-vendored upstream MiniMax H3 packages."""
+102
View File
@@ -0,0 +1,102 @@
tests/
tools/*
!tools/__init__.py
!tools/p20_file_backed_tensor_poc.py
!tools/verify_runtime.py
.pytest_cache/
**/__pycache__/
*.pyc
*.pyo
# Local backup archives are not distribution assets. The official workflow
# archive is re-included explicitly below.
*.zip
# Internal source/development records and the source-tree Manifest are not part
# of the Registry archive. REGISTRY_MANIFEST.sha256 covers the staged package.
AGENTS.md
PROJECT_STATE.md
WORKLOG.md
MANIFEST.sha256
# Repository-only automation and test configuration are not runtime assets.
.github/
.gitignore
.gitattributes
pytest.ini
# Ship current V3.9 and retained 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
# README launch illustrations: include only the current V3.9 guide assets.
!docs/images/
docs/images/*
!docs/images/v39/
docs/images/v39/*
!docs/images/v39/v38x2-feature-summary-historical.png
!docs/images/v39/v39-feature-summary.png
!docs/images/v39/v39-reference-images-node.png
!docs/images/v39/v39-sampler-node.png
# Ship the separate V3.9 and V3.8X2 workflows. The V3.8X2 standard ZIP also
# contains V3.9; its helper-explicit ZIP remains the V3.8X2-only alias.
# External custom-node dependencies are documented, not bundled.
examples/*
!examples/workflows/
examples/workflows/*
!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
!examples/workflows/MiniMax_H3_Continuum_V39_Reference_Inline.json
!examples/workflows/MiniMax_H3_Continuum_V39_Reference_Inline.zip
!examples/workflows/MiniMax_H3_Continuum_V39.json
!examples/workflows/MiniMax_H3_Continuum_V39.zip
!examples/MiniMax_H3_Continuum_V39.json
!examples/MiniMax_H3_Continuum_V39_Turbo_Sample.json
!examples/workflows/MiniMax_H3_Continuum_V39_Turbo_Sample.json
!examples/workflows/MiniMax_H3_Continuum_V39_Turbo_Sample.zip
!docs/TURBO_SAMPLE.md
!examples/MiniMax_H3_Continuum_V38X2.json
# Current loader migration instructions.
!docs/LOADER_PERSISTENCE_REPAIR.md
!docs/TIMELINE_VIDEO_EXPERIMENTAL.md
!docs/V39_REFERENCE_INLINE.md
.h3-timeline-experimental.json
# Current temporary storage controls and lifecycle contract.
!docs/TEMPORARY_STORAGE_JA.md
# Keep the Registry payload aligned with its declared Manifest.
!docs/REVIEW_RESTORATION_REPAIR.md
write-h3-v39-reference-prompts/
# Current Issue #31 compatibility and update guidance.
!docs/ISSUE31_SAMPLING_SIGNATURES.md
# Current regeneration intent and automatic variation guide.
!docs/REGENERATE_INTENT_V396.md
# Current audited KJ Preview Override compatibility guide.
!docs/KJ_PREVIEW_OVERRIDE_V398.md
# Keep the condensed README and its moved text references together.
!docs/USER_GUIDE.md
!docs/README_HISTORY.md
# Japanese detailed references retained by the condensed README.
!docs/USER_GUIDE_JA.md
!docs/README_HISTORY_JA.md
# Current 3.9.9 update and verification notes.
!docs/RELEASE_NOTES_V399.md
# Current 3.9.10 repair/update notes.
!docs/RELEASE_NOTES_V3910.md
# Current 3.9.11 repair/update notes.
!docs/RELEASE_NOTES_V3911.md
+3
View File
@@ -0,0 +1,3 @@
# Release manifests and the user-supplied workflow ZIP hash exact file bytes.
# Keep Git checkout/add from rewriting line endings on Windows or Linux.
* -text
@@ -0,0 +1,79 @@
name: Publish to Comfy Registry
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: publish-comfy-registry-v3.9.11
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out v3.9.11 release
uses: actions/checkout@v4
with:
ref: v3.9.11
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Verify release identity and source hashes
shell: bash
run: |
test "$(git describe --tags --exact-match HEAD)" = "v3.9.11"
python - <<'PY'
import hashlib
import pathlib
import tomllib
root = pathlib.Path(".")
metadata = tomllib.loads((root / "pyproject.toml").read_text())
assert metadata["project"]["version"] == "3.9.11"
assert metadata["tool"]["comfy"]["PublisherId"] == "ukr8b3g-cmyk"
for name in ("REGISTRY_MANIFEST.sha256", "MANIFEST.sha256"):
rows = (root / name).read_text().splitlines()
for row in rows:
expected, path = row.split(" ", 1)
assert hashlib.sha256((root / path).read_bytes()).hexdigest() == expected, path
print(name, len(rows), "matched")
print("Release commit:", __import__("subprocess").check_output(["git", "rev-parse", "HEAD"], text=True).strip())
PY
- name: Install publishing CLI
run: python -m pip install comfy-cli==1.22.0
- name: Build Registry package
shell: bash
run: |
comfy --skip-prompt --no-enable-telemetry env
comfy node pack
- name: Verify actual Registry ZIP before publication
shell: bash
run: |
python - <<'PY'
import hashlib
import pathlib
import zipfile
rows = pathlib.Path("REGISTRY_MANIFEST.sha256").read_text().splitlines()
declared = dict(row.split(" ", 1)[::-1] for row in rows)
with zipfile.ZipFile("node.zip") as archive:
assert archive.testzip() is None, "ZIP CRC failure"
actual = {entry.filename for entry in archive.infolist() if not entry.is_dir()}
expected = set(declared) | {"REGISTRY_MANIFEST.sha256"}
assert actual == expected, {"missing": sorted(expected - actual), "extra": sorted(actual - expected)}
for path, digest in declared.items():
assert hashlib.sha256(archive.read(path)).hexdigest() == digest, path
assert archive.read("REGISTRY_MANIFEST.sha256") == pathlib.Path("REGISTRY_MANIFEST.sha256").read_bytes()
print("Registry ZIP: exact file set and", len(declared), "hashes matched")
PY
- name: Publish verified package
env:
REGISTRY_ACCESS_TOKEN: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
shell: bash
run: |
test -n "$REGISTRY_ACCESS_TOKEN"
comfy node publish --token "$REGISTRY_ACCESS_TOKEN"
@@ -0,0 +1,154 @@
name: Publish verified v3.9.11
on:
workflow_run:
workflows: [tests]
types: [completed]
permissions:
contents: read
concurrency:
group: publish-v3.9.11
cancel-in-progress: false
jobs:
tag:
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' && github.event.workflow_run.head_repository.full_name == github.repository
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
publish: ${{ steps.tag.outputs.publish }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
- id: tag
env:
GH_TOKEN: ${{ github.token }}
RELEASE_SHA: ${{ github.event.workflow_run.head_sha }}
run: |
test "$(python -c 'import tomllib;print(tomllib.load(open("pyproject.toml","rb"))["project"]["version"])')" = 3.9.11
test "$(gh api repos/$GITHUB_REPOSITORY/branches/main --jq .commit.sha)" = "$RELEASE_SHA"
if gh release view v3.9.11 --json isDraft --jq .isDraft 2>/dev/null | grep -qx false; then
echo 'publish=false' >> "$GITHUB_OUTPUT"
exit 0
fi
if EXISTING=$(gh api repos/$GITHUB_REPOSITORY/git/ref/tags/v3.9.11 --jq .object.sha 2>/dev/null); then
echo "Existing tag: $EXISTING"
test "$EXISTING" = "$RELEASE_SHA"
else
echo "Creating v3.9.11 at $RELEASE_SHA"
gh api repos/$GITHUB_REPOSITORY/git/refs -f ref=refs/tags/v3.9.11 -f sha="$RELEASE_SHA"
fi
echo 'publish=true' >> "$GITHUB_OUTPUT"
tag-tests:
needs: tag
if: needs.tag.outputs.publish == 'true'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
ref: v3.9.11
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install CPU test dependencies
run: |
python -m pip install --index-url https://download.pytorch.org/whl/cpu torch
python -m pip install -r requirements.txt numpy safetensors pytest psutil opencv-python-headless Pillow aiohttp
- name: Compile tag
run: python -m compileall -q .
- name: Linux full regression on published tag
if: runner.os == 'Linux'
run: python -m pytest -q -p no:cacheprovider
- name: Windows storage regression on published tag
if: runner.os == 'Windows'
run: python -m pytest -q -p no:cacheprovider tests/test_temporary_storage.py tests/test_storage_api.py tests/test_p20_file_backed_tensor_poc.py tests/test_p22_file_backed_buffer.py tests/decode_cache
publish:
needs: [tag, tag-tests]
if: needs.tag.outputs.publish == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: v3.9.11
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Build GitHub ZIP and verify source manifests
run: |
python - <<'PY'
import hashlib,pathlib,subprocess,zipfile,tomllib
root=pathlib.Path('.')
assert tomllib.loads((root/'pyproject.toml').read_text())['project']['version']=='3.9.11'
for name in ['MANIFEST.sha256','REGISTRY_MANIFEST.sha256']:
rows=(root/name).read_text().splitlines()
for row in rows:
h,p=row.split(' ',1);assert hashlib.sha256((root/p).read_bytes()).hexdigest()==h,p
print(name,len(rows),'matched')
files=subprocess.check_output(['git','ls-tree','-r','--name-only','HEAD'],text=True).splitlines()
target=root/'ComfyUI-H3-Continuum-v3.9.11.zip'
with zipfile.ZipFile(target,'w',zipfile.ZIP_DEFLATED,compresslevel=9) as z:
for p in files:z.write(root/p,'ComfyUI-H3-Continuum/'+p)
with zipfile.ZipFile(target) as z:
assert z.testzip() is None
assert set(z.namelist())=={'ComfyUI-H3-Continuum/'+p for p in files}
assert all(z.read('ComfyUI-H3-Continuum/'+p)==(root/p).read_bytes() for p in files)
pathlib.Path('SHA256SUMS.txt').write_text(hashlib.sha256(target.read_bytes()).hexdigest()+' '+target.name+'\n')
print('GitHub ZIP exact:',len(files),'files')
PY
- name: Install pinned Registry CLI
run: python -m pip install comfy-cli==1.22.0
- name: Build and verify Registry archive
run: |
comfy --skip-prompt --no-enable-telemetry env
comfy node pack
python - <<'PY'
import hashlib,pathlib,zipfile
root=pathlib.Path('.')
declared={p:h for h,p in (r.split(' ',1) for r in (root/'REGISTRY_MANIFEST.sha256').read_text().splitlines())}
with zipfile.ZipFile('node.zip') as z:
assert z.testzip() is None
assert {i.filename for i in z.infolist() if not i.is_dir()}==set(declared)|{'REGISTRY_MANIFEST.sha256'}
assert all(hashlib.sha256(z.read(p)).hexdigest()==h for p,h in declared.items())
assert z.read('REGISTRY_MANIFEST.sha256')==(root/'REGISTRY_MANIFEST.sha256').read_bytes()
print('Registry ZIP exact:',len(declared),'payload hashes matched')
PY
- name: Publish GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: gh release create v3.9.11 ComfyUI-H3-Continuum-v3.9.11.zip SHA256SUMS.txt --verify-tag --title 'v3.9.11 — Spectrum signature stability / Review continuation' --notes-file docs/RELEASE_NOTES_V3911.md --latest
- name: Download and verify public GitHub assets
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release download v3.9.11 --dir public-download --pattern 'ComfyUI-H3-Continuum-v3.9.11.zip' --pattern SHA256SUMS.txt
python - <<'PY'
import pathlib,hashlib
for name in ['ComfyUI-H3-Continuum-v3.9.11.zip','SHA256SUMS.txt']:
assert pathlib.Path(name).read_bytes()==(pathlib.Path('public-download')/name).read_bytes(),name
print('Public GitHub assets match verified local ZIP and checksum')
PY
- name: Publish verified Registry package
env:
REGISTRY_ACCESS_TOKEN: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
run: |
test -n "$REGISTRY_ACCESS_TOKEN"
comfy node publish --token "$REGISTRY_ACCESS_TOKEN"
- uses: actions/upload-artifact@v4
if: always()
with:
name: publication-v3.9.11
path: |
ComfyUI-H3-Continuum-v3.9.11.zip
SHA256SUMS.txt
node.zip
+42
View File
@@ -0,0 +1,42 @@
name: tests
on:
push:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --index-url https://download.pytorch.org/whl/cpu torch
python -m pip install -r requirements.txt numpy safetensors pytest psutil opencv-python-headless Pillow aiohttp
- name: Compile Python
run: python -m compileall -q .
- name: Run tests
run: python -m pytest -q -p no:cacheprovider
windows-storage:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install CPU storage test dependencies
run: |
python -m pip install --index-url https://download.pytorch.org/whl/cpu torch
python -m pip install numpy safetensors pytest psutil aiohttp
- name: Windows file-backed and temporary storage regressions
run: python -m pytest -q -p no:cacheprovider tests/test_temporary_storage.py tests/test_storage_api.py tests/test_p20_file_backed_tensor_poc.py tests/test_p22_file_backed_buffer.py tests/decode_cache
+6
View File
@@ -0,0 +1,6 @@
__pycache__/
.pytest_cache/
*.py[cod]
*.safetensors
!tests/fixtures/v39_sampling_v5/**/*.safetensors
*.tmp
+42
View File
@@ -0,0 +1,42 @@
# Contributor rules
## Scope
MiniMax H3 Continuum for ComfyUI. Package 3.9.11 provides the V3.9 Sampler and Reference Images helper, while retaining the separate V3.8X2 workflow. Source publication does not imply a GitHub Release or Registry package publication.
Sampling Contract v6 and Graph Contract v4 apply to new generation. Keep original v5 history readable, without reusing its Takes in v6 generation or rewriting stored manifests. Public node IDs, socket/widget order, official workflows, Run Storage v3 and State/Session formats remain unchanged.
## Product and data contracts
- Keep normal generation, Review, retry, continuation and finalization discoverable. Advanced controls must not rewrite hidden values or generation identity.
- Follow ComfyUI Core validation. Do not reject prompts, unknown models, wrappers or merged models solely because they are unknown. Unrecognized prompt syntax falls back to Fixed and passes through as entered.
- Keep legacy strict_compatibility inputs loadable but ignore their values. Warnings remain diagnostic unless an unusable internal payload or corrupted data makes execution impossible.
- Preserve accepted chunks and prior Takes. State and Session remain safetensors plus JSON, written atomically.
- Keep full accepted chunk latents on CPU. Do not accumulate generated chunks in VRAM or decode Video/Audio VAE between chunks.
- Preserve native PackedLayout behavior and position_ids identity. Never silently resize continuation State or Session.
- Keep Reference conditioning, First/Last Image, Driving Audio and generated Audio contracts separate. Second Pass must preserve First Pass audio when the selected path requires passthrough.
- Keep SageAttention, Sol-Attn and Spectrum external and use their public wrappers. Do not replace Core classes globally or import private Spectrum runtime functions.
- UI nodes delegate to reusable modules. Preserve legacy implementation modules while current registered nodes import or inherit them.
- Main UI disclosure is presentation-only. It must not change backend kwargs, Sampling Contract or Run Storage identity.
- Keep standard Core display titles in public examples so users can identify node providers.
- Experimental changes default OFF and must not change Production behavior. Still Image Guide and deferred continuation interventions remain outside accepted Production scope.
- Keep V3.8X2 and V3.9 as distinct workflows. Do not automatically migrate historical node IDs, workflows, Runs or Takes.
- Keep the shipped workflow JSON/ZIP files byte-for-byte unless a workflow change is explicitly requested.
## Validation and contribution
- Preserve unrelated work and take a verified snapshot before changes. The snapshot destination is configurable through tools/snapshot.ps1.
- Reuse the existing pytest configuration, tests and runtime verifier. Distinguish CPU checks, offline registration, live loading, browser acceptance and GPU results.
- Runtime checks record prompts, media, model/LoRA/sampler settings, dimensions, chunk timings and observed results. Check saved workflow metadata when available.
- Verify all hashes declared by MANIFEST.sha256 and REGISTRY_MANIFEST.sha256 after modifying their payloads.
- Current public registration contains twelve nodes. Do not register experimental implementations implicitly.
- Do not claim whole-release acceptance from a targeted repair test. Browser save/reload and the unchanged default workflow remain separate acceptance checks.
- Keep machine-specific paths, credentials, service addresses, process identifiers and private operational records out of public documentation.
- Record public behavior and version history in CHANGELOG.md and WORKLOG.md. PROJECT_STATE.md describes the public source status.
- Commit and publish only when explicitly requested. Release/tag/Registry publication is a separate action.
Run the standard validation entry point from the repository root:
```powershell
powershell -ExecutionPolicy Bypass -File tools/validate.ps1
```
+386
View File
@@ -0,0 +1,386 @@
# Changelog
## 3.9.11 — Spectrum loaded-code audit stability (2026-10-20)
- Avoid rejecting an unchanged audited Spectrum implementation when repeated
imports produce different marshal encodings of equivalent code objects.
Keep the legacy audit first; only code-digest differences can use the fixed,
Python-specific supplemental audit of complete loaded descriptors.
- Preserve the original provider metadata and persisted Sampling v6 identity.
Existing safe Takes remain compatible; old unsafe/v5 history remains read-only.
Unknown source, changed code/defaults/closures and extra runtime state remain
non-reusable. Public inputs, workflows and generation/storage code are unchanged.
- CPU/JS: 2,139 passed / 2 skipped / 2 known Inspector expected failures, zero unexpected failures. Targeted Spectrum + Kitchen browser/GPU continuation passed: enabled Review buttons, Chunk 1 preserved, Chunk 2 generated, one reused / one new; both AV outputs fully decoded. See docs/RELEASE_NOTES_V3911.md for scope and a separate third-party MP4 menu-thumbnail workaround.
## 3.9.10 — Spectrum reuse and Reference assignment display (2026-10-20)
- Normalize CRLF source line endings in both Spectrum file and module-closure audits. Keep the pinned source identities and existing Python 3.13 profile bytes unchanged.
- Add separate audited Python 3.12 profiles for the supported local and upstream 0.2.29 implementations. Keep unknown source/runtime state non-reusable, preserve old unsafe/v5 Takes, and require a new Run for newly supported configurations. Sampling v6, Graph v4, public nodes and workflow bytes are unchanged. No new GPU acceptance is claimed for this repair.
## Unreleased — external Chunks Reference assignment table
- Treat externally connected Chunks as unresolved in the V3.9 Reference Images
helper. Display assignment range 1–16 with the reason and explicit All/Off
range labels; retain direct-count tables and saved future assignments.
- Keep existing selectors, backend routing, Sampling/Run Storage contracts,
public inputs and official workflows unchanged. Loading or refreshing does
not automatically expand old selections.
## 3.9.9 — upstream KJ Preview Override / Review continuation (2026-10-20)
Fix new-Run v6 read-only with the separately audited upstream KJ profile, and
show saved reasons when reuse is unavailable. Keep the original local profile,
Sampling v6 guards, old Takes and official workflow bytes.
CPU: **2,075 passed / 2 skipped / 2 known expected failures**, plus overlapping
90-case JS coverage. Upstream KJ GPU and normal-ComfyUI browser Continue both
passed: **Chunk 1 preserved, Chunk 2 generated, one reused / one new**; all four
AV outputs fully decoded. Browser checks used the existing local KJ profile.
These are targeted repair checks, not general quality or all-provider acceptance.
Restart ComfyUI and hard-refresh after updating. On Preview Override, disconnect
optional VAE/Audio VAE and set Tiny VAE `none`; retain generation VAEs. Correct
unsupported settings before starting a new Run. Old unsafe/v5 Takes remain
readable and are not automatically made reusable. No workflow rewiring or Take
deletion is required. [Full release notes](docs/RELEASE_NOTES_V399.md).
## Unreleased — V3.9 Turbo Sample (2026-10-16)
- Add a separate user-supplied Auto / 2 x 8s Turbo dance and Thai rap sample, gallery copy, ZIP and setup notes. Preserve standard workflows, saved Takes and product code. This source-only sample has no new GPU acceptance and does not replace v3.9.8 release assets.
## 3.9.8 — Issue #31 Preview Override Phase A (2026-10-16)
- Post-release documentation: after installing and restarting published tag `58fbd855`, both PyTorch/KJ and Kitchen + audited local Spectrum/KJ passed new-Run, separate-Queue Chunk 1 to 2 continuation with retained previews, unchanged prefix/contracts and four fully decoded AV outputs. Record the limited audited profile and unverified browser/quality/performance scope. Keep the original tag/assets and existing Takes/workflows.
- Add a finite KJ Model Preview Override signature for the explicitly audited source profile. Preserve fixed preview settings, loaded implementation identity and cross-key/list wrapper execution order; omit only the reviewed builtin `frames` list.
- Limit reuse support to VAE/Audio VAE disconnected, KJ Tiny VAE `none`, and Core NoPreviews/Auto/Latent2RGB. Unknown source, altered helpers, additional state and approximate-VAE preview remain non-reusable. Generation itself retains the existing fallback.
- Keep unaffected MODEL signatures, Sampling v6 guards, old unsafe/v5 history and official Workflow bytes unchanged. Full real-Core CPU gate: 1,995 passed / 3 skipped / 2 existing Inspector expected failures / zero unexpected failures and CUDA initialization attempts; the 48 dedicated KJ tests passed without skips. Normal ComfyUI GPU acceptance passed four Core-API Queues: PyTorch and Comfy Kitchen INT8 + the audited local Spectrum implementation, each with separate-Queue Chunk 1 to 2 continuation and held preview images. Both second Queues reused one chunk and generated one; original Chunk 1 bytes and contracts were unchanged. All four video/audio outputs fully decoded. See docs/KJ_PREVIEW_OVERRIDE_V398.md for exact support and limits.
## 3.9.7 — external-input regeneration cache (2026-10-15)
- Fix automatic Full Run variations when Chunks or Variation Nonce come from external nodes. Unresolved linked inputs no longer let Core skip an explicitly requested regeneration. Earlier accepted chunks, existing Takes, public inputs and official workflows are preserved. Update the custom nodes, restart ComfyUI and refresh the browser; no workflow changes or history deletion are required.
- CPU: 1,948 passed / 2 skipped / 2 known Inspector expected failures; zero unexpected failures and zero CUDA initialization attempts. Targeted Core-API GPU queues verified external Chunks=2 / Nonce=0, repeated identical automatic variations 1 then 2, and 1 reused / 1 generated chunk per variation. Browser save/reload and Run-button submissions were checked separately. GPU scope: PyTorch attention, Spectrum OFF, 512x512, 8-step Turbo, two 5-second chunks. This is a targeted cache repair, not general image-quality or all-accelerator acceptance.
## 3.9.6 — regeneration intent and automatic variation cache (2026-10-15)
- Preserve explicit Regenerate From and Variation Nonce across V3.8/V3.9 workflow restoration and Queue submission. Persist only the selected intent as workflow metadata; keep the legacy unowned Chunk 1 / nonce 0 cleanup and one-shot restart behavior.
- Execute Full Run explicit regeneration with automatic nonce 0 through Run Storage on every Queue. Ordinary Full Run and fixed positive nonces retain Core caching. Sampling v6 safety, accepted Takes, public inputs and official workflow files are unchanged.
- Full CPU gate: 1,908 passed / 2 skipped / 2 known Inspector expected failures; zero unexpected failures and CUDA initialization attempts. Normal ComfyUI browser save/reload retained Chunk 2 / nonce 5 and Chunk 1 / nonce 0 after history loading. Five new-Run GPU queues passed continuation, Chunk 2 regeneration and two identical Full Run / nonce 0 submissions; earlier Chunk 1 bytes were preserved. GPU scope: PyTorch, Spectrum OFF, 512x512, 8-step Turbo; all five media outputs fully decoded. See docs/REGENERATE_INTENT_V396.md.
## 3.9.5 — Issue #31 Attention and Spectrum reuse signatures (2026-10-15)
- Observe the loaded Core PyTorch and Comfy Kitchen INT8 attention overrides with a finite local descriptor, including the verified wrapper self-reference, implementations, defaults, closure, both container dispatch paths, numerical helpers and provider state.
- Keep Sampling v6, runtime signature v1 and Graph v4 unchanged. Overrides outside this adapter retain their existing observation policy; unrelated incomplete MODEL/CFG observations still disable reuse.
- Add a dedicated Spectrum binding identity for explicit audited provider implementations, including upstream Spectrum 0.2.29. Include every effective immutable config value and verified loaded functions/wrappers; exclude reviewed execution-local history and counters. Unknown provider sources, extra runtime state or altered callables remain non-reusable.
- Preserve original unsafe Takes and v5 history. Only new correctly identified runs can gain reusable prefixes. Public nodes, workflow bytes and storage schemas are unchanged. See the versioned validation record for CPU/GPU coverage and remaining limits.
## 3.9.4 — Registry packaging repair (2026-10-14)
Include the declared Review restoration guide and exclude repository-only prompt-authoring files from the Registry ZIP. The publishing workflow now builds the actual package and checks its exact file set, CRC and every Registry Manifest hash before uploading. Runtime behavior, twelve public node IDs, workflows and saved Runs/Takes are unchanged. GitHub Releases 3.9.3 and 3.9.2 remain available.
## 3.9.3 — temporary storage settings (2026-10-13)
- Add a server-owned scratch folder setting for both Finalize and Decode Cache, with storage candidates, logical file sizes, free space and conservative unused-file cleanup.
- Apply changes to new files while keeping existing outputs and aliases valid. Preserve blank/default paths and explicit internal overrides; never fall back silently to the original disk when a selected drive is unavailable.
- Protect unknown owners, live processes and mapped outputs during cleanup, including outputs whose helper has already been removed. Track new cache directories for dead-process recovery.
- Add manual RAM and Disk-backed capacity checks and account for discoverable Linux cgroup memory limits. Keep Auto's 4 GiB threshold and reserve, existing node controls, frame dtype and generation/storage identities.
- Keep V3.9 and V3.8X2 workflows and public node schemas unchanged. No new GPU generation is claimed for this storage update; see PACKAGE_VALIDATION.txt for CPU/browser/platform coverage.
- Follow-up: report missing/empty/invalid storage responses with HTTP status and recovery guidance. Keep storage candidates visible at a usable width and mutations disabled until status is available. Preserve Core address/profile handling and never replay a mutating request.
## 3.9.2 — Issue #30 frontend hotfix (2026-10-13)
- Skip upstream Review settings snapshots when no comparison baseline exists. Keep drawing-time edit detection and synchronous Queue/Take checks for reviewed settings.
- Notify connected Samplers once per Reference selection through the native callback, and skip `setSize()` when node dimensions are unchanged. Native assignment values still update synchronously; saved workflow and generation contracts are unchanged.
- Track the separate Reference Plan Inspector refresh failure after repeated Sampler configuration as an expected regression failure. No delayed update timer or new animation-frame scheduling is introduced.
- Bump package metadata to 3.9.2 while keeping V3.9 node IDs and existing generation/storage contracts. Native values and Review safety guards remain synchronous. Mobile freeze resolution is unconfirmed; Reference table rebuilding and snapshots with a Review baseline remain.
## 3.9.1 — stability fixes (2026-10-04)
- Preserve audio-only and mixed Second Pass keyframes while spatially adapting only video.
- Use Sampling Contract v6 / Graph Contract v4 for safe Take reuse, including sampler closures and MODEL CFG/wrappers. Keep v5 history readable without adopting its prefixes into v6 generation or rewriting old manifests.
- Slice Review Driving Audio once from physical-group natural time; use Core resampling and document explicit Reference Encode Cache invalidation for direct VAE weight mutation.
- Match V3.9 partial Review conditioning and Reference routes to actual output-group identities before Second Pass. Preserve complete-run behavior, original audio LATENT objects and saved Takes.
- The repaired runtime passed 1696 CPU cases (1 skipped) and three targeted 512×512 Review Second Pass GPU cases. Browser acceptance remains pending. Optional latent-upscale doubled outlines are tracked separately in Issue #27 and are not a required gate for this stabilization.
- Bump package metadata to 3.9.1 while preserving V3.9 public node IDs, widget order and official workflows. Restart ComfyUI and refresh the browser after updating. Keep historical V3.8 releases untouched; this patch adds no LoRA Plan. Versioned source downloads are provided through GitHub Releases; Registry publication is separate.
## 3.9.0 — V3.9 source on main (2026-09-29)
- Publish the separate V3.9 Sampler and nine-slot Reference Images V3.9 helper with fixed `@R1`–`@R9` identities and All / Per chunk assignments. V3.8X2 keeps its existing Sampler and Reference connections; saved Runs/Takes are not automatically migrated.
- Ship the user-selected V3.9 workflow JSON unchanged, a V3.9-only workflow ZIP, and a combined V3.8X2/V3.9 workflow ZIP. The ComfyUI Templates gallery exposes both separate workflows.
- Promote package metadata and startup version to `3.9.0`. Keep historical Releases/tags untouched. This main-source commit is not a new GitHub Release or Registry publication; browser save/reload and the unchanged default template's GPU acceptance remain separate gates.
## V3.9 development history — Reference Images in-node UI (2026-09-27)
- Add a separate nine-slot Reference Images V3.9 helper with fixed `@R1`–`@R9` IDs, in-node All chunks / Per chunk table, and one typed connection to the V3.9 Sampler. Both choices use the existing group-effective routing engine; disconnected or unassigned slots do not renumber later images.
- Supply a separate V3.9 workflow JSON/ZIP and user guide. V3.8 Sampler and V38X2 workflow JSON/ZIP remain unchanged. Older V3.9 prototype graphs require manual rewiring and saved Runs/Takes do not migrate automatically.
- Local CPU `1530 passed / 1 skipped / 0 failed`, frontend Reference Images and Review Queue contracts, and standalone runtime verification passed. Live-browser and GPU acceptance of this new helper/UI remain pending. No commit, push, Release or Registry publication.
- Rebase the separate V3.9 JSON/ZIP on the supplied V38X2+Decode Cache Helper workflow, preserving its appended Repeat Reference video setting, media loader values, Image bypass and Decode Cache Helper. Route Reference Images 1–9 through the new helper; keep all other graph nodes and settings unchanged. Restart ComfyUI fully after updating to load the new node schema.
## Prior local prototype — V3.9 Reference Routing RR-R6B (2026-09-25)
- Add a separate V3.9 Sampler ID with default All (unchanged V3.8 Reference path) and opt-in Custom R1–R9 per-chunk selectors. Keep the V3.8 schema/widget order and official V3.8X2 workflow files unchanged.
- Carry the frozen RR-R5 group contract to a read-only, post-Queue Plan Inspector. Pending groups remain configured/unverified; accepted groups display backend-verified generated/reused status, effective Picture mapping, SHA and warnings.
- Capture matching group-local routed conditioning in same-Queue Refine Context; Second Pass distinguishes verified Reference inheritance from prompt-only fallback. No cross-session reconstruction is claimed.
- Local full CPU: `1524 passed / 1 skipped / 0 failed`. RR-R6 GPU/API integration passed 11 Queues, including Review Q1–Q3, Second Pass, and the Sage/Sol/Spectrum wrapper matrix. The subsequent real-browser B0–B5 Review, completion, and save/reload gate passed using a corrected Ref2V 8-step LoRA / eight-step workflow; this is not a six-step rerun. Subjective identity and long-form image quality remain ungraded.
- V3.8X2 workflow JSON/ZIP and the V3.8 Sampler remain available. V3.9 `All` uses the V3.8 shared-reference path; changing to V3.9 `Custom` is a manual workflow change and does not automatically migrate an accepted Run or Take.
- The planned separate V3.8X2 tag/Release and `release/3.8x2` maintenance branch have not been created. V3.9 workflow, commit, push, Release, and Registry publication remain pending.
## Experimental on main — Unified Timeline Video (2026-09-22)
- Opt-in Follow Timeline / legacy-compatible Repeat Reference on the existing IMAGE input.
- Per-physical-group reference selection; source-end fallback; distinct interval VAE keys and local prompt caches.
- Local acceptance passed: full CPU `1424 passed / 1 skipped / 0 failed`, browser save/reload, and Follow/Repeat `2 × 5 s` GPU runs at 704×416/24fps with synchronized 10-second audio/video, mode separation, and no OOM/NaN/crash. This remains Experimental and is not a frame-perfect motion-copying or long-video RAM-optimization claim.
## Unreleased — Loader persistence repair (2026-09-21)
- Repair Issue #23 by delegating inherited native mode accessors; preserve Enable Image and remove draw/save-time widget collection replacement.
- Switch the two paired official V3.8X2 workflows to Core Load Audio and Core Load Video plus an Enable-free H3 Continuum Video Adapter using the existing FPS converter.
- Keep old Audio/Video IDs as deprecated compatibility nodes. Preserve other workflow nodes, settings and output contracts; regenerate matching ZIPs and integrity hashes.
- Add store-backed loader and converter regressions. Windows/browser acceptance remains a separate pending check; no Release/tag/Registry publication.
## 3.8.3 — V3.8X2 release preparation (2026-09-19)
- 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)
- Promote the accepted R0–R6 Runtime Redesign and final local GPU Functional Gate to the V3.8X (`3.8.1`) release candidate.
- 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)
- Updated the canonical V3.8 workflow to remove both `easy cleanGpuUsed` nodes. First Image now connects directly to the Sampler, and Core Create Video connects directly to Core Save Video; ComfyUI-Easy-Use is no longer a workflow dependency.
- Fixed the shipped legacy `v3.reference_video` module to import the shared temporal helper from the package root.
- Hardened the Windows installer: validate and copy only the Registry Manifest payload, and move previous installations to a backup directory outside `custom_nodes`.
- No Sampling, Review, or Run Storage behavior is changed by these release-hygiene repairs.
## 3.8.0 — Review UI hotfix on main (2026-09-08)
- Withdraw stale Continue/Retry/Finish actions after local or connected generation inputs change. A stale queued Retry falls back to normal backend compatibility/reuse checks instead of targeting an incompatible saved review.
- Add the frontend-only `Start again from Chunk 1` action: use existing non-destructive branch controls, preserve saved Takes, and consume the restart selection once after Queue.
- Preserve explicit Regenerate From boundaries instead of resetting them when a Review action is clicked. Preserve normal continuation, completed review, history and serialized widget order.
- No sampling, audio, continuation transport, workflow or public Python schema change. The separate 15-second Review static/noise report remains unresolved. This main-branch hotfix is not a new Registry publication or release asset.
## 3.8.0
### Added
- Established the seven-node V3.8 public surface: Sampler V3.8, Finalize, Load Image, Load Audio, Load Video, Second Pass, and the modular Reference Audios helper. Unreleased Easy facade prototypes remain in source but are not registered.
- Added `H3 Continuum Sampler V3.8` with shared `Draft` 0.30 MP, `Balanced` 0.60 MP, `Native 768`, and `Custom MP` resolution presets.
- Added `Review Each Chunk`, `Continue / Next`, `Regenerate Current`, and `Finish Remaining` controls backed by Run Storage review branches and canonical-head recovery.
- Publish one user-supplied V3.8 Spectrum workflow as matching JSON and ZIP. It requires Spectrum, rgthree, and KJNodes; the same graph can be switched to a task-matched LightX2V Turbo LoRA.
- Added Continuum Image, Audio, and Video loaders with explicit native bypass behavior for optional workflow inputs.
- Added `H3 Continuum Reference Audios`, which bundles up to three ordered Core-native standalone audio references behind one appended V3.8 Sampler socket while preserving the legacy single-reference path.
- Replaced the Main `Landscape / Portrait / Square` choice with a two-path `Size Source`: preserve the connected First Image aspect at the selected preset, or enter an exact aligned Manual Width and Height.
### Improved
- Integrated Driving Audio with Review, Smart Regenerate, Finish Remaining, and restart persistence.
- Preserved FL2VA Long Terminal Merge as one atomic physical review unit, including Smart Regenerate of the complete terminal pair.
- Reused one resolution resolver across Easy and normal V3.8 samplers while leaving the V3.7 schema and Production path unchanged.
- Extended Run Storage with Review lifecycle metadata, prefix reuse, nonce branches, and latest canonical-head restoration without changing the sampling identity contract.
- Added a frontend-only `Basic / Production` node property for Sampler V3.8. It changes presentation only and preserves the Python schema, widget order and values, backend inputs, Sampling identity, and Run Storage identity.
- Added Registry packaging rules that exclude tests, tools, diagnostics, Labs assets, and historical workflows while retaining all runtime-imported implementation modules.
- Kept the old V3.8 Aspect input as a hidden compatibility field. Saved Auto workflows migrate to First Image, while saved Landscape, Portrait, and Square workflows migrate to the same resolved Manual canvas.
### Notes
- Second Pass / `refine_context` is not supported on a partial Review sequence. Complete Review before running Second Pass.
- The 16GB GPU Gate passed with small headroom: Strict Minimal peaked at `14.96 GiB`, and complex accepted gates reached about `15.5-15.6 GiB`. Results vary by environment and are not a universal 16GB guarantee.
- Still Image Guide remains Experimental. V3.7 and earlier Node IDs are not exported by V3.8; workflows using them can appear with unknown nodes and should be opened with the matching historical Release/tag.
## 3.7.0
- Added `H3 Continuum Sampler V3.7` with one optional Still Image Guide input while preserving the V3.6 required-input schema, Production defaults, and saved-workflow compatibility.
- Generalized the Second Pass Conditioning Adapter so First/Last images, continuation context, and an owned Still Image Guide can be rebuilt at target latent geometry. Physical-group and Long Terminal Merge ownership remain intact.
- Added the internal schema-v1 `RefineSchedule` contract with `External`, `Full`, `Tail`, and `Partial` modes. Existing SIGMAS input remains compatible, and Tail/Partial use exact ranges from the source schedule.
- GPU-validated the internal Tail 6 suffix at 704×704 against the prior external Tail 6 path, with decoded Video SSIM `0.982936` and bit-exact decoded Audio PCM.
- Completed a 1152×1152 Conditioning correctness gate in which the original Still Image Guide source was reencoded at target geometry without changing the first-pass Audio contract.
- Added explicit source-role ownership so a Still Guide sharing the same frame as First/Last is not replaced by the endpoint image, and restricted Still Image Guide input to exactly one IMAGE.
- Added V3.7 compact-frontend parity for project identity, hidden internal widgets, Run Storage controls, queue normalization, diagnostics, and permanent Reference Audio sockets.
- Kept Still Image Guide **Experimental / Production HOLD**. Core hard-anchor semantics can cause an abrupt trajectory change at the Guide frame and redirect later motion; it is not a smooth transition control.
- Preserved V3.6/V3.5/V3.4 node IDs, public Second Pass schemas, Core PackedLayout/RoPE construction, Run Storage compatibility, and Production generation defaults.
## 3.6.1
- Canonicalized an absent Last Frame hash as `""` and added a narrowly scoped compatibility path for V3.6.1 caches whose old final chunk stored `"none"`. Extending a normal no-Last-Frame run from two to three chunks now reuses both stored chunks, while a real Last Frame and Long Terminal Merge still invalidate/regenerate their required sampling units.
- When Run Storage is turned Off, the compact frontend now resets hidden `Regenerate From` to `Auto` and `Variation Nonce` to `0`; the backend rejection remains as a non-UI safety check.
- Added non-blocking mixed Prompt syntax diagnostics. Timeline mode now ignores standalone `---` separator lines with `H3C-P105`, while preserving existing uncovered-chunk fallback and Fixed-prompt fail-open behavior.
- Prevented V3.6 Standard continuation from stopping when Audio Continuity is enabled with Fast 5, Strong 39, or Auto. These modes now resolve to the accepted Reference Context transport before Run Storage identity is created; Balanced 22 continues to use Masked AV.
- Kept Standard with Audio Continuity disabled on Masked Video, and kept Compatibility on Reference Context for every Continuity mode.
- Added explicit resolved-transport diagnostics without rewriting the user's Backend or Continuity selections.
- Preserved V3.5.3/V3.4 nodes, Sampling, Terminal Merge, Assembly, Seam, Run Storage schema, and saved-workflow compatibility.
## 3.6.0
- Added `H3 Continuum Sampler V3.6` with Standard Masked AV continuation. Prior finalized Video/Audio prefixes are preserved inside the next H3 target with Core noise masks instead of being appended as duplicate Reference rows.
- Retained `Compatibility` as an Advanced fallback to the V3.5 `Reference Context` transport. Internal transport identifiers are not exposed in the public UI, and all V3.4/V3.5 node IDs and saved workflows remain loadable.
- Scoped Run Storage identity and Sampling Contract execution semantics by nondefault continuation backend, preventing Reference and Masked chunks from being mixed while preserving legacy Reference revision identity.
- Preserved Long Terminal Merge as one physical sample during resume and `Regenerate From`; logical chunks `[2,3]` are never split or partially reused.
- Extended the shared V2/V3 `chunk_seconds` range to 4–30 seconds with a 5-second default and 0.1-second step. The 5–15 second range remains recommended and validated; longer high-resolution chunks can substantially increase VRAM and runtime.
- GPU-accepted T2VA, I2VA, Reference Image + Reference Audio, Balanced 22f/37T Joint AV, and 3×5-second FL2VA Long Terminal Merge Masked continuation. Protected Video/Audio prefixes finalize bit-exact, and the accepted PIG-3 audio output passed subjective listening.
- Measured the accepted FL2VA Terminal Group 2 path at 8.01% fewer packed rows and a 4.06% lower median Sampling time than Reference Context in the tested paired runs. These are environment-specific measurements, not universal speed guarantees.
- Preserved V3.5 Second Pass, Hi-Res Fix, Conditioning Bridge, disk-backed Assembly, Prompt/CLIP cache, Video Guide optimization, V3.4 compatibility, and existing Audio/Video Seam algorithms.
## 3.5.3
- Repaired the public Conditioning Bridge workflow's Width/Height input slots and added serialization-integrity checks for every published workflow.
- Removed stale orphan link IDs from the public V3.4, V3.4 Turbo, and V3.5 workflow files.
- Corrected Hybrid First/Last + Reference warning messages so public `<Picture N>` numbering remains absolute and matches the accepted runtime behavior.
- Losslessly re-encoded one unreferenced legacy PNG that strict image decoders could not read.
- Preserved all V3.5.2 generation, Sampling, Conditioning, Terminal Merge, Assembly, Seam, Run Storage, Prompt/CLIP cache, Video Guide optimization, and V3.4 compatibility contracts.
## 3.5.2
- Added a conservative V3.5-only Prompt/CLIP cross-run LRU cache for unchanged T2VA, I2VA, and FL2VA conditioning. Reference, scheduled, tokenizer-option, and hook-modified CLIP paths bypass the cache; V3.4 is unchanged.
- Verified cache HIT execution with `encode_calls=0` and bit-identical decoded video and audio PCM. The optimization removes repeated Prompt/CLIP work only; Sampling still runs normally.
- Reduced long Video Guide preprocessing memory by hashing and finite-checking the complete source in eight-frame CPU chunks while retaining only the prefix required by H3 conditioning.
- Preserved the exact Video Guide source SHA-256, Run Storage identity, `17k+5` frame alignment, final-frame padding, VAE input, Qwen input, Sampling seed, decoded video, and decoded audio.
- Measured the deterministic CPU comparison at approximately 71% lower additional peak RSS (`396.8 MiB` to `114.7 MiB`) and 59% lower retained storage (`225 MiB` to `93 MiB`) with effectively unchanged preprocessing time.
- Completed the Phase 3/4 performance and feature-overhead audit. No speculative Sampling, Driving Audio lazy-decode, Audio hash, Assembly, Seam, Session, or V3.4 optimization was adopted.
- Preserved all V3.4/V3.5 node IDs, backend socket keys, saved-workflow compatibility, Sampling, Conditioning, Terminal Merge, Assembly, Seam, and Run Storage contracts.
## 3.5.1
- Added `H3 Continuum Conditioning Bridge V3.5`, exposing one complete Core-compatible MODEL and CONDITIONING object per Continuum physical group without flattening CONDITIONING entries.
- Added optional standalone Reference Audio conditioning to Sampler V3.5. Its two Python-defined sockets remain permanently present; the frontend no longer adds/removes them or serializes a visibility-only widget, preserving workflow widget alignment on save/reload.
- Removed the experimental Last Queued Seed override and restored standard ComfyUI `control after generate` behavior for the V3.5 sampler.
- Renamed the displayed video-guide inputs to `Video Guide Frames` and `Video Guide Size` to distinguish a video loader's IMAGE frame batch from still Reference Images. Backend input keys and saved-workflow links are unchanged.
- GPU-accepted Conditioning Bridge generation, Reference Audio/Image retention, and the V3.5 Second Pass/Hi-Res paths while preserving physical-group, Terminal Merge, Run Storage, and audio contracts.
## 3.5.0
- Added `H3 Continuum Sampler V3.5` with a Continuum-aware refine-context output while preserving the V3.4 sampler path.
- Added `H3 Continuum Second Pass V3.5` as the advanced bridge for externally processed H3 video latents, including physical-group and Long Terminal Merge preservation.
- Added experimental `H3 Continuum Hi-Res Fix V3.5`, using a bounded pixel/VAE resize round trip before low-denoise Second Pass sampling.
- Added `H3 Continuum Latent Resize V3.5` as an advanced utility; direct high-ratio latent interpolation is not the recommended main Hi-Res Fix path.
- Added `H3 Continuum Assemble + Seam V3.5` with Auto, RAM, and Windows-safe disk-backed video buffers while keeping audio in RAM.
- Added the recommended V3.5 template workflow with optional Hi-Res Fix, Auto assembly, shared still-image megapixel sizing, and separate Video Guide Frames sizing.
- Preserved Exact Duration, seam behavior, physical decode-group ordering, first-pass audio passthrough, and external Core VAE Decode contracts.
- Kept V3.4 nodes and saved-workflow compatibility unchanged.
- Validated a 9.49 GiB final IMAGE with hash-identical RAM/Disk-backed output and approximately 9.50 GiB lower Windows private memory in Disk-backed mode.
- GPU-accepted the integrated 1x5 576-to-1152 Main path and Hybrid/Reference 1x5 paths; documented that the 3x5 2x terminal 77T group exceeds the tested RTX 5060 Ti 16 GiB.
## 3.4.0
- Completed the V3.4 runtime path from the public sampler through V3/V2 to `run_sequence()`.
- Added Driving Audio with absolute-time guide slices while preserving the original source for final output.
- Added persistent Video Guide Frames conditioning with Efficient 0.4 MP, Balanced 0.6 MP, and Match Output modes.
- Included Driving Audio and Video Guide Frames identities in Run Storage contracts.
- Changed malformed or empty prompts to warning-and-fallback behavior instead of stopping generation.
- Removed independent compatibility, model, and upstream-node restrictions that were stricter than ComfyUI Core.
- Added V3.4 runtime, driving-audio, and context diagnostics coverage.
## 3.3.0
- Promoted Timeline Video to a stable public node with chunk-local slicing and a 0.4 MP default.
- Added `H3 Continuum Assemble + Seam` with stable Audio Seam Auto and guarded Video Seam Auto defaults.
- Kept `Auto 2` as an experimental exposure-ramp extension without widening the visible option label.
- Added native Reference Audio conditioning and retained up to three ordered Reference Images.
- Preserved stable sampler Node IDs, Run Storage compatibility, Core VAE decode, and Spectrum Interop API v1 Actual Prefix 2 behavior.
- Added consolidated runtime validation results and documented known Timeline Video and Auto 2 limitations.
## 3.2.4
- Added native MiniMax H3 Reference Audio 1 conditioning with deferred Audio VAE encoding.
- Matched Core's permissive prompt handling by warning instead of stopping on unavailable Picture or Audio tags.
- Matched Core's dynamic Reference behavior by compacting active image inputs into Picture 1 through Picture N.
- Kept Sampling, Continuation, Spectrum Interop, external Core VAE Decode, and assembly semantics unchanged.
## 3.2.3
- Formalized the third ordered Reference Image as a compatibility-preserving extension.
- Kept V3.2.2 zero, one, and two-image Reference Contract JSON unchanged.
- Added Image 3 shape, dtype, exact SHA-256, position, and preprocess metadata only for three-image runs.
- Added Golden Contract and Revision identity regression coverage for V3.2.2 saved runs.
- Kept Sampling, Continuation, Spectrum Interop, Core VAE Decode, and assembly semantics unchanged.
## 3.2.2
- Allowed Ref2VA, FL2VA, and unverified checkpoints with Reference conditioning.
- Kept checkpoint classification as diagnostics without automatic MODEL switching.
- Kept Strict Compatibility for genuinely unsafe or unsupported H3 contracts.
## 3.2.1
- Declared V3.2.1 stable after GitHub Actions, Windows Ref2VA generation, Spectrum Actual Prefix 2, chunk integrity and complete Auto Resume passed.
- Added T2VA, First/Last Frame, FL2VA and persistent two-image Reference conditioning to the production sampler.
- Added crash-safe raw AV Run Storage, automatic resume, deterministic Revisions and partial regeneration.
- Combined ordered upstream graph fingerprints with runtime MODEL/CLIP/VAE weight probes for fail-closed reuse.
- Added per-chunk SHA-256 verification and rejected Regenerate From when Run Storage is disabled.
- Added official MiniMax H3 Sigma Shift graph-contract support.
- Updated CI dependencies, Windows runtime verification and package metadata for V3.2.1.
- Standardized project licensing as MIT.
- Kept sampling, Continuation, Spectrum Interop and external Core VAE decode semantics unchanged.
## 2.1.7
- Added the compact static `H3 Continuum Sampler` facade over the unchanged V2 execution core.
- Added Clip Overrides, Advanced, and Result pack helper nodes.
- Preserved `H3ContinuumSamplerV2` as a Legacy/Core workflow compatibility node.
- Removed the frontend display controller and all dynamic socket, proxy-widget, DOM, resize, and serialization workarounds.
- Kept State, Session, Prompt Plan, Sampling, Native Continuity, and Spectrum Interop contracts unchanged.
## 2.1.6
- Rebuilt the Sampler V2 frontend as one Vue-aware display controller.
- Removed the Individual Clip Overrides accordion; only active Clip Prompt sockets are shown.
- Kept connected out-of-range Clip Prompt sockets visible when chunks is reduced.
- Added one Advanced Settings control; connected advanced sockets stay visible while collapsed.
- Removed fixed node-height handling and all input/output add/remove UI folding.
- Kept backend socket/widget order, types, serialization, State/Session/Prompt Plan schemas, sampling, and Spectrum Interop unchanged.
- Exposed show_preview as a per-node basic control and removed the duplicate global preview setting.
## 2.0.1
- Fixed the bundled V2 example workflow widget serialization for `base_seed` with `control_after_generate`.
- Added an in-memory migration guard for the malformed 2.0.0 example where later widgets were shifted by one slot (`diagnostics` arrived as `0`).
- Preserved valid 2.0.0 workflows and all V1/V2 node identifiers and schemas.
- Added regression coverage for the legacy shifted-widget signature.
## 2.0.0
- Added production **H3 Continuum Sampler V2** for integrated N-chunk generation.
- Kept the V1 continuation algorithm and all V1 node identifiers unchanged.
- Added Fixed, List, and Timeline prompt planning plus a connectable Prompt Plan node.
- Cached each unique Qwen prompt conditioning before H3 sampling.
- Reused one externally accelerator-patched MODEL, sampler, and sigma schedule across all chunks.
- Deferred Video/Audio VAE decoding until every H3 chunk finished.
- Captured full raw AV chunk latents and next-state tails on CPU before decoding.
- Removed the second device-to-host state transfer by deriving next-state tails from committed CPU entries.
- Added conservative latent-motion Auto Context selection with 5/22/39-frame profiles.
- Added deterministic independent 64-bit per-chunk seeds and reroll nonces.
- Added V2 Session resume, accepted-prefix reuse, branch-safe reroll, and atomic safetensors/JSON persistence.
- Added exact cumulative audio sample-boundary assembly to prevent long-chain rounding drift.
- Added exact total-duration correction.
- Added single-allocation decoded IMAGE assembly and preflight RAM safety checks.
- Added Basic and Full diagnostics, including video overlap MAE/PSNR and audio correlation/boundary jump.
- Added optional V1 State entry point and V2 Session-to-V1 State conversion.
- Added V2 public API modules and regression/orchestration tests.
- Updated installer runtime verification for all ten registered nodes.
## 1.0.1
- Fixed a false strict-compatibility failure when Sol-Attn wraps MiniMax H3
`PackedLayout.__init__` with `*args` / `**kwargs` for Morton/span tracking.
- Strict checking still fails closed when the native H3 constructor genuinely
removes required positional or keyword capabilities.
- Added regression tests for the native signature, Sol-Attn forwarding wrapper,
and a genuinely incompatible constructor.
## 1.0.0
- Added **H3 Continuum Join** for initial and continuation clips.
- Added direct native video/audio latent state capture with 5/22/39-frame profiles.
- Represented continuation history as one native H3 `video` / `video_audio` reference block.
- Added Finish, Assemble, atomic State Save/Load, signed audio-grid offsets, in-place MM-RoPE adjustment, strict compatibility tests, and accelerator composition.
Binary file not shown.
Binary file not shown.
+74
View File
@@ -0,0 +1,74 @@
ComfyUI-H3-Continuum 3.9.11 — Spectrum signature stability
CPU/JS: 2139 passed / 2 skipped / 2 known Inspector xfailed; unexpected failures 0.
Targeted Spectrum + Kitchen browser/GPU: Review enabled; Chunk 1 retained,
Chunk 2 generated (1 reused / 1 new); both audio/video outputs fully decoded.
Existing Takes and official workflows retained. Unknown-code reuse remains refused.
Restart ComfyUI, hard-refresh browser, and check a new unique Run.
Scope, limits and separate MP4-menu workaround: docs/RELEASE_NOTES_V3911.md
Historical package records follow; their test counts describe their own versions.
------------------------------------------------------------------------
ComfyUI-H3-Continuum 3.9.9 — public KJ / Review continuation
CPU 2075 passed / 2 skipped / 2 known xfailed; upstream KJ GPU and installed local-KJ browser Continue PASS.
既存Take・Workflowは維持。更新後は再起動・ブラウザー再読込。旧unsafe/v5は自動変換しません。
対応条件と検証範囲: docs/RELEASE_NOTES_V399.md / docs/KJ_PREVIEW_OVERRIDE_V398.md
--- Historical package record (unchanged) ---
3.9.8: 監査済みKJ Model Preview Overrideの画像保持後のChunk継続を修正。対応条件・検証範囲:docs/KJ_PREVIEW_OVERRIDE_V398.md
ComfyUI-H3-Continuum 3.9.8 — V3.9 / V3.8X2 インストール
**最新版パッケージは3.9.8です。** 固定版のGitHub配布は下表を参照してください。Registryの公開状態は別に確認します。
| バージョン | Release | カスタムノード本体ZIP | SHA-256チェックサム |
| --- | --- | --- | --- |
| 3.9.8 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.8) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.8/ComfyUI-H3-Continuum-v3.9.8.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.8/SHA256SUMS.txt) |
| 3.9.7 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.7) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.7/ComfyUI-H3-Continuum-v3.9.7.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.7/SHA256SUMS.txt) |
| 3.9.6 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.6) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.6/ComfyUI-H3-Continuum-v3.9.6.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.6/SHA256SUMS.txt) |
| 3.9.5 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.5) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.5/ComfyUI-H3-Continuum-v3.9.5.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.5/SHA256SUMS.txt) |
| 3.9.4 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.4) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.4/ComfyUI-H3-Continuum-v3.9.4.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.4/SHA256SUMS.txt) |
| 3.9.3 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.3) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.3/ComfyUI-H3-Continuum-v3.9.3.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.3/SHA256SUMS.txt) |
| 3.9.2 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.2) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.2/ComfyUI-H3-Continuum-v3.9.2.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.2/SHA256SUMS.txt) |
元の[3.9.2 Source ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/archive/refs/tags/v3.9.2.zip)は従来のタグから取得できます。本体ZIPと公式Workflow ZIPは別の配布物です。
3.9.8は監査済みKJ Preview Overrideの画像保持後の継続を修正します。VAE/Audio VAE未接続・Tiny VAE noneが条件で、KJNodes全般への対応ではありません。更新後は新Runを作成してください。ManagerでH3 Continuumを検索し、Registryの検査・一覧反映を確認して3.9.8を選択するか、`comfy node install comfyui-h3-continuum@3.9.8`を使用します。更新後はComfyUIを再起動し、ブラウザーも再読込してください。既存Run/Takeの削除は不要です。旧markerなしChunk 1/Nonce 0は選び直して保存してください。旧unsafe履歴は引き続き再利用不可です。
3.9.3は一時ストレージの保存先設定と状態表示・未使用削除を追加した版です。V3.9ノードと3.9.1/3.9.2のWorkflowはそのまま使用できます。旧v5 Takeと履歴は読めますが、新しいv6生成の前半には再利用できません。新規Full VideoまたはStart again from Chunk 1で開始してください。新しいGitHub Release/Registry公開は別工程で、過去のRelease/tagは残します。V3.8X2 WorkflowをV3.9へ自動変換せず、別々のWorkflowとして保存してください。保存済みRun/Takeも自動移行しません。
1. ComfyUIを終了します。
2. 既存の `ComfyUI-H3-Continuum` を更新する場合は、作業中のworkflowとRun Storageを先に退避します。
3. ZIPを展開し、`ComfyUI-H3-Continuum` フォルダーを `ComfyUI/custom_nodes/` に配置します。
4. ComfyUIを再起動します。旧UIが残る場合はブラウザをハードリロードします。
インストール先は、使用しているComfyUIの `custom_nodes/ComfyUI-H3-Continuum/` です。
PowerShellによる自動インストール:
`install_windows.ps1`
現行ソースの登録IDは計12件です。以下の旧V3.8基本7件(旧Audio/Video Loader 2件を含む)に、Reference Images、Decode Cache Helper、Video Adapterを加えたV3.8X2の10件と、V3.9 Sampler/Reference Images V3.9の2件です。旧Audio/Video Loaderは新規Workflowでは推奨しません。
- H3 Continuum Sampler V3.8
- H3 Continuum Reference Audios
- H3 Continuum Finalize
- H3 Continuum Load Image
- H3 Continuum Load Audio
- H3 Continuum Load Video
- H3 Continuum Second Pass
V3.8X2公式Workflowの標準経路は、Sampler V3.8 → Decode Cache Helper → Finalize → Core Create Video → Core Save Videoです。V3.9公式はSampler V3.9とReference Images V3.9ヘルパーを使用し、残りの出力経路は同様です。Hi-Res Fixは標準経路に含みません。サイズは `Size Source = First Image`(初期画像がある場合)または `Manual`(Width / Heightを入力)で指定します。
Workflowは `examples/workflows/MiniMax_H3_Continuum_V39.json` と `examples/workflows/MiniMax_H3_Continuum_V38X2.json` を別々に用意し、Templatesにも2件表示します。V3.8X2標準ZIPには両JSONを同梱し、V3.9単独ZIPも残します。ZIPはWorkflow用で、カスタムノード本体のインストーラーではありません。V3.9公式はユーザー指定JSONを無改変で採用した32ノード/39リンク、First Image+Draft 0.30 MP、2×10秒のGenerate Full Video(保存値はFull Run)です。First Image Loaderは有効なので、Queue前に自分の画像を選んでください。Reference-onlyならFirst ImageをOFFにし、Size SourceをManualへ切り替えます。保存済み480×640はManual時のみ有効です。画像Loader 1~6は接続済み・初期Bypassで、7~9は必要な場合に画像Loaderを追加接続します。Sequence Promptは空欄なので実行前に入力してください。SpectrumとTurbo LoRAは初期OFFです。完全なgraphにはSpectrum、rgthree、KJNodesを別途導入してください。ComfyUI-Easy-Useは不要です。モデルや画像・音声は同梱しません。
最小確認:
- chunks: 2 または 3
- chunk_seconds: 5.0
- continuity: Balanced — 22 frames
- Sequence Prompt: Text (Multiline)を接続
- V3.8X2/V3.9公式Workflowでは内蔵Decode Cache Helper、Finalize、Core Create Video/Save Videoの接続を維持
- Reference Audioを複数使う場合は `H3 Continuum Reference Audios` helperへ最大3本を接続
- V3.9のチャンク別Reference Imageは `H3 Continuum Reference Images V3.9` で割り当て、Sampler V3.9へ1本接続
`pyproject.toml`の依存宣言はComfyUI >=0.32.0ですが、現行の実生成・GPU検証基準は0.34.2です。新しいV3.9テンプレートの実ブラウザー保存・再読込およびGPU受入は別Gateで、まだRelease/Registry公開を意味しません。
同一機能の旧フォルダーや旧Manager導入版を重複配置しないでください。V3.7以前のNode IDを使う保存workflowは、その対応Release/tagで開いてください。
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 ukr8b3g-cmyk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+482
View File
@@ -0,0 +1,482 @@
a42a85fb4dda2d4100c0f87d9836429e51aad187c8d07c8338360a3016a779dc .comfyignore
3d681ded5d4c50cc20c2382e29fdc98d8a48e76d552c41ad5a195d941e66e612 .gitattributes
48b133ed878e191376ee940625c4604233366e5342813956ad2901628689c5b3 .github/workflows/publish_registry.yml
a91be871ff06839fc93fd33a7fea9a974c1b7480e3ae40e2e8329e65e1473d11 .github/workflows/publish_release.yml
3e22b441fe96bb6d099f0fcb92265f7a986c444f6c45be263c7905898aea4ac7 .github/workflows/tests.yml
a28c4c592d56c57e0967f0adce5655313b942b8cc04f77766c0db1bec96c13e0 .gitignore
c7765c1229960ae75685a8a557ccfe8cf1b58d843f1fdec29d165ddc011e7217 CHANGELOG.md
6e889c42490ccb5f376694b5944c693a84e7febedf38e631d687e96bc1e76376 H3-Continuum-LLM-System-Prompt-v1.zip
144324850d4ba086938da5f4ed7b02ff0668dec554f092695328240e43fec3ec H3-Continuum-Skill-v1.zip
53f8300410cffd775b059f22e582e97af162d9f1b2d0ac69ad44e7a5a991ac4f INSTALL_JA.txt
c44abbd789091bbead01250dbd5453e60539d2665c69f162335fdbd2936019c2 LICENSE
5bd811b25eaa7e3906718630bedad1b171ee1d47b4957d55f61e0ad5c7115261 PACKAGE_INFO_JA.txt
c8b3ebfb8ac181e51ce62a16ec52a24ed97148eb1a784ea23fc4073d59a9e679 PACKAGE_VALIDATION.txt
3d65caf035b56a6acffb006f40cde72f0ef62b66c14795c2252c9c67cbf9c88f README.md
4d4bc762f339d64ebffe3cc4c79f520828b79d90d3a1933f96ed030d51aeacbb README_JA.md
c3383b37c32e0c4937d19de2433ffa40121d9fc79cc2c8a05e9796b8c52514b1 REGISTRY_MANIFEST.sha256
0dbe8a5f71c92f3523942343b40787104c8b96781461ba3ba82934a6bdbe5834 THIRD_PARTY_NOTICES.md
02ea0951ce2e7ac2d5f3bbf02c596a9f9ea8adcdf2a113dca4c8db3cc19c36b3 __init__.py
7fd122ff08232e114a6ef32171217ea6324e980eb7257d560c466b8177a3d3ec audio_compat.py
3e7a1ec3380be2a222c8a3e9b8a6bb184d3a760478957f48186438f15235bdba branch_provenance.py
c1ed3a0342730450958fb62fd21854a876991f3a4aefb24e5383b0c73cd2312d compatibility.py
4d62508f900af9f93ec320afb900c27cc9a300d1e0c0a94714258498c5ede5fc conditioning.py
294251c40b1be2e296c5e5f627b68091d087bdb39179e3a0c3cebd2ee8a344f5 constants.py
cf255b8a635471229aebadc926acfdcacb65963adbcb9e0f9505d04eada2c6b5 continuation.py
51f1d211dfc36602a006fe5d14f4ebb08182694ad464aa9176340ff7e2bd1e41 decode_cache/__init__.py
647f55a9253976c059502dec13c7f64d7f7df1ecbe619d543c973f92f7f36776 decode_cache/identity.py
c2b44e3caed54c894556af547cd800328ed287a8cc90e0b5031f34bd6bd2224b decode_cache/nodes.py
986cc7a3dc153ff1b41c427a86756e505ea6e17d8b065df1ab15b8ff904f090e decode_cache/service.py
630ba3d2183964444c4341a8df507f7af61dac6a8e5aaca8cf387a5376d49f27 decode_cache/store.py
f9375629fa1a2c4d3538442f0c3192d7ba2f46fe9544fb2e21f0c144b53d608c docs/AB_TEST_LOG_JA.md
c93a3e52e4deabe5ef0db7f34a7605856a543089574ba17227e697e9a2c0139a docs/ARCHITECTURE.md
1d60cf5d4ef9c45885d4f90289c3b17aa70a6a2752c6b288288322a5e0568050 docs/FAILURE_SEMANTICS_BASELINE.md
c6ea788a03c5f29f32fb6a4fd62db92f108e604493d818b9729e9d7fb967526e docs/FAILURE_SEMANTICS_DELTA_R5.md
7660570840229b6fcbe62f0fbb52966d0099d64d7e6f01a739fbf9899293c8e4 docs/FUTURE_ROADMAP.md
edf01a9c718ad1c3825c6036c4c3f76237c51c35dc12a1d83e435e722cbd7ef3 docs/ISSUE31_SAMPLING_SIGNATURES.md
b7ecd069d803cae7f86ad0ab89df144b5a5b157c168c73ee2962b47234d4ec0c docs/KJ_PREVIEW_OVERRIDE_V398.md
77c225d1e49e06d00b04acf811177c9a4317e792d4bfe92df539de99420c3563 docs/LOADER_PERSISTENCE_REPAIR.md
b30fe4640359bebfcdeeb94dbeec94cb346c8e3646509e1dcdb87d7021ba04ff docs/N2B_BRANCH_PROVENANCE_CONTRACT_V1.md
994b0b969089247921ca21306496cc1e8e6f729b587a8206b6403e0b7a11734c docs/R0_RUNTIME_CHARACTERIZATION.md
e6b8cc3250776868f473357cd97ce299fcea31ae18b879ec6e6466f47dbf704e docs/R6_NODE_FACADE_DELTA.md
bce0337cce903938b6b8df7f52c5c67e2d0ee14599c693687e4180debc606db2 docs/README_HISTORY.md
9ee92cdd3783e61e3bc71b99d5c0df7dd0a9f129c8a6b37701d7001a4f745e77 docs/README_HISTORY_JA.md
cebf8462681796df807987d8afef2c78abb0953b54b2f5dcd12d583bde0ec806 docs/REGENERATE_INTENT_V396.md
bbe74f802339b758d8874900e2617dd1a46844a58e0f872d95f34b9b40ba20ed docs/RELEASE_NOTES_V3910.md
353c82a1350985c8a549fbf4dc46fc5c678f7dd8344318d00fe860fa39acf6cc docs/RELEASE_NOTES_V3911.md
1e3156127e570f7eeda696cf1143f42a4b3144f3ab3a32c6e2deee2ed9e8e3be docs/RELEASE_NOTES_V395.md
6de7daf79d0cf8e8bf03d01d030bc0db43df454b644c7fb277c4caa53bf0dae4 docs/RELEASE_NOTES_V396.md
8b6f43df28d660e44e6d4bdecd161157091e8f30bd2305c686918d288c9a9f1e docs/RELEASE_NOTES_V397.md
2e1885630db223593acf95c4e6ba0d6db55cf5806601fab94fe3b146307aa89f docs/RELEASE_NOTES_V398.md
49d02b7650d4a542307c9d4189dc217ba1db54c4eac959cc2e2a1ce57b501ae3 docs/RELEASE_NOTES_V399.md
91ee4adf828415e84e2f413e3a4e20dc16356f139e8ef1f6756f584cad04f3c8 docs/REVIEW_RESTORATION_REPAIR.md
93f07aa727b34802bce3d333426b8ba2af522500882a6d222d00cf577ca82e49 docs/SEAM_TEST_SOURCE_JA.md
4546ffb0cbaf270c52d1900908e46bfa2d3c0e2d0035ae5694680890e89aedd8 docs/TEMPORARY_STORAGE_JA.md
4c33d223a77c78e5c74946aa43f537031fd5aa415388d46fed975f9b07d53c3e docs/TIMELINE_VIDEO_EXPERIMENTAL.md
00f88cb57be5e79d9c881671bd13fa154d91843f4c1ae2f2451ee2a73841271d docs/TURBO_SAMPLE.md
92bee3f3c0c340356abdd06b4993fbf2e98cbe57e931f85cbfd11da0f7f87809 docs/USER_GUIDE.md
c3f0753bdae1c54044a6e9ad5770c45e85a306ac9c15cd363790f8625c865f94 docs/USER_GUIDE_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
3496636f645b39336fd95a4f21a562810c56f8e1d92fa6eeb1e4b0786ad11b37 docs/V38_RELEASE_AND_MIGRATION.md
4d17d74107e78404b190fec9494b443249e5aff4f58670c50d54dfdfb064334b docs/V39_REFERENCE_INLINE.md
79bf8886f91eb3e8e7e8db8a8093eaa12fbb012b156e8d478de14f089f7c19f4 docs/VALIDATION_JA.md
3fec541a675c1e4e5e287cc8e498036001f34f7a62460321e16f9ba27b5e4c18 docs/VALIDATION_RESULTS.md
9a634b4ff6c9ca98285f6b250402a3d0e67d29f031e134d9bfcab54c119ed337 docs/images/comfyui-manager-h3-continuum.png
6c72d9a9e35648355c4dd4c8f060a6b7667e322f4b6c86690df9d6769ba182b7 docs/images/h3-continuum-advanced.png
b9f1dca35706a1cd963ba892d218568ea30173c6cf6a3bdc896f7a2266eb9407 docs/images/h3-continuum-detailed-report.png
de5f8fbce6bc423817acf7dc86bb0c8805a1fd962afdb2722cde7395f117eb56 docs/images/h3-continuum-image-scale.png
a384e26f3b088607c616be1a2b038365147d92da0961d8f47060fed09f795062 docs/images/h3-continuum-sampler.png
46c52e21c8f99a75c678e7abf20e381c8140860be2662bad528a6cbfc5f3295d docs/images/h3-continuum-v33-settings.png
321311da5d2c30953dc2061ca8fdd6e10b84511a15a9bc87704f000dd687cd0a docs/images/h3-continuum-v33-streamlined-ui.png
e93b6f4f8da5b2191f2d7715476eff1ab6c44fd96db689618a4bc0aa307c7b5d docs/images/v31b-auto-resume.png
c9573d4393236276d032c4503f8ed8bd19c6ef24e84eec6f64f8a4c47aabc718 docs/images/v34-driving-audio-connection.png
1b9bff0d32ab1928dd85d04700be563458484748a7bfafe4db293c4950ce6bc8 docs/images/v34-regenerate-from.png
65efc844c3f116e0a46bc35390bb46e3968df44fd44ea65a63629a3953371605 docs/images/v34-sampler-spectrum-assemble.png
ff8d901d05aa89f9b698c60b3d11534ef97982b3e22e9ede6255a85149a669c4 docs/images/v34-video-reference-separate-audio.png
06c333b3dda41526da70d56f4aa25922aafa2f48ec2d99350b0ed6b428e92bad docs/images/v34-video-reference-with-audio.png
301afedc3e0922a4bf3bcf445734b5adcdd5c35384132b24a38098c66750f499 docs/images/v34-workflow-overview.png
4e0d904d3bad89cb8c3ffe17fb645bfb6fbc87fe49fe3c75c91094b983726025 docs/images/v35-assemble-seam-node.png
a53796f7a904d675e80a2276c20d68502f03a3958529278e6ce9465baaf1c4af docs/images/v35-hires-fix-node.png
5a23f232a8b795226e8255e6e2e3248b0130f1c7ce276d50370d0333d6a62ef0 docs/images/v35-second-pass-node.png
04a34b1b55b627553d08b7b10de71295d55ea9e4ac9815b6dd8ce6d268098851 docs/images/v351-lbh-conditioning-bridge-flow.svg
b16d63242b45fe1abef0a4dddd4fc5b9306aa30c2f84bbc3ddf334a1c0832957 docs/images/v351-reference-audio-permanent.png
ed189c7f16ba1f6e48f557312066fdb5e1313b5ea7df853a99467fd0d7532ef5 docs/images/v351-video-guide-frames.png
0c1dfd5acff349b98ecdfb57ae50941f6da26a462dfd2aaa9b7c7b0a34abf304 docs/images/v352-stabilization-optimization.png
96395c3682fb0b6375dc23eacabea6ca9ee165078ff04e94458f178eef35c4ae docs/images/v36-masked-av-continuation.png
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
a4705ae4b5730d2b43e29fe125a64196a031f14bcfa8702663a17aa89f683d89 docs/images/v39/v38x2-feature-summary-historical.png
ae3338f720fc22c05ab4a661c68f9c5dcb20d751a835f0e60d4738333be48e63 docs/images/v39/v39-feature-summary.png
84304d318eea6db3921d366647c6fff9ad488e8c4cfef6ca00988bfd2a6504bc docs/images/v39/v39-reference-images-node.png
b765b37502b012b462606c4d2dcef43f13950e5fd682824fb18cdb19d542c121 docs/images/v39/v39-sampler-node.png
a8c56379abe23b98c8ceed6ea5e60a02ecc3c6d9636232d7371615f4eb306e81 driving_audio.py
6771c9905d35666121c4892d2ec26202505f96d244ce814ad9a87a02878952cd examples/H3_CONTINUUM_V1_WIRING.md
c3cefcdf50df9d6609f583a008453b587c011a0fb41e290d5f1196ce62f58877 examples/H3_CONTINUUM_V2_WIRING_JA.md
be419d6c773784823af7b58a3423ef2e21d3cc3e23c40e60e274560895ca034b examples/H3_Continuum_V2_README.txt
4b94f779a98bfc555f6999113a694da07746cc3cf400bfc70ebc580592034d52 examples/H3_Continuum_V2_reference.webp
1b2212b7511fac0b63dfa6e9f006cd8644c72d08c6945ab0e4ed0e722c97a730 examples/MiniMax_H3_Continuum_V38X2.json
40199d2500174ba51c040d6983f88d74c4bfbaf19191e728818e6b969b869b0f examples/MiniMax_H3_Continuum_V39.json
705d1141842863b82abe26a8bb015d45eff3bc81ca5bdc53e58b464b743173c0 examples/MiniMax_H3_Continuum_V39_Turbo_Sample.json
68e1a724d3b99458b86b8f643dcb916183e7e8dd12d7b4b3850991feb8077694 examples/settings/recommended_settings_v1.json
5a26408c770381cdb259cb710de7dab12d7ddecca262bdbf35ba1566056050f5 examples/settings/recommended_settings_v2.json
b8275c8cecde12aee0418cea456d1e7f4b875cbb1bce32f1f3d9e06a44dd0be1 examples/v2_prompt_list_example.txt
0e59ea821081cb93165aa3f88c6949736dd225837fe1cdcf1173aa5cd54c6d29 examples/v2_prompt_timeline_example.txt
1b2212b7511fac0b63dfa6e9f006cd8644c72d08c6945ab0e4ed0e722c97a730 examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json
4fa8680037595f55f97715f9a2f63d28f11328a87f5c33c316cc4b0ae817e668 examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip
1b2212b7511fac0b63dfa6e9f006cd8644c72d08c6945ab0e4ed0e722c97a730 examples/workflows/MiniMax_H3_Continuum_V38X2.json
f3d8dd0f0872afdd97fe24e58b5cb74190d03e3583a66a5d013fee41f6894cda examples/workflows/MiniMax_H3_Continuum_V38X2.zip
171f0b5596724926d1d89fd12a46434f6010f12e651d19865b9b6160a1e9fff6 examples/workflows/MiniMax_H3_Continuum_V38X2_Timeline_Experimental_Follow.json
e61e45f218609a7ec845d2e8762dfd1efed6c51a398061066d1e51fc93556663 examples/workflows/MiniMax_H3_Continuum_V38X2_Timeline_Experimental_Follow.zip
7d6754cfc75599e07046b1949c1723a56f57871ecd5abc9543fcf8b34bca8c04 examples/workflows/MiniMax_H3_Continuum_V38X2_Timeline_Experimental_Repeat.json
9b60c8495e3d0e32c2bcd609080342ae19d0fd4c7c0662d5fe32e7fad4a9b41c examples/workflows/MiniMax_H3_Continuum_V38X2_Timeline_Experimental_Repeat.zip
26bbca92b5f7cac4cbde89290b3f801b7a895df76a07493ca6f65c18d5b1154a examples/workflows/MiniMax_H3_Continuum_V38x.json
df4e0e355020d2e731932cff86a4b00932b4f193ec7ed513be0db994ec0e71bb examples/workflows/MiniMax_H3_Continuum_V38x.zip
40199d2500174ba51c040d6983f88d74c4bfbaf19191e728818e6b969b869b0f examples/workflows/MiniMax_H3_Continuum_V39.json
f69b734b5bf19fb6db78bbe4737db0bef69c2a6cef2710f28767882ef35ec847 examples/workflows/MiniMax_H3_Continuum_V39.zip
67e81fbdd4c21a8d64fb3bedb5e495698fc8df5cdd9540c8ef5476caa76119c0 examples/workflows/MiniMax_H3_Continuum_V39_Reference_Inline.json
65689fd800a60ab6939bea020d630616b03a453cf6d48022cd1361992a765abc examples/workflows/MiniMax_H3_Continuum_V39_Reference_Inline.zip
705d1141842863b82abe26a8bb015d45eff3bc81ca5bdc53e58b464b743173c0 examples/workflows/MiniMax_H3_Continuum_V39_Turbo_Sample.json
2096e583c6805c0f6f54f76a81e0ed1246325a16d189afba0423fa05e2c19599 examples/workflows/MiniMax_H3_Continuum_V39_Turbo_Sample.zip
a344da581b3c2d77558a460d2b5256e6c9a63b5008c98b52999ceda2e0b2b767 graph_contract.py
bf0556b076dbaca67c3405a7d86c333ca7fdf3d4381529b0a9edc906519943e9 guide_timeline.py
1473c384082700f422f2cf9141e0d012d87d2b43ac8a8a433edc7172e6ca7bf6 hardening.py
23bddc5a41d2e997f4fbf789c7128e32f4f197f1405b2aef1c76794f57482446 install_windows.bat
12bf572a65d57bbc9a72b459f29691c2057768f4fb7a74f9db87f4775e995bda install_windows.ps1
139546ec1ff459945aa89b50f74b5ee69f62a0e07bbddfcae06936091a409a83 layout_adapter.py
d3e213005670e94dee33a240349a4d245cf9a3b6602099f11ed30cf5a32e2c21 media.py
1e6514845702225b36d6f993c4e37924d629449365cf67370829df3c7ffd5db6 metadata.ini
fd23c7f32810788aaaf1709c4959c40ec72303aecc6f6afa5fa68d824cca97a8 minimax-h3-continuum-dance-director.zip
d7e613e2cc24110213b477bdd1d390234a41f2af3b1ed006a809066d71d658eb model_patch.py
ecb65a5dbf9e1683c5a3cadd82daaea3a90a2b776f6ebabfbe8b07aa93177422 nodes.py
6ba95639b52219fc37b4f51d52cf6879f75c7418a8d8815b3725b3f201a4f1e6 preview_override_provider_public_v1.json
d4cf474cbd1a98867075c45b53b2ab4d47752bb11611c916bac2a6831ca82c0b preview_override_provider_v1.json
3b7e18bd2ba50fd6c8fe71c58ca79a0bf752f362ed78b7357ce1998efc934b4b preview_override_signature.py
b470819f16fc179654dc1600721a63f0a5a14e777f4c004d574b499da6886ba5 public_api.py
4dcda05d4e3a57e7d0941876329425bf49bed01d0be08d5de05e17973bb6cc31 pyproject.toml
94fdc2d545b2d4077a4d70229fd22ba3ccac21d49d1097d2873f76d04e9a3c7a pytest.ini
caa572ea65dafc86850db99f52433d360ac9c4ab36b854292a3dccd5ba32dc76 reference.py
9539f5cb9fb695841073fa58d9246d5a7410bc372f6cd340378185004dfaf978 reference_audio.py
5cb9bfd6810d3a93a637451980a4cc5c1436e5b84cfd1c7a111cd192e876351b reference_video.py
467edb2c188d024c2392aafe7423b3f835e16b10f570da76e2f7dda8a962c1c5 requirements.txt
985e7647bd2626af5df68ca702cf6ebb38cc09f3ffe0e239d3e8ef256352a5d8 run_storage.py
1227d406008ee1463d3b8f0ac50adad1b3de2062186affef751b5627d978c866 spectrum_code_audit_v1_py312.json
631807b6d9e009e60736985a4f943c4214502be3e80275410da481cab02a4ad0 spectrum_code_audit_v1_py313.json
8f786989af6339be8cec8f2bf602da89344cf96202d29c980af5c07175eea3d3 spectrum_provider_v029.json
8cdf37b165eb68462dd7accf4a1fd63043f02479f9c377778fb9d4b6feaddcc6 spectrum_provider_v029_py312.json
0efc8d65cb6f59042457ad843fe1b77a4bee45e59d3732f5c83fbc75a31ae77b spectrum_provider_v1.json
71801234f6d2e08b660803194653821ca648e5b9a0d0c3f138bc7ccc6fe9d8c6 spectrum_provider_v1_py312.json
81608cb2dff48e68b960dca2b58ce0bceb270197d9f1f44f906e3e8286bbc7eb spectrum_signature.py
3a359a0467725cc292ccb4c86cf0c3d30bb6a114d01f5345792b09ea3d45441d state.py
6056de6c0a5322a8a51ba5a114538dca2ef67788cd1afba10fedd483b95f6afa state_io.py
660a9df28c7d62ad383cda5514c48c7efcb3576f435af023040116d533a56563 storage_api.py
517662b104ab1507bb927a39f25b8503f092c2ba4c39bc277379ba9d9e31b334 storage_fs.py
daeda14d9f5338835661e6738e074a3897d936cd847fe3e78519efabbcdfd0ef storage_memory.py
53da3ac42f4a66e8adc4560049c7c8e7ada82599be8c61f0573c234342ca36ed storage_settings.py
43ec4023dc06c941e5d7a04db4b8a89fb58d744ceb986f6eb9bf534d4fdcb87b temporal.py
b2435d87944c3ba8669c81d729e670f1ae78a210114ed864d2acca860529787a 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
38c2dbf1481d6db0afe8554a4b7c9a27c774ce8fbffcc1fcd001d35709695159 tests/fixtures/issue31_local_spectrum_signature.py.txt
cd9f3f070ab8d4486aecb28c9cf51691b02d4dad4ebf0ecb872469b180eccfa7 tests/fixtures/issue31_phase1_model_options.py.txt
db08ce77cc5c5835f2403d4d589394090fa5d25ff3b1840312b2808e1bc203b7 tests/fixtures/v38_a3c_selective_refine_saved_workflow.json
82efab13baacb9a229671eda5f4a2d24bb839b160b2bfb40591df51a5ddf80a4 tests/fixtures/v39_sampling_v5/project.json
8b8ca1b0c802d024c6915d903747d8722bea25628369997ab008ff896462b96a tests/fixtures/v39_sampling_v5/revisions/d8352287737286e5/chunks/rev-d8352287737286e5-txn-008f52b93a88461481ead25f91627af0-chunk-0002.safetensors
26e771cffc57f171f4cc4c6859876350bdf717d1e8213fc005343006a34f002f tests/fixtures/v39_sampling_v5/revisions/d8352287737286e5/chunks/rev-d8352287737286e5-txn-9bb0a584b7344342b114bd31b175225c-chunk-0001.safetensors
7bf0cf46f049e072a68e71cf8bbab10aef695f0931b16842a890c084021f5a11 tests/fixtures/v39_sampling_v5/revisions/d8352287737286e5/manifest.json
606b3985f2b644fac40c84de3e08d1453e87a988acca51ce9595516a7c60a577 tests/frontend_decode_cache_helper.mjs
868c613654467c2c739e07de5dd9b4679b36f98cd96d631d91e1d4afe5698cf5 tests/frontend_external_int_size.cjs
8d0ccf5711e1be0bf63b4e02fecb0b37cd88979894d27b89337cda4a6d1c4ec5 tests/frontend_issue30_ui.cjs
d84bc6c8f119de1c06257d1c85f135fbea74dfa075b3b9ac8d86daefcf332490 tests/frontend_reference_images_v39.cjs
c4563a9002cc17310226a27790e0ec8c1770b6525b899f398d44fe93e2b56fc6 tests/frontend_review_queue.cjs
ea47f51abe07e9b2af840272939c0f363369636af30f4c6dffb0bb696b752c8a tests/frontend_storage_settings.mjs
36f74c03a40c4b62b90eede070d976bcd1b7f0ea828983d1e61a6cb6d80a0ea8 tests/helpers/r5_process_crash_worker.py
706029af8c8d979b2b700f5bc2b96a3064fe7c728f487698d9f079abb02e9409 tests/terminal_merge_diagnostics.py
02e6286857353b76080b73928c0d1e7ec48b1ed16339231a4a450743f193315b tests/test_audit_boundary_repairs.py
041289556cc621ea1857cbb8931ae41d817f69e084b2e8a7622e184a3197b61b tests/test_compatibility.py
875ac33b5458ec5e8d845850ed495707c394436aaadb668a44f36f6a1b73764d tests/test_conditioning_modes.py
2be669b6d21ec40a8b0e172b8ab431f82681f3c97c7de0935d87ad43b0ae8b4e tests/test_context_diagnostics.py
0b06a5af3420a7157eebcca369521c8146ad546e54f85719b49562555f8f17fb tests/test_easy_load_audio.py
7a46da28616cc9fc355ae9b6a9753dadb3201932d759c086df7513ea790f3f6d tests/test_easy_load_image.py
bfcfd77e70711830d087878d78021b754cd7e1ea324d50af0caa72f041b298fc tests/test_easy_load_video.py
72c7a2ce36d8589f1de386805dba9ef1c12a3f99f9cf818e4752d5d26b39d428 tests/test_external_int_size.py
326a97499ffe51935dd3259dbab4ed71fb02955cd3ddb5a52b5c6558a7efc872 tests/test_gpu_diagnostic_runner.py
aaed0385281e1782edc96f1d084fa84bc4e7ec9e0055ec35aaf9a9f8b6e5bfce tests/test_issue13_r25_tools.py
ff2e865fb49f0c9f73f3f82eff78ff15373ce8e843514d610b73231dd6217a93 tests/test_issue13_r28_tools.py
4926706cb171e4e36e8d7ed46b592b0ed6c9c2e100072feeba497b651e52653b tests/test_issue13_r2_tools.py
d6b5b969a0c02f1b282da990db3e503e0768747cfac8a4edd32cf8677550e024 tests/test_issue30_frontend.py
6b75fc849ded1b155547b7c371f99f8928bfb180044aa0e98f46e64b1d14d805 tests/test_issue31_attention_signature.py
25683f1e109604807520b85d778947e435aefe68805ce5a1d67c30a3e51dabd8 tests/test_issue31_preview_override_signature.py
0e54b7656568ad01d06251e36b793ce912210b94c7e02f183584461f58a48de1 tests/test_issue31_spectrum_signature.py
c058f189d8e58fd48a80c20c0a857969737a8b13960eee60e5c17db2b9288bc1 tests/test_layout_adapter.py
a9da2d25e9fc9b87b249274d7bf2ab061d14f5d1e9c482b69d795ba511cdace1 tests/test_loader_store_roundtrip.py
ab1ea95e363ad0effb9459bcbe713838f12e3501515871203672ea91e7fd4c32 tests/test_m3_conditioning_display.py
a5aa420008daaa84ffb998715f52fc8c13911a6dadc43c61a860ecc455dfaee6 tests/test_model_patch.py
45e8839cd82fd955df344b3bc6efa20092b8870ea378b0c898b073665d3e47d7 tests/test_nodes_logic.py
b635d404ca67df69894c4fcf80d8782cc5699e946bfb55ae4c44fff9d930b018 tests/test_p20_file_backed_tensor_poc.py
0f18b8810b2899f87ce6d6bfeee46fcd90ba787fa09665bddd8fc128f1952c65 tests/test_p21_memory_attribution.py
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
2d16f6de7bcaf1f92718d3719654a746438f6218bba8d25b3632c318a1ab9c98 tests/test_packed_layout_preflight.py
cd53a068ce0df4aa4c242d5ada4609beac0d90d0b9633ada766607ea684c08fc tests/test_preview_reuse_diagnostics.py
3b9f938de680bc8abd61d1373472589df96112c50f2d46eb0f47e26c46c9f49f tests/test_preview_reuse_frontend.py
1ae0369943ba2fb13f21ad0cf56ee58621ba09bf20174379595e157a1775c7fd tests/test_public_api.py
892d3e3e022a527652dd995508c8bbb650c370caf9ee66fa3eb1f7fd288bba38 tests/test_public_workflow_integrity.py
533d52450f8ba25a9b0990e5720dd5a2098a78b2fefcfd7b7467a880bf255288 tests/test_release_metadata.py
5f6caf1814052798f20571ebb863c098bec23d8f2e091fc1f30ce1ef9c58675a tests/test_review_identity_lifecycle.py
5f7d3e01bc78fa076ecb17f8532b6d3f3137545da4028032ad6769407d80be07 tests/test_review_provenance_reroll.py
d5e255a5fdd06ea18e70f4077f855ed2f02664f91caf79b66bfbdf7df44ad07b tests/test_review_rehydration.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
ad94e0cb30b0a8c4e9422ce638b0ca088a93e0d4bf9d01e0cdcc9436c650b2db tests/test_spectrum_code_audit.py
dc2f919e8540ad20272cc0bb45072e301a6d7b59e1aca22a5df9d6cf6f5cd720 tests/test_spectrum_portability.py
5af6a16a2337e3483bb0f9197fe04756decd309e4737520c5557b527d68d51bb tests/test_state.py
d4c53d2c260b635d70fa211029d608f63776e0a56c20253475fa47c58363f8a7 tests/test_state_io.py
1bbc7e5755f71d6fdfddcc6dc8337444febee87cb86773835ca6ac6c79d89357 tests/test_storage_api.py
82f049d7e51c8d6c43322ac4e0043d3fee6323c7989a2c446b86a936bd5ce790 tests/test_storage_frontend.py
a1f60f01e9d86c1f2a010752612e373e85112c7054ffc31185b9b459eb2b34a5 tests/test_temporal.py
8a512b3afdf394af043a4d6bd7c4fca0c9326e1207930bf5d96b4d0bd7205b4e tests/test_temporary_storage.py
7f518caa4d95fefd9794b7dafdb8b747963c98dad8473be73a00dff65f3c8ea4 tests/test_terminal_merge_diagnostics.py
f175e9ebf39d6fcaac578b640422676d7f7a54bfdf0f77ec44a3da6aafefd7cd tests/test_timeline_video.py
c53fd2a3e413dfe67353bfe1e6525fc010211c054509729ff1bb0346a1fca5ff tests/test_v217_stable_facade.py
dc8b9cf0e77b4983ee4eecc60f4acde7d0e063f3b7569402feca8a56165107fd tests/test_v2_decoder.py
3cc94a6a7957ef285f58d373fbab001d926d2b43a754d60bb00bfce98675f32d tests/test_v2_prompts.py
424a4b34fb391ff3729b38a9b202e36f5bc8b9689a2a9bbf9589254c6261d9c6 tests/test_v2_registration.py
86314c190d4335586c18191dc095926909c67fe839eb29e65324acd16c44f24e tests/test_v2_seam.py
74e623120a963cb96b68651b44f47a836ea8449d30ce89d749c71ffad4766d4e tests/test_v2_seeds_motion.py
b42bcc0983147462d96c6b71cc4a38e846995dafa6eebefc3ae0d9bb36caf359 tests/test_v2_sequence_orchestration.py
0b5b20a8318862d167f135720e0489b8d4f93406d67c6646e052e35b03dcb876 tests/test_v2_session.py
b5c320279fd38d2038e39951a3d016aa9b80741523d2816e01ceda1bdecb71b8 tests/test_v2_terminal_merge.py
e22486ac62c53132c275614e4e161c78e6dce09dd0d1a7cf64f641a3b7052b99 tests/test_v2_widget_migration.py
1c84723b0c14f3169760fe1ae95d230416f6e947ada7d97ee890a2da33e9c988 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
3e9a79079823bd85b0e8848c8421a71ae7aa6ad2e5d47c05c7a5cc12ef9b2101 tests/test_v351_reference_audio.py
1c317c3443435e71bc3d874d1f1ef80aca6c50263ad5e9e393923ccadd3758f7 tests/test_v351_reference_audio_ui.py
3caacf5234d96b42d708c9a742d1a7f3b4318e208358058156f97cb21b5506ed tests/test_v35_compact_ui_frontend.py
75dbdd0d9694d82fab7da23f5cc03bc118c024abc865f6c282799aa8c57427fc tests/test_v35_conditioning_bridge.py
f9e191b2262030f988b6230e2a1f32484df03568fa43ac46d2c34adb61b6dffa tests/test_v35_context_sampler.py
7380c2ea1eeb4fb212ef51ffdf6d14a33132d3ae6d4c7ed5015f28bba6b7e75b tests/test_v35_hires_fix.py
09a6f88fe4f63b12b11d28a82df1ef8eaf01c756f7bb633a516061b93ae4f73b tests/test_v35_latent_resize.py
59a07f2172014dfdc0a447775324d7cd049f20b823276dfaf9b7b3f79628f5a8 tests/test_v35_pixel_vae_resize.py
05ba609fb948665f050d58fb087569a158c040d08bebad1d728b911673b95462 tests/test_v35_refine_context.py
8ae5173eaec35adf9efcde2c464c95651c848248bdbdd6396ed2e3c3c1ac7965 tests/test_v35_refine_sampling.py
98a9006ebc4cab2b61b38904e0043fab24e088a25b28ffd38012c29991b8550c tests/test_v35_second_pass_contract.py
a11956a22f373d96f13b395971f39187d6bb12cdc153ce794b4729d258ce9725 tests/test_v35_second_pass_sampling.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
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
8fb637f1d61389a86ef545adf35a518a5ae44322655a38fe598fd3b3c8e0a4a9 tests/test_v38_multi_reference_audio.py
623d528a02b6712cba28c374ba3ad979bc84e2ac5318640692589a04ba6ab15f tests/test_v38_open_integration_contract.py
12337a491fa67b38b32aaeb16e0b209393960dbc46db2a8bf968b8c3902855ef tests/test_v38_packed_row_planner.py
188ec8e125b16d0bec30b63324d23501a3b89578b434f8e7b24a9d8cc43f1640 tests/test_v38_public_surface_cleanup.py
7aebd3668e04233f34c2d94e75d4708cadd64d6882cf77ec59afa0a394dcb006 tests/test_v38_public_workflow.py
14ff6561a127287d0a20887790a978612ef9d291f1d3be7d5e85b37b2c74760e tests/test_v38_ref_encode_cache.py
8b376f45261d045b584f02b4d14cd70c2d6269b9c814d4e62b5c612f6e30e36f tests/test_v38_refine_target.py
03eb5bf6d845b22334fcc800d81b419f1c8d8593fa65a1e0460144456ff2c8ba tests/test_v38_reliability.py
aa72293fe5ba6f4499e1ec95aace3b2e94813fa35cf987a767e77bbf2ae525b1 tests/test_v38_resolution_preset.py
975af1d6dd34e3403b80d3e89d8fc658baa67a34086d40cd05ac10fd92611c51 tests/test_v38_review_cache.py
72a0e3cb334049b66dd36f52c826931067c242fa63557933fd667138b38d6e8d tests/test_v38_review_control.py
f62daa235117a3041c66ebb17adedb13c0452c3a2fc0acdd51006d7aa0078a9b tests/test_v38_review_execution_cap.py
3a5e298bc9b0d46e9560e397576352117d6353dd03977ad54fe41e4881c58287 tests/test_v38_review_run_storage.py
259142da88241424afb61228b24306c88c1f99f0924e81595824ba09527e1847 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
68426689006a4bcdf3ae5b01589abf95c7fd3bf7f541904240412b24c0783fb0 tests/test_v38x2_decode_cache_integration.py
20aff5243985a16550d1084ce20bb35cbb91150290a3514773defc1572a6c3f1 tests/test_v39_official_workflow.py
d33a6b53e3d074d5c8a076395b050fa2b6f00e25f222c32bd78e89d3e0d2635e tests/test_v39_r0_fixed_prompt_cache.py
319258798ca198312cf684f369990924657d1af168a148ad34303af31c06a350 tests/test_v39_review_refine_scope.py
68e5ee459f87724712d450d063bb4409cb26dd112b3b62602f1b43c88a3c08fb tests/test_v39_rr_r1_fixed_identity.py
4a97449504c720b0b4846293beb857b48986b3d175215509c144ee1b52c34f23 tests/test_v39_rr_r2_reference_routing.py
32e25a0f4815f954ba3e64e2445309babc83b78a964e2a6a5287b1c7accb275e tests/test_v39_rr_r3_effective_plan.py
6ec7852560f4e0588fc0b5d34743195554475167b46606d3166fdb5fb97f9c4e tests/test_v39_rr_r4_reference_runtime.py
ddeb44c42fb3543945d908a66b0557260ce719c002afd5bae0d37794219a8841 tests/test_v39_rr_r4_sequence_integration.py
307993ea60e2265a77ddf709350f51a134fceff6e2b26dcffd893af62162262e tests/test_v39_rr_r5_reference_storage_contract.py
efe2cc9452f25dfc92f0cbe062d034c74d6121e9671a2ef0a9bb7852aa6a2652 tests/test_v39_rr_r6_public.py
49e525a86e23b26afd1008193aac510812cd2ba330d6b5b52023ab93d662ae27 tests/test_v39_stability_r1.py
b27004f82a3c551926e7e8f5bfa140af1eb2a1cf39ee5660f1d5b2495cf474ed tests/test_v39_stability_r2.py
d2e59eae0a724626b0a4e361921643dd31cb3612ae1f0d1b8b355c9d42c06174 tests/test_v39_stability_r3.py
072091309b35ff5c204c49ed478d9cdcc39d316df15a6209f687b33d13bbf790 tests/test_v39_stability_r4_r5.py
6e3f8a8a0480cc0a87a0ba7d5f79fdc1407233b155d90ff4e4b75aa57988ad49 tests/test_v39_turbo_sample.py
473abac48a57aa5f297c6e141a94de17ddcb9424a8744bae1c46e6a6a734a0ab tests/test_v3_hardening.py
9242f74663ccb04020ad2fb1199990c84433c9b4c5cf0560e93416c7b15e1913 tests/test_v3_physical_decode_groups.py
35b26c8cade7acb2eec35375d7dfa9a4a112f67a5cec6a842d61c69039de0d84 tests/test_v3_video_seam.py
0e02f7db41458fab91e6c3395bdb864d1c033923a3874ff4082d5f85b8230d98 tests/test_video_adapter.py
b07b941082a947d9e938ff399ec8b77fcd29c1a222e0e6b0dedf5d8e7482ce84 tests/test_video_reference_modes_experimental.py
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
59a639d35754c62cb042e6eca4d72521309f05f26ef474bd4c46549c8c1318ac tools/build_spectrum_code_audit.py
2876dc0f2760d6bffb0138ab4d6ef84da6f2db2d726cc442d7a6f732b7bc2061 tools/g4_sampling_diagnostic_node/__init__.py
9062a3b9e2d03551c8e230a34779ccd74b7e9e38aa18d19939900f0072919f82 tools/g4_sampling_diagnostic_node/node.py
0184162bf563e15b2681096732064e265c83696294e248c8a6981beb8255b568 tools/gpu_diagnostic_node/README.md
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
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
c315aacb3fbe6dc8a38c50cfb336760ee2fd3c293d80617360c3f3b639ae2053 tools/issue13_r25_gate_runner.py
f03916a76a1c1489fd7a23d234a04d0f26fa8afb49a409e0fea779b9fac71a11 tools/issue13_r28_analyze.py
ab4b007df62fc09a6d346dcb8c5171c8ea8b6e56e487720ef9fb91ddf19014d3 tools/issue13_r28_gate_runner.py
653d7204e48edef6caec14b57a539b54fe6fd32cb5659c0d7c43726b711a4487 tools/issue13_r2_analyze.py
55caa8df2cd57289bf39c0b9a9a43440e7c3aa2e5bb89176cb5238c15884bd8d tools/issue13_r2_gate_runner.py
2743597d289d9eb12334d1f5cdd630497e237814ddf48b17f6f68da299c01150 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
a18136a4decfeef344635bbe9bb18502231c2503b034ce1d21cc2e5e77cc5e2f tools/validate.ps1
aab887698f4767722c833b9e55d605f9597ab0d823e32e8c5416f26a210cab1d 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
fed4bc3cbff47bd0b16b6e99385680dc2253c745f30b7f686afafbb25f77efb1 v2/motion.py
de47a847ba27390df542086735a926d2812d77ad05b21ccc2e67633d4ffd11b0 v2/nodes.py
dc2b901789e4b024dbcbc4024c63eb8cbc564d77003ce8c35c0584851ba6dfbd v2/prompts.py
4080f1875b958b316e8e76852c4be5527a6de5c71d604e7642d3098478eb4a36 v2/sampling.py
2fd811794c4cc0f2ce050250b80484876454926b9f20fce6af3a97d728e5acdf v2/seam_guard.py
be0d8585fa57e0ccd6d02577bbc7299629e5bfe20e186747f571fccc98b67d7e v2/seam_types.py
12cfcc0c71ca087fe39a5ce2922959a62b2bb311bfe664f05c4480affce03708 v2/seeds.py
0de733c55bb61e69d48918eb5bc91318fc7cf3af383fb8937522ced9df018c47 v2/sequence.py
3ea23dbce6fcd217b6e81235855479b9b16fed7a21693cf156f9014555c4fe13 v2/session.py
13213e7709fd02bb810af3c18e4cd7d010f8cdfb121a4b99866a9f2333331089 v2/session_io.py
78c830cdf49034c6e3b2cd3da5914d5cfc5638eb63ec6dbd1bab13c50d6d4caf v3/__init__.py
ea2922567df90436dd6fa21696833a49dd0cbfeee142a5fedc3a7c303824d473 v3/adaptive_continuity.py
7815230e0a9540bc2edeaf818e940b7a1fdd817fd217ba8a4f9cb21aaf6a308e v3/assembly.py
70bec17d0dce1873b9bb4a51b09daf76833722ce89f005a22b029533a367e62b v3/assembly_v35.py
3f62fdb35e804f42d7cbf0828b4e87e69a2b99246c3f7467fe4fa698f1d803c9 v3/conditioning_bridge_nodes.py
6403c2bde3fc0b8cddef78567f663fddb48130628f4c9258fcd679c28fd0cf13 v3/driving_nodes.py
147a1d3fc5e09b323a4c3d13d30e432410389bae52b58330462375b9f307b791 v3/easy_audio_nodes.py
64b3e54b42e5156642f9957ccc374fd190d9fc7145637984e702534fb1bf80b4 v3/easy_image_nodes.py
ac859cb1a6e23b8ceae300d818c24fe1346b649a0d663017a9b3ac64aa96fca3 v3/easy_nodes.py
11e9daa45237392ac84ac1b54b3e8d5e980e77102779831824794a2a6675500b v3/easy_video_nodes.py
fe03ae0aa0dbbbe5f950bb7da34c18a078d841547992c374ea8beda5e3ad4715 v3/execution_planner.py
69bf49d0601edbe51730b9d409b1cde647feabde0bde561e416b0b472a27f4e6 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
4a48f74584d8ba3187e1accc31ae5acd3a2ffb9a491bb4f5ca43322db418e770 v3/node_facade.py
f2779a7453a84dec8b993cf044e69ec90da6fe86940a73181234b5000f5a8fa4 v3/nodes.py
a3411c7a295308d21623551cf4aeca5bef511eb5f063f31ac84032e3bdf4e16d v3/packed_row_planner.py
b7c4a35a5e73f528492bc6946b97b687c412f1d3f5f976c19d45c6dc20288c9a v3/pixel_vae_resize.py
7e8681bc1ca1633389e1af1ab14100338d23a047f96c59c19151acbbfae5c108 v3/plan.py
0e3dd69d6d2bec6d9491c2fb806c25f0c62629b1eb5f9e4f77ae8d27a5b19cfc v3/planning_types.py
ec71e3965f445756d54d005c0e27bea520e26dbac44e1ee3d3867bfe2da100b0 v3/ref_encode_cache.py
8b9c1cadf76e2c2425d6bf8a5783ced593a75f83a6b3f219a0f870b4c177e058 v3/reference_effective_plan.py
b64f4d3d9547ac00f8edb2155109476df5b8baea730fb94e8b5bfca6d11564e6 v3/reference_images_v39.py
4cc53a322960373949cc4e86a3102c04d3dce4dfac00f7cc62b01cf637775b62 v3/reference_plan_inspector.py
196d1b6f4a73c4fb8669e9c399ffae526bd74765f96fbf5340c780f4331e5594 v3/reference_routing.py
1366da221237853eddc9e4b724d4c28917868ea32607dd086361a84df052cfde v3/reference_runtime.py
4fb950bbdc7cdb55365fde373ee190af6cdf99f7ce4c54ef73b94f0aca4e1fda v3/reference_storage_contract.py
057921bf2b05e88c2cbc08c16e2ac483aea905b8a144fbadf4a21d6ae8252427 v3/reference_video.py
8d6cd0d7f507fd6c2d33667a6ea205e131d47571444abc94d529a98748a52517 v3/refine_context.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
ae909b43ad17934c85881d3b0bea81e7b45c215eeb4d1f9f6a9ea72faf633ddf v3/reliability_v38.py
520a4ae849f83450855ce0023c582db5f91d29d8694a99aa8cf491351c837cff v3/resolution.py
3f03d8659305d2def41939205d21cdc6f35e32943274e87afe539d15b9635f9b v3/review_control.py
be6610fb9427546d9485a17015cfbdc8786715e6a0967f3e4c1dee35d8768385 v3/runtime_coordinator.py
d0a004aa3030c8adaa5ea788f9acc758fcb4a556f203f9a3f63fa4e4b5772063 v3/sampling_engine.py
97fcb293e0714c3a74b89f08e11c21dce45d25a3010948be1af9dc059d288187 v3/second_pass.py
452022107cea233aa84d5366ec4943ac5aadbd5fcf786113f1d542a641eac8f7 v3/second_pass_nodes.py
6e71e944313339f14e14e11cec682593159ca5542aa5d38095371da781d60224 v3/targeted_refine_sampling.py
5a044bdd70c546e4446e0c26af92aae88049ffa2e0e2d01b52033a83a3152d0e v3/targeted_second_pass.py
26b13614ba0a5fd8b192a106c9503b2f4b6fe7f9268a0fcb0f544979a49cab34 v3/video_adapter_nodes.py
2f07ace1462644f0bee553827b3571535de4d0c2d9ef847bd9e0ca73a4eed5cb v3/video_seam.py
4178dcfa442abdb06ce276e05bd7bcbaa6da28469ba5e57d3da3c663de4e4a9d v3/video_seam_v35.py
755a4d8b3ce66e94efea1a23e45ff6702042931c417c337ed35273c7e19e7c12 version.py
b935ad3bb729948bb3890ce967b0ecbef737a5e51ddfc47a0060fc20aa78dcda video_reference_modes.py
685df8e0fa23e3663ab31da1e4470cd19bdaa0dc16362cb606e874d9d6153c2c web/decode_cache_helper.js
fefafd4550511d80bd85ade46a0476f0cf3de13ddb94a908dff6b175f2a0e199 web/easy_bypass_toggle.js
092088096307d33ac016b82b4774ca38845a2ff2f63b97ac6da8c5aca4fea413 web/easy_load_audio.js
9db0aa94f634578a962d5db49e5c70356040a59df968e3a2e531b327a623081f web/easy_load_image.js
35090816ba7470a7255eb85d003b7e79f8a0065982dacf98a18f41c8ebff655d web/easy_load_video.js
0c68d13a1f8beb7431a32b471f8b0612c42fcc4bf72dd97611a025d158008662 web/easy_v38.js
933b5c675294a20ccec263916a1f4453d5b06a530d660ad8e56389d02d7f3023 web/project_id.js
ae59273f163a116ece418957c557c4fd8c3285e3c60814679b9361d2e6e6fa02 web/reference_audio_ui.js
46c9f75c9462bf26300332448f4431cca801f38964ca0a49bc2c50a88a7cc40f web/reference_image_ui.js
e99c74b78da1aa18be61cb053fa05e5abd106caa5eb5c814cf585786aae1e7f8 web/reference_images_v39.js
42afab2241d39c1b07ff33d8b1370d4b0f729d81e53b4c99f4bc54c6a96b8800 web/storage_settings.js
bf41bf08dd0504eb753fa5781e6c2b8c1285758ad4bb7309975bb9231d5f8e41 web/video_reference_mode_ui.js
2bcf455b4ece8b1861e327f6f9f8a79170e7c77470155aacada52e18438543dd write-h3-v39-reference-prompts.zip
3dfd0e7042070f62b9e78239c0e75d82a7df32098db10832465f3049b7f0b38f write-h3-v39-reference-prompts/SKILL.md
a9f7b67bd65a9beda622aa5fdc5f8a2ecae1b58b18690d91fb0107a16a3e384e write-h3-v39-reference-prompts/references/simple-3x5.txt
81d7b4f4da797339b46911bc96d0a3736d70df29e092715c6684bb1786908593 write-h3-v39-reference-prompts/references/structured.md
+241
View File
@@ -0,0 +1,241 @@
ComfyUI-H3-Continuum 3.9.11 — Spectrum signature stability
CPU/JS: 2139 passed / 2 skipped / 2 known Inspector xfailed; unexpected failures 0.
Targeted Spectrum + Kitchen browser/GPU: Review enabled; Chunk 1 retained,
Chunk 2 generated (1 reused / 1 new); both audio/video outputs fully decoded.
Existing Takes and official workflows retained. Unknown-code reuse remains refused.
Restart ComfyUI, hard-refresh browser, and check a new unique Run.
Scope, limits and separate MP4-menu workaround: docs/RELEASE_NOTES_V3911.md
Historical package records follow; their test counts describe their own versions.
------------------------------------------------------------------------
ComfyUI-H3-Continuum 3.9.9 — public KJ / Review continuation
CPU 2075 passed / 2 skipped / 2 known xfailed; upstream KJ GPU and installed local-KJ browser Continue PASS.
既存Take・Workflowは維持。更新後は再起動・ブラウザー再読込。旧unsafe/v5は自動変換しません。
対応条件と検証範囲: docs/RELEASE_NOTES_V399.md / docs/KJ_PREVIEW_OVERRIDE_V398.md
--- Historical package record (unchanged) ---
ComfyUI-H3-Continuum 3.9.8 / KJ Model Preview Override continuation
Full real-Core CPU gate: 1,995 passed / 3 skipped / 2 existing Inspector expected failures / zero unexpected failures and CUDA initialization attempts; the 48 dedicated KJ tests passed without skips. Normal ComfyUI GPU acceptance passed four Core-API Queues: PyTorch and Comfy Kitchen INT8 + the audited local Spectrum implementation, each with separate-Queue Chunk 1 to 2 continuation and held preview images. Both second Queues reused one chunk and generated one; original Chunk 1 bytes and contracts were unchanged. All four video/audio outputs fully decoded. See docs/KJ_PREVIEW_OVERRIDE_V398.md for exact support and limits.
Support: explicitly audited provider only; Preview Override VAE/Audio VAE disconnected, Tiny VAE none, Core NoPreviews/Auto/Latent2RGB. Restart and start a new Run. Old unsafe/v5 Takes and workflow bytes remain protected.
--- Earlier package validation records (historical) ---
ComfyUI-H3-Continuum 3.9.6 / Regeneration intent and automatic variations
Full CPU gate: 1,908 passed / 2 skipped / 2 known Inspector expected failures; zero unexpected failures and CUDA initialization attempts. Normal ComfyUI browser save/reload retained Chunk 2 / nonce 5 and Chunk 1 / nonce 0 after history loading. Five new-Run GPU queues passed continuation, Chunk 2 regeneration and two identical Full Run / nonce 0 submissions; earlier Chunk 1 bytes were preserved. GPU scope: PyTorch, Spectrum OFF, 512x512, 8-step Turbo; all five media outputs fully decoded. See docs/REGENERATE_INTENT_V396.md.
Update: restart ComfyUI and refresh the browser; select and save old unmarked Chunk 1 / nonce 0 again. Do not delete Runs/Takes. GitHub Release/Registry upload, service scan approval and Manager installation are separate publication checks.
--- Previous 3.9.5 package record (historical) ---
Previous 3.9.5 validation: 1,893 CPU passed / 2 skipped / 2 existing Inspector xfailed / failures 0; CUDA initialization 0. Public Spectrum 0.2.29 PyTorch/Kitchen Chunk 1→2 GPU continuation and full 10-second AV decode PASS. Details: docs/ISSUE31_SAMPLING_SIGNATURES.md
ComfyUI-H3-Continuum 3.9.5 / Issue #31 保存Take継続
パッケージmetadata: 3.9.5(2026-10-15)。公開登録は12ノード。
**最新版パッケージは3.9.5です。** 固定版のGitHub配布は下表を参照してください。Registryの公開状態は別に確認します。
| バージョン | Release | カスタムノード本体ZIP | SHA-256チェックサム |
| --- | --- | --- | --- |
| 3.9.5 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.5) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.5/ComfyUI-H3-Continuum-v3.9.5.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.5/SHA256SUMS.txt) |
| 3.9.4 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.4) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.4/ComfyUI-H3-Continuum-v3.9.4.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.4/SHA256SUMS.txt) |
| 3.9.3 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.3) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.3/ComfyUI-H3-Continuum-v3.9.3.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.3/SHA256SUMS.txt) |
| 3.9.2 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.2) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.2/ComfyUI-H3-Continuum-v3.9.2.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.2/SHA256SUMS.txt) |
元の[3.9.2 Source ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/archive/refs/tags/v3.9.2.zip)は従来のタグから取得できます。本体ZIPと公式Workflow ZIPは別の配布物です。
3.9.4はRegistry ZIPの梱包修正版です。Review復元ガイドを収録し、配布対象外のプロンプト作成資料を除外します。生成・保存動作は3.9.3と共通です。
設定 → H3Continuum → Storage → 一時ストレージを管理 から、サーバー側の
保存先を指定できます。FinalizeとDecode Cacheが対象で、空欄なら従来どおり。
現在・以前の保存先、論理ファイル量、空き容量、使用中/削除可能な量を表示し、
未使用ファイルだけを削除できます。参照中の出力・alias、所有者不明、別の生存
プロセスや管理対象外のファイルは保護します。Run/Take・完成動画は対象外です。
別の物理ストレージへ書き込み先を移す機能で、総書き込み量は減りません。
1台のディスク内の別フォルダー/別パーティションでは書き込みを逃がせません。
HDDは遅くなる場合があります。RAMの安全余裕を検査しますが、OOM・ページング・
容量変動や使用中のドライブ切断を完全には防げません。VRAM保存は追加しません。
新規ファイルから切り替え、旧出力は元の場所で保持します。Queue実行中・待機中
の保存・削除は拒否し、マルチユーザー運用では閲覧のみです。指定先の障害時に
元のSSDへ黙って書き戻しません。既存ノードのRAM/Disk選択はそのまま使います。
更新はカスタムノードのみ。ComfyUI再起動とブラウザー強制再読込が必要です。
その後の保存先設定の変更には再起動は不要です。公式Workflowのbytes、公開
Node ID/widget順、Run Storage v3、State/Session、生成契約を維持します。
検証結果と範囲はPACKAGE_VALIDATION.txt、詳細仕様はdocs/TEMPORARY_STORAGE_JA.md
を参照。今回GPU生成は行っていません。GitHub Release/Registry公開は別作業。
======================================================================
履歴:3.9.2の記録(以下の件数・結果は当時のもの)
======================================================================
ComfyUI-H3-Continuum 3.9.2 / Issue #30 Frontend hotfix
パッケージmetadata: 3.9.2(2026-10-13)。公開登録は12ノード。
今回の修正:
- Review比較基準なしの上流snapshotを省略。
- Reference選択時のSampler通知を1回へ整理。native値と元callbackを維持。
- ノード全体の目標寸法と実寸が同じならsetSizeを省略。
- 基準ありの監視、Take/Queue時の最新確認、V3.9の公開仕様・保存契約を維持。
検証:
Frontend修正の実Core CPUは1703成功/2スキップ/2期待失敗。
期待失敗は独立したInspector再configure問題の2条件です。
既存Review Queue JS 62条件と外部INT JS 22条件、Coreの登録・計画確認は成功。
隔離Chromiumで基準なしsnapshotと通知・同寸法resizeの削減を確認しました。
公開候補の最終試験と実ComfyUI画面の結果はPACKAGE_VALIDATION.txtを参照。
モバイルのフリーズ解消は未確認。DOM再構築・基準ありReview走査とInspector
既知問題は残ります。今回の新規GPU生成はなく、以前のGPU結果とは区別します。
更新:
ブラウザーを強制再読込してください。表示するpackage番号も更新する場合は
通常の手順でComfyUIを再起動してください。引き続きV3.9ノードを使用します。
3.9.1のRun/Takeを今回のUI修正のために移行する必要はありません。
公式Workflow JSON/ZIPのbytesを保持。Experimental LoRA/V4.0は含みません。
固定版はGitHub Releasesを参照し、Registry公開は別作業です。
======================================================================
履歴:3.9.1安定化修正の記録(以下の件数・GPU結果は当時のもの)
======================================================================
ComfyUI-H3-Continuum 3.9.1 / V3.9安定化修正・V3.8X2併存
パッケージmetadata: 3.9.1(2026-10-04)
現行パッケージ:
- 公開登録は12ノード。引き続きSampler V3.9/Reference Images V3.9を使う。
- V3.8X2は別Workflowとして維持。旧Run/TakeやReference配線を自動移行しない。
- Second Passの音声のみ/複合キーフレーム、途中Reviewの条件・Reference継承を修正。
- Sampling Contract v6/Graph Contract v4でSamplerやCFG/wrapperも照合する。
- Review Driving Audioを元physical groupの自然時間から一度だけ切り出す。
- Core標準resampleを優先。同一VAE内部の重みを直接変える場合はキャッシュの
明示的クリア、またはVAE再読込が必要。
- 公開Node ID、widget順、公式Workflow、Run Storage v3、State/Session形式を維持。
- Experimental LoRA Plan/V4.0は含まない。
更新時の注意:
ComfyUIを再起動し、ブラウザーも更新する。旧v5 Takeと履歴は読めて削除されないが、
新しいv6生成の前半には再利用できない。新規Full Video、または
「Start again from Chunk 1」で開始する。
検証と公開:
- 実Coreの全CPU: 1,696成功/1スキップ/失敗0。CUDA初期化0回。
- 実CoreのRelease準備確認: 66成功。文書・Manifest確認: 9成功。
- 公開CI: 1,676成功/21スキップ/失敗0。実Coreが必要な18件と、既存環境制約3件。
実Coreの1696件をCIでも実行したという意味ではない。件数を単純合算しない。
- 対象GPUの途中Review/Chunk単独/完了経路と生成・Take再利用確認は成功。
- ブラウザー受入と無改変公式Workflow全体の受入は別途必要。万能な画質・速度・
アクセラレータ互換性のPASSは宣言しない。
- GitHub Release v3.9.1は公開済み。文書訂正はmainへの後続更新として扱い、
公開済みtagは保持する。Registry公開は別作業で、今回は未実施。
- Manifestは開発429件/Registry payload 144件。任意LATENT拡大の問題はIssue #27。
公式V3.9 Workflow:
MiniMax_H3_Continuum_V39.json/同名ZIP。32ノード/39リンク。
画像Loader 1~6は初期Bypass、7~9は必要に応じて追加する。Sequence Promptは空欄。
初期設定はFirst Image+Draft 0.30 MP、2×10秒、Generate Full Video。
Queue前にモデル・画像・プロンプトを自分の素材へ設定する。Reference-onlyなら
First ImageをOFFにしてManualへ切り替える。Workflow ZIPはノード本体の
インストーラーではなく、モデル・素材も含まない。
現行手順: README_JA.md、docs/VALIDATION_JA.md、PACKAGE_VALIDATION.txt。
======================================================================
以下は旧3.9.0および過去版の履歴。バージョン、公開状態、検証条件は当時の記録であり、
現在の3.9.1の導入案内・受入結果ではない。
======================================================================
ComfyUI-H3-Continuum 3.9.0 / V3.8X2併存
パッケージmetadata: 3.9.0(mainソース。新しいGitHub Release/Registry公開は未実施。過去のReleaseは維持)
現行ソース:
- 登録IDは計12件。V3.8X2の10件(旧Audio/Video Loader互換IDを含む)に、別IDのSampler V3.9とReference Images V3.9を追加
- V3.9公式Workflowは無改変のユーザー指定MiniMax_H3_Continuum_V39.json/同名ZIP。32ノード/39リンク、画像Loader 1~6だけが新ヘルパーへ配線済み・初期Bypass。7~9は必要に応じて追加接続。V3.8X2標準ZIPにも両バージョンのJSONを同梱
- V3.8X2公式WorkflowとSampler V3.8は別に維持。Reference配線、保存済みRun/TakeはV3.9へ自動移行しない
- 初期V3.9 WorkflowはFirst Image+Draft 0.30 MP、2×10秒、Generate Full Video(保存値はFull Run)。First Image Loaderは有効なので、Queue前に自分の画像ファイルを選ぶ。Reference-onlyならFirst ImageをOFFにしてManualへ切り替える。保存済み480×640はManual時だけ有効。Sequence Promptは空欄なので入力する
- ComfyUI依存の宣言は>=0.32.0、現行の実生成・GPU検証基準は0.34.2。新テンプレートのブラウザー保存・再読込とGPU受入は別途必要
以下は旧V3.8X / package 3.8.1の履歴記録です。現在の導入案内ではありません。
MiniMax H3の5秒ChunkをAV latent contextで継続し、長尺映像として組み立てるComfyUIカスタムノードです。
V3.8X / 3.8.1:
- 公開面はSampler V3.8、Finalize、Load Image、Load Audio、Load Video、Second Pass、Reference Audios helperの7ノード
- Main Samplerへfrontend-onlyのBasic/Production表示propertyを追加。Python Schema、widget順・値、backend引数は不変
- MainのAspect選択をSize Source(First Image/Manual)へ整理。ManualではWidth/Heightを表示し、旧Aspect値は同じcanvasへ移行
- Draft 0.30 MP、Balanced 0.60 MP、Native 768、Custom MPのResolution Resolverを維持
- Review Each Chunk、Continue、Regenerate Current、Finish RemainingをRun Storageへ統合
- FL2VA Terminal Merge pairを1つのatomic review unitとして維持
- Driving AudioをReview、Smart Regenerate、Finish Remaining、restart persistenceと併用可能
- Image/Audio/Video Loaderはnative Bypass中もEnable行を明瞭に表示し、その場でONへ復帰可能
- 公開WorkflowはMiniMax_H3_Continuum_V38x.jsonと同じJSONを含む同名ZIP。Spectrum対応graphで、保存状態ではSpectrumとTurbo LoRAはOFF。Spectrum、rgthree、KJNodesが必要。ComfyUI-Easy-Useは不要
- 旧V3.8.0は`v3.8.0` tagから導入可能。旧WorkflowとV3.8Xを混在させない
- 16GB GPU GateはPASS。ただしVRAM headroomは小さく、Strict Minimal 14.96 GiB、複雑なGateは約15.5~15.6 GiB
- Review途中のpartial sequenceではSecond Pass/refine_contextは正式対応外。Review完了後にSecond Passを実行
- V3.7以前のNode IDはV3.8で非export。旧保存Workflowは対応するhistorical Release/tagを使用
- Registry配布からtests、tools、diagnostics、Labs資産、旧Workflowを除外し、内部継承moduleは維持
V3.7.0:
- H3 Continuum Sampler V3.7と、1枚のStill Image Guide用optional入力を追加
- Conditioning AdapterでFirst/Last、Continuation context、Still Guide元画像をSecond Passのtarget解像度へ再構築
- 内部RefineSchedule v1としてExternal/Full/Tail/Partialを定義し、既存SIGMAS socketとの互換性を維持
- 704×704 Internal Tail 6と1152×1152 Guide再ConditioningのGPU Correctness GateをPASS
- Still Image GuideはCorrectness PASS、Experimental/Production HOLD。hard anchorによる急なtrajectory変化が起きる場合あり
- V3.6 Production初期値、旧Node ID、保存済みWorkflow、Core PackedLayout/RoPE、First Pass Audio passthroughを維持
V3.6.1:
- Timeline/List混在PromptへH3C-P105警告を追加し、Timelineではstandalone --- 行だけを除去
- Standard+Audio Continuity ONのFast 5/Strong 39/Autoを、実行開始時からReference Contextへ安全にfallback
- Balanced 22 Masked AV、Audio OFF Masked Video、Compatibility、Run Storage schema、旧Node/Workflow互換を維持
V3.6.0:
- H3 Continuum Sampler V3.6を追加
- 標準Continuationは前ChunkのVideo/Audio latentを次Target内でNoise Mask保護するMasked AV方式
- AdvancedのCompatibilityで従来V3.5 Reference Contextへ切替可能
- Run Storage identityをbackend別に分離し、Terminal Mergeのlogical [2,3]はphysical group単位で再利用/再生成
- chunk_seconds上限を30秒へ拡張(5~15秒を推奨・検証済み範囲として維持)
- V3.5.3、V3.4 Node ID、保存済みWorkflow、Second Pass、Hi-Res Fix、Assemblyを維持
V3.5.3:
- 公開Conditioning Bridge WorkflowのWidth/Height接続を修正
- 公開V3.4/V3.5 Workflowの孤立link IDを清掃し、全配布Workflowのserialization整合性テストを追加
- Hybrid First/Last+Referenceの`<Picture N>`警告を公開番号のまま表示
- 生成契約、Node/socket、V3.5.2最適化、V3.4互換性は不変
V3.5.2:
- 同一Prompt / CLIP条件の繰り返し生成でCPU conditioning結果を再利用
- Referenceや特殊CLIP経路は安全側でcache bypass
- 長尺Video Guideの全source identityとfinite検査を維持し、必要prefixだけを保持
- 検証条件でVideo GuideのPeak追加RSSを約71%、保持Storageを約59%削減
- Sampling、Conditioning payload、Terminal Merge、Assembly、Seam、Run Storage、標準Seed動作は不変
V3.5.1:
- physical groupごとに完全なMODEL / CONDITIONINGを公開するConditioning Bridge V3.5
- 生成音声を置換しない任意のReference Audio conditioningと常設socket
- Video loaderのIMAGE frame batchを示すVideo Guide Frames / Video Guide Size表示名
- backend socket key、既存workflow接続、V3.4 sampling契約を維持
V3.5.0:
- 外部加工したH3 latentをphysical group構造のまま再SamplingするSecond Pass
- Pixel/VAE round tripを使うHi-Res Fix(Experimental)
- Latent Resize utility(高倍率の直接latent補間はMain経路非推奨)
- RAM / Disk-backed / Autoを選べるAssemble + Seam V3.5
- Exact Duration、Seam、Terminal Merge、元音声passthroughを維持
- V3.4ノードと保存済みワークフローの互換性を維持
安定範囲:
- Advanced Second Pass Bridge
- Assemble + Seam V3.5のRAM / Disk-backed / Auto
Experimental:
- Still Image Guide V3.7(Correctness PASS、hard-anchor qualityはProduction HOLD)
- Main Hi-Res Fix V3.5
- Main Hi-Res Fix 3x5 2x(RTX 5060 Ti 16 GiBではTerminal 77TでCUDA OOM)
GPU受入済み:
- Internal Tail 6 704×704(外部Tail 6比Video SSIM 0.982936、decoded Audio PCM bit-exact)
- Still Guide元画像の1152×1152再Conditioning(Correctnessのみ。品質はProduction HOLD)
- Main Hi-Res Fix 1x5、576から1152
- Hybrid FL2VA + Reference 1x5の統合Hi-Res FixとAdvanced Second Pass
詳細: README.md および docs/VALIDATION_RESULTS.md
+364
View File
@@ -0,0 +1,364 @@
ComfyUI-H3-Continuum 3.9.11 — Spectrum signature stability
CPU/JS: 2139 passed / 2 skipped / 2 known Inspector xfailed; unexpected failures 0.
Targeted Spectrum + Kitchen browser/GPU: Review enabled; Chunk 1 retained,
Chunk 2 generated (1 reused / 1 new); both audio/video outputs fully decoded.
Existing Takes and official workflows retained. Unknown-code reuse remains refused.
Restart ComfyUI, hard-refresh browser, and check a new unique Run.
Scope, limits and separate MP4-menu workaround: docs/RELEASE_NOTES_V3911.md
Historical package records follow; their test counts describe their own versions.
------------------------------------------------------------------------
ComfyUI-H3-Continuum 3.9.9 — public KJ / Review continuation
CPU 2075 passed / 2 skipped / 2 known xfailed; upstream KJ GPU and installed local-KJ browser Continue PASS.
既存Take・Workflowは維持。更新後は再起動・ブラウザー再読込。旧unsafe/v5は自動変換しません。
対応条件と検証範囲: docs/RELEASE_NOTES_V399.md / docs/KJ_PREVIEW_OVERRIDE_V398.md
--- Historical package record (unchanged) ---
ComfyUI-H3-Continuum 3.9.8 / KJ Model Preview Override continuation
Full real-Core CPU gate: 1,995 passed / 3 skipped / 2 existing Inspector expected failures / zero unexpected failures and CUDA initialization attempts; the 48 dedicated KJ tests passed without skips. Normal ComfyUI GPU acceptance passed four Core-API Queues: PyTorch and Comfy Kitchen INT8 + the audited local Spectrum implementation, each with separate-Queue Chunk 1 to 2 continuation and held preview images. Both second Queues reused one chunk and generated one; original Chunk 1 bytes and contracts were unchanged. All four video/audio outputs fully decoded. See docs/KJ_PREVIEW_OVERRIDE_V398.md for exact support and limits.
Support: explicitly audited provider only; Preview Override VAE/Audio VAE disconnected, Tiny VAE none, Core NoPreviews/Auto/Latent2RGB. Restart and start a new Run. Old unsafe/v5 Takes and workflow bytes remain protected.
--- Earlier package validation records (historical) ---
ComfyUI-H3-Continuum 3.9.7 / External-input regeneration cache
CPU: 1,948 passed / 2 skipped / 2 known Inspector expected failures; zero unexpected failures and zero CUDA initialization attempts. Targeted Core-API GPU queues verified external Chunks=2 / Nonce=0, repeated identical automatic variations 1 then 2, and 1 reused / 1 generated chunk per variation. Browser save/reload and Run-button submissions were checked separately. GPU scope: PyTorch attention, Spectrum OFF, 512x512, 8-step Turbo, two 5-second chunks. This is a targeted cache repair, not general image-quality or all-accelerator acceptance.
Existing workflow and Take files were hash-protected. No storage/schema migration.
--- Previous 3.9.6 package record (historical) ---
ComfyUI-H3-Continuum 3.9.6 / Regeneration intent and automatic variations
Full CPU gate: 1,908 passed / 2 skipped / 2 known Inspector expected failures; zero unexpected failures and CUDA initialization attempts. Normal ComfyUI browser save/reload retained Chunk 2 / nonce 5 and Chunk 1 / nonce 0 after history loading. Five new-Run GPU queues passed continuation, Chunk 2 regeneration and two identical Full Run / nonce 0 submissions; earlier Chunk 1 bytes were preserved. GPU scope: PyTorch, Spectrum OFF, 512x512, 8-step Turbo; all five media outputs fully decoded. See docs/REGENERATE_INTENT_V396.md.
Update: restart ComfyUI and refresh the browser; select and save old unmarked Chunk 1 / nonce 0 again. Do not delete Runs/Takes. GitHub Release/Registry upload, service scan approval and Manager installation are separate publication checks.
--- Previous 3.9.5 package record (historical) ---
Previous 3.9.5 validation: 1,893 CPU passed / 2 skipped / 2 existing Inspector xfailed / failures 0; CUDA initialization 0. Public Spectrum 0.2.29 PyTorch/Kitchen Chunk 1→2 GPU continuation and full 10-second AV decode PASS. Details: docs/ISSUE31_SAMPLING_SIGNATURES.md
ComfyUI-H3-Continuum 3.9.5 / Issue #31 Attention and Spectrum identity - 2026-10-15
Package metadata: 3.9.5. Public registration: twelve nodes. Existing V3.9
and separate V3.8X2 workflows remain supported without schema migration.
Release artifacts and integrity (2026-10-13)
**Latest package: 3.9.5.** Use the fixed-version GitHub downloads below. Registry publication is verified separately.
| Version | Release | Custom-node ZIP | SHA-256 checksum |
| --- | --- | --- | --- |
| 3.9.5 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.5) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.5/ComfyUI-H3-Continuum-v3.9.5.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.5/SHA256SUMS.txt) |
| 3.9.4 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.4) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.4/ComfyUI-H3-Continuum-v3.9.4.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.4/SHA256SUMS.txt) |
| 3.9.3 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.3) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.3/ComfyUI-H3-Continuum-v3.9.3.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.3/SHA256SUMS.txt) |
| 3.9.2 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.2) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.2/ComfyUI-H3-Continuum-v3.9.2.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.2/SHA256SUMS.txt) |
The original [3.9.2 GitHub source archive](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/archive/refs/tags/v3.9.2.zip) remains available from its unchanged tag. This custom-node package ZIP is distinct from the official workflow ZIPs.
3.9.4 changes package selection and version metadata only. The Registry publication workflow checks the actual ZIP file set, CRC and all declared hashes before uploading. The 3.9.3 Registry ZIP omitted docs/REVIEW_RESTORATION_REPAIR.md and included three undeclared prompt-authoring files; GitHub 3.9.3 assets are unaffected.
Historical validation counts below retain their original version and scope.
No new GPU, long-form performance or physical SSD-write validation is claimed.
Scope
- Server-owned scratch path for Finalize and Decode Cache. Blank inherits
existing defaults; selected storage never silently falls back to OS temp.
- Settings panel: locations, logical bytes, free capacity, explicit refresh
and conservative unused-file cleanup. No periodic filesystem polling.
- Protect live Tensor/storage aliases, cache mappings, active processes,
unknown owners, unregistered files and directory/link substitutions.
- Atomic settings/revision checks and queue/operation coordination. New
files use the selected destination; existing outputs retain their paths.
- Manual RAM and Disk-backed preflight; discoverable cgroup memory limits.
Auto's 4 GiB threshold and reserve, dtype and generation contracts remain.
Candidate validation
- Real ComfyUI Core 0.38.0 CPU regression: 1740 passed / 2 skipped /
2 expected failures; zero unexpected failures and CUDA initializations.
Expected failures still track the independent Inspector reconfigure bug.
Skips: Windows private-commit metric and absent historical V3.5 workflow.
- New storage regression gate: 37 cases, including real small Tensor/view
mappings, lost/changed roots, failed writes/deletes, ownerless/link
protection, detached helper leases, abrupt subprocess exit, two-process
settings conflict, HTTP queue/read-only guards, and frontend lifecycle.
- tools/validate.ps1: compileall and Core runtime verification passed using
a CPU-only Python adapter; full pytest was run separately as above.
Native PackedLayout, Fixed 3x5s planning and twelve-node registration pass.
- Actual Core 0.38.0 / frontend 1.53.6 / Chromium 151 smoke passed: real
settings navigation, invalid-path rejection, validation/save/cleanup,
ten modal reopens without polling/duplicate requests, page reload with
persisted settings, native synthetic graph serialization/reload, and
Japanese controls at a narrow viewport. No page errors or prompt submits.
The separate production-JS fixture covers 100 reopen cycles.
- All 25 tracked JSON/ZIP assets, including official workflows, retain
their pre-change bytes. Source and Registry payload hashes are verified.
- Windows-focused storage/file-backed/cache CI is configured; its hosted
result is a separate gate from these local Linux checks. The browser
gate is headless desktop Chromium, not mobile hardware or GPU generation.
3.9.3 frontend follow-up
- Empty HTTP 404 reproduced the reported parser error and empty selector.
User startup logs identified the failed updated process binding to a port
already held by an older process. Starting the updated backend on an
available port restored status and controls in the user's environment.
- Improve HTTP/invalid-response diagnostics, initialized candidate labels,
full-width layout and manual recovery. Preserve Core URL/auth/profile
handling; no automatic retries or replay of mutating requests.
- Targeted CPU/JavaScript/HTTP regression: 59 passed / 2 existing expected
Inspector failures. Full Core 0.39.0 CPU regression: 1740 passed /
2 skipped / 2 existing Inspector expected failures; CUDA attempts zero.
- Core 0.39.0 / frontend 1.53.10 static assets / Chromium smoke passed on
an alternate loopback host and port: initial empty-404 reproduction,
explicit HTTP 404/403/empty-200 errors, initialized full-width selector,
Refresh recovery without page reload, and actual settings save/cleanup.
No page errors, prompt submissions or automatic mutation replay.
This used Linux CPU dependencies; it is separate from Windows/GPU quality
validation. Core registration/planning and compileall also passed.
- Source/Registry hashes and unchanged workflow bytes are checked again.
Limits and update
No GPU generation, long-form throughput, physical SSD write measurement or
mobile hardware validation was performed for this storage change. Memory
and capacity checks do not reserve resources or prevent all OOM/I/O faults.
External drives must remain connected while outputs refer to them. Unknown
legacy cache files remain protected. Multi-user UI mutations are disabled.
The existing Inspector reconfigure expected failures remain independent.
Update custom nodes, restart ComfyUI normally, then hard-refresh the browser.
Changing the saved scratch setting afterwards requires no restart. Source
publication is separate from a GitHub Release/tag or Registry publication.
======================================================================
Historical 3.9.2 validation (counts and scope below belong to that version)
======================================================================
ComfyUI-H3-Continuum 3.9.2 / Issue #30 frontend hotfix - 2026-10-13
Package metadata: 3.9.2. Public registration: twelve nodes. Continue using
V3.9 nodes; V3.8X2 remains a separate workflow.
Repair scope
- Skip upstream Review settings snapshots only without a comparison baseline.
- Notify each connected Sampler once per Reference selection, preserving
synchronous native values and the original widget callback.
- Skip setSize when the complete Reference node target dimensions equal
its actual dimensions. Height-style same-value assignment remains.
- Retain Review monitoring with a baseline and fresh Take/Queue checks.
- Keep Sampling Contract v6 / Graph Contract v4, Run Storage v3, public IDs,
widget/socket order and official workflow bytes.
Validation scopes (do not add counts from different environments)
- Frontend repair with real Core, CPU: 1703 passed / 2 skipped / 2 xfailed.
The two explicit expected failures track one independent Inspector bug:
stale verified text after 2 or 100 Sampler configure passes.
- Skips: Windows private-commit metric and absent historical V3.5 workflow.
- Existing Review Queue JavaScript: 62/62 passed; external INT: 22/22 passed.
- Offline native PackedLayout, Fixed 3x5s planning and twelve-node registration
passed. CUDA initialization attempts: zero.
- Isolated desktop Chromium, actual frontend JS/DOM with graph/API fixtures:
600 baseline-free draw callbacks: snapshots 600 -> 0. With a baseline,
snapshots remain 600. Thirty connected checks: notifications 60 -> 30,
unchanged-dimension setSize calls 30 -> 0. Table rebuilding remains.
- Release-candidate CPU/metadata and real-ComfyUI browser results are recorded
below after final preparation. Standalone GitHub Actions is a separate gate.
Remaining limits
Mobile freeze resolution is unconfirmed. Review snapshots with a baseline,
Reference table rebuilding and the independent Inspector display bug remain.
No new GPU generation was run for this frontend hotfix. Earlier 3.9.1 GPU
results are historical evidence, not 3.9.2 GPU validation. Full official
workflow generation and all accelerators remain outside this repair gate.
Updating and publication
Hard-refresh the browser after updating JavaScript. Restart ComfyUI normally
if the displayed package version also needs refreshing. 3.9.1 Runs/Takes
require no migration for this UI hotfix. Users upgrading from pre-v6 code
must still follow the older v5 history instructions below.
GitHub Release/tag and Registry publication are distinct; old tags are kept.
Current publication status is listed in GitHub Releases. Registry publication
is not part of this hotfix task.
Final 3.9.2 candidate validation - 2026-10-13
- Real-Core CPU regression: 1703 passed / 2 skipped / 2 xfailed; no unexpected
failures; zero CUDA initialization attempts. The independent Inspector
reconfigure bug remains explicitly tracked.
- Actual ComfyUI 0.38.0 / frontend 1.53.6 / Chromium 151.0.7922.173 smoke:
physical checkbox interactions, Prompt/link/Bypass edit detection and
restoration, Chunks shrink/restore, pan/zoom, native assignment graph
serialization and app.loadGraphData reload passed.
- Before/after frontend JS responses used the actual Core/frontend/LiteGraph
with additive instrumentation. Baseline-free 600 draw callbacks: 600 -> 0
snapshots. With a baseline: 600 -> 600. One checkbox: 2 -> 1 Sampler
notifications; same-dimension resize: 1 -> 0.
- Scope: desktop headless browser, synthetic connected image/string nodes,
model-free CPU server and graph reload. UI file-save, real stored Take
adoption, mobile hardware and full official workflow acceptance remain
separate. No POST /prompt, generation or GPU execution occurred.
- GitHub Actions status must be read from the published candidate commit;
the real-Core count above is not a claim that Core cases ran in standalone CI.
======================================================================
Historical 3.9.1 stability validation - 2026-10-04
The original record below describes that package, its tests and publication.
======================================================================
ComfyUI-H3-Continuum 3.9.1 / V3.9 stability validation - 2026-10-04
Current package metadata: 3.9.1. Public registration: twelve nodes.
The V3.9 Sampler and Reference Images helper retain their public IDs and
official workflows; V3.8X2 remains a separate workflow. LoRA Plan / V4.0 is
not included. Run Storage v3 and State/Session formats are unchanged.
Repair scope
- Preserve audio-only/mixed Second Pass keyframes; spatially adapt video only.
- Match partial/middle-chunk Review conditioning and References to the actual
output physical groups, retaining Terminal Merge groups as atomic units.
- Use Sampling Contract v6 / Graph Contract v4 for Take compatibility,
including sampler closures and MODEL CFG/wrapper settings.
- Crop Review Driving Audio once from the original physical-group time range.
- Prefer Core audio resampling. Direct weight mutation inside the same VAE
object requires explicit Reference Encode Cache clearing or VAE reload.
Recorded validation (separate environments; do not add these counts)
- Full CPU with real ComfyUI Core: 1,696 passed / 1 skipped / 0 failed.
CUDA initialization attempts: zero.
- Release preparation with real Core: 66 passed / 0 skipped / 0 failed.
- Standalone dependency check: 48 passed / 18 skipped / 0 failed.
- Release document/manifest checks: 9 passed / 0 failed.
- GitHub Actions at release commit 94eaf70d674a58244e1cb139f021290d63fb2e6c:
1,676 passed / 21 skipped / 0 failed. Eighteen cases require real Core and
are explicitly skipped without it; three retain existing environment or
fixture limits. This is not 1,696 real-Core cases executed in CI.
- Offline native PackedLayout, Fixed 3x5-second planning and twelve-node
registration passed.
- Targeted GPU partial-prefix, single-middle-chunk and complete-sequence
Review Second Pass checks passed at 512x512 / 24 fps, including conditioning
inheritance, source-PCM alignment and saved Take/raw preservation.
- Integrated generation and Take-reuse GPU checks passed for the repaired
runtime. These are targeted results, not universal quality/accelerator gates.
Current manifests declare 429 development files and 144 Registry payload
files. Hash integrity does not establish semantic freshness of every document.
The official V3.9 workflow retains 32 nodes / 39 links, the original JSON
bytes and matching workflow ZIP. Models/media are not included.
Publication and remaining gates
- GitHub Release v3.9.1 is published. Its tag remains fixed at the release
commit above; later documentation corrections are follow-up main updates.
- Registry publication is separate and has not been performed for this patch.
- Browser save/reload acceptance and full acceptance of the unchanged default
workflow remain separate gates; do not infer them from CPU or targeted GPU
results. Record the tested workflow and runtime when completing them.
- Optional latent-upscale doubled outlines remain separate in Issue #27.
Updating: restart ComfyUI and refresh the browser. Old v5 Takes/history remain
readable and are not deleted or rewritten, but cannot supply prefixes to new
v6 generation. Start a new Full Video or Start again from Chunk 1. Continue
using the V3.9 nodes.
See README.md, README_JA.md and docs/VALIDATION_JA.md for current instructions.
======================================================================
Historical V3.9.0 main-source record - 2026-09-29
The original record below is retained as history. Its metadata, test counts,
manifest counts and publication status do not describe package 3.9.1.
======================================================================
ComfyUI-H3-Continuum 3.9.0 / V3.9 main-source validation — 2026-09-29
Status: MAIN SOURCE PUBLICATION. The ComfyUI_W worktree has 12 public node IDs: the
existing V3.8 and V3.9 Samplers plus the new V3.9 Reference Images helper.
Package metadata is 3.9.0. A GitHub main commit is not a new GitHub Release or Registry publish; earlier Releases are retained.
The user-selected official V3.9 JSON is copied byte-for-byte and has 32
nodes/39 links. Its matching one-JSON ZIP and gallery copy preserve that graph.
The standard V38X2 ZIP now includes both unchanged V38X2 and V3.9 JSONs for
one-download setup; the V38X2 JSON itself is unchanged. V3.9 retains the V38X2-based
model/LoRA, Decode Cache, Finalize and Save chain; Image loaders 1–6 are wired
to the new helper but bypassed by default, while 7–9 require user-added loaders.
Its Sequence Prompt is blank. Its saved size controls are First Image + Draft
0.30 MP, with the First Image loader enabled; users must select their own
image before Queue. For Reference-only, turn it off and choose Manual.
Saved 480x640 applies only to Manual mode.
Other saved controls include two 10-second chunks, Full Run mode,
Spectrum/Turbo LoRA off, and a separate Project ID.
V3.9 connects fixed Reference Images 1–9 to one helper, then connects its one
typed output to the V3.9 Sampler. The helper's in-node table selects All chunks
or per-chunk assignments. The backend retains sparse fixed IDs, uses the
existing effective plan/Run Storage contracts, and rejects incompatible
payloads. The V3.8 Sampler and official V38X2 workflow JSON/ZIP are unchanged.
Older V3.9 prototype workflows need manual rewiring; saved Runs/Takes are not
automatically migrated.
The latest recorded Windows CPU run is 1536 passed, 1 skipped, 0 failed.
A separate Linux/Python 3.13.5 CPU audit reported 1534 passed, 3 skipped,
0 failed; that external count was not rerun during this documentation edit.
The selected workflow JSON has 32/39 nodes/links. The development Manifest
contains 406 entries and the Registry Manifest contains 138 entries. Both
were resynchronized and hash-checked after this documentation reconciliation.
The earlier RR-R6B browser result predates this helper UI, and configured
Reference-only GPU/API evidence does not establish browser save/reload or GPU
acceptance of the current default official template. That acceptance remains HOLD.
This source publication makes no generation-code changes relative to the
validated local V3.9 candidate and does not create a tag, GitHub Release,
Registry package, or new GPU run.
Historical V3.8X2 / package 3.8.3 validation record follows. Its test counts,
node count and workflow SHA describe that earlier preparation, not the current
V3.9 candidate:
ComfyUI-H3-Continuum V3.8X2 / package 3.8.3 — package validation 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 nine nodes
- H3 Continuum Sampler V3.8
- H3 Continuum Reference Audios
- H3 Continuum Finalize
- H3 Continuum Load Image
- H3 Continuum Load Audio
- H3 Continuum Load Video
- H3 Continuum Second Pass
- H3 Continuum Reference Images
- Decode Cache Helper
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. The current standard V38X2 ZIP also
includes V3.9; the helper-explicit ZIP remains single-JSON. The historical
V38X2 JSON SHA-256 is
6c445d62979632bc1a801b1c28dbd639c23b51cc156ebae18837baaa757e592b.
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.
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 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.
+157
View File
@@ -0,0 +1,157 @@
# Public source status
## 3.9.11 — Spectrum code audit stability
Supplement the legacy code audit only for code-digest differences in the two
already-audited Spectrum implementations on Python 3.12/3.13. Preserve the old
provider metadata, persisted identity, safe Take reuse and unknown-code rejection.
CPU/JS: 2,139 passed / 2 skipped / 2 known Inspector expected failures. Targeted
Spectrum + Kitchen browser/GPU Review continuation passed with Chunk 1 preserved
and one reused / one new chunk. Existing workflows and stored Takes are unchanged.
Publication and asset integrity are verified separately; see docs/RELEASE_NOTES_V3911.md.
## 3.9.10 — Spectrum reuse and Reference assignment display
Normalize Spectrum CRLF source auditing and add fixed Python 3.12 profiles while
preserving the existing 3.13 profiles, valid Sampling v6 identities, old Takes
and official workflows. Correct the Reference assignment display for externally
connected Chunks without changing generation count or saved selectors.
Full local CPU/JS: 2,096 passed / 2 skipped / 2 known expected Inspector failures.
Python 3.12 component: 112 passed / 1 skip; 24 independent storage cases and
actual-JS checks passed. Reference browser checks passed. No new GPU acceptance
is claimed. Restart ComfyUI and refresh the browser; use a new Run for newly
supported configurations. See docs/RELEASE_NOTES_V3910.md.
## 3.9.9 — KJ Preview Override / Review continuation
Fix new-Run v6 read-only with the separately audited upstream KJ profile, and
show saved reasons when reuse is unavailable. Keep the original local profile,
Sampling v6 guards, old Takes and official workflow bytes.
CPU: **2,075 passed / 2 skipped / 2 known expected failures**, plus overlapping
90-case JS coverage. Upstream KJ GPU and normal-ComfyUI browser Continue both
passed: **Chunk 1 preserved, Chunk 2 generated, one reused / one new**; all four
AV outputs fully decoded. Browser checks used the existing local KJ profile.
These are targeted repair checks, not general quality or all-provider acceptance.
Restart ComfyUI and hard-refresh after updating. On Preview Override, disconnect
optional VAE/Audio VAE and set Tiny VAE `none`; retain generation VAEs. Correct
unsupported settings before starting a new Run. Old unsafe/v5 Takes remain
readable and are not automatically made reusable. No workflow rewiring or Take
deletion is required. [Full release notes](docs/RELEASE_NOTES_V399.md).
## V3.9 Turbo Sample on main
Add the user-supplied sample separately: Auto, 2 x 8s, multiline image-anchored
dance prompt, fixed background/camera, Thai rap and one enabled Turbo LoRA.
Preserve the supplied 6-step/Draft settings and document their unverified pairing
with the 4-step/768p LoRA. Fresh workflow/project IDs avoid user Run identity reuse;
remove misleading auto-download metadata for the saved custom model. Standard
workflows, existing Takes and runtime code stay unchanged. No new GPU validation,
runtime deployment, release or Registry publication is included.
Updated: 2026-10-16 (Japan time).
## Japanese README organization (documentation only)
The Japanese README follows the English quick-start structure. Japanese detail
and images remain in docs/USER_GUIDE_JA.md and docs/README_HISTORY_JA.md.
Downloads, model folders, provider links, history safety and limited acceptance
scope are retained. English documentation, runtime and published assets are unchanged.
## README organization (documentation only)
The English README is a compact entry point. Detailed operating instructions and
screenshots remain in docs/USER_GUIDE.md; release and older implementation notes
remain in docs/README_HISTORY.md. Version-specific acceptance statements retain
their historical context. Japanese README, product code, official workflows and
published v3.9.8 assets are unchanged; this is not a new runtime or release version.
## Published v3.9.8 GPU recheck (2026-10-16)
The exact published tag `58fbd855` was deployed and restarted in normal ComfyUI; all 464 release files and the live startup/adapter identity matched. Two new Runs / four Core-API Queues passed PyTorch/KJ and Kitchen INT8 + audited local Spectrum/KJ Chunk 1 to 2 continuation, unchanged prefix/contracts and complete AV decoding. Existing Takes/workflows stayed hash-identical. README and docs/RELEASE_NOTES_V398.md record conditions and unverified scope. The later documentation-only main commit does not replace the release tag, GitHub assets or Registry package.
## 3.9.8 — KJ Preview Override Phase A (2026-10-16)
A bounded adapter identifies the audited KJ Preview Override source and loaded helpers, preserves fixed settings and wrapper execution order, and excludes its reviewed transient image list. VAE/Audio VAE must be disconnected, KJ Tiny VAE must be `none`, and Core approximate-VAE preview is outside this phase. Unknown implementations remain non-reusable. Sampling v6, old Takes and official workflows are unchanged. Full real-Core CPU gate: 1,995 passed / 3 skipped / 2 existing Inspector expected failures / zero unexpected failures and CUDA initialization attempts; the 48 dedicated KJ tests passed without skips. Normal ComfyUI GPU acceptance passed four Core-API Queues: PyTorch and Comfy Kitchen INT8 + the audited local Spectrum implementation, each with separate-Queue Chunk 1 to 2 continuation and held preview images. Both second Queues reused one chunk and generated one; original Chunk 1 bytes and contracts were unchanged. All four video/audio outputs fully decoded. See docs/KJ_PREVIEW_OVERRIDE_V398.md for exact support and limits. Release and Registry state are verified separately.
## 3.9.7 — external-input regeneration cache
Fix automatic Full Run variations when Chunks or Variation Nonce come from external nodes. Unresolved linked inputs no longer let Core skip an explicitly requested regeneration. Earlier accepted chunks, existing Takes, public inputs and official workflows are preserved. Update the custom nodes, restart ComfyUI and refresh the browser; no workflow changes or history deletion are required. See docs/RELEASE_NOTES_V397.md for targeted validation and limits.
## 3.9.6 — regeneration selection and automatic variations
Package 3.9.6 preserves saved regeneration selections and routes explicit Full Run automatic variations through Run Storage on every Queue. The full CPU gate and targeted normal-runtime browser/GPU acceptance passed; scope and update steps are in docs/REGENERATE_INTENT_V396.md. Sampling v6 safety, public inputs, official workflows and stored Takes are preserved. Release assets and Registry service status are verified separately.
## 3.9.5 — Issue #31 Attention and Spectrum identity repair
Finite loaded-implementation signatures identify the Core PyTorch/Kitchen attention overrides and explicit Spectrum profiles, including upstream 0.2.29. Existing normal v6 contracts without the targeted override remain unchanged; original unsafe/v5 history and official workflows are preserved. Validation and compatibility limits are recorded in docs/ISSUE31_SAMPLING_SIGNATURES.md. GitHub assets and Registry service status are verified separately.
## GitHub and Registry publication status
**Latest package: 3.9.8.** Use the fixed-version GitHub downloads below. Registry publication is verified separately.
| Version | Release | Custom-node ZIP | SHA-256 checksum |
| --- | --- | --- | --- |
| 3.9.8 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.8) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.8/ComfyUI-H3-Continuum-v3.9.8.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.8/SHA256SUMS.txt) |
| 3.9.7 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.7) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.7/ComfyUI-H3-Continuum-v3.9.7.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.7/SHA256SUMS.txt) |
| 3.9.6 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.6) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.6/ComfyUI-H3-Continuum-v3.9.6.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.6/SHA256SUMS.txt) |
| 3.9.5 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.5) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.5/ComfyUI-H3-Continuum-v3.9.5.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.5/SHA256SUMS.txt) |
| 3.9.4 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.4) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.4/ComfyUI-H3-Continuum-v3.9.4.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.4/SHA256SUMS.txt) |
| 3.9.3 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.3) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.3/ComfyUI-H3-Continuum-v3.9.3.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.3/SHA256SUMS.txt) |
| 3.9.2 | [Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.2) | [ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.2/ComfyUI-H3-Continuum-v3.9.2.zip) | [SHA256SUMS.txt](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.2/SHA256SUMS.txt) |
The original [3.9.2 GitHub source archive](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/archive/refs/tags/v3.9.2.zip) remains available from its unchanged tag. This custom-node package ZIP is distinct from the official workflow ZIPs.
Registry 3.9.3 was uploaded; its retrieved ZIP omitted one declared document and included three undeclared prompt-authoring files. Package 3.9.4 corrects the file selection. Registry scan status is reported by the service; source publication alone does not establish scan approval.
## 3.9.4 — Registry packaging repair (2026-10-14)
Include the declared Review restoration guide and exclude repository-only prompt-authoring files from the Registry ZIP. The publishing workflow now builds the actual package and checks its exact file set, CRC and every Registry Manifest hash before uploading. Runtime behavior, twelve public node IDs, workflows and saved Runs/Takes are unchanged. GitHub Releases 3.9.3 and 3.9.2 remain available.
## Package 3.9.3 — temporary storage settings
The current source adds a server-side scratch folder setting for Finalize and Decode Cache, storage usage/free-space reporting and conservative unused-file cleanup. Manual buffer capacity checks retain the existing Auto policy. Node schemas, official workflow bytes, generation identity and saved Runs/Takes are preserved.
Frontend follow-up improves missing/empty-response diagnostics and storage candidate initialization. The Core request address/profile handling is retained, and no automatic mutation retries are added.
The new setting is available under Settings → H3Continuum → Storage. Validation and platform limitations are recorded in PACKAGE_VALIDATION.txt. Source publication does not imply a new GitHub Release/tag or Registry publication.
## Previous package 3.9.2 — Issue #30 frontend hotfix
This package includes three minimal frontend changes: skip Review snapshots without a comparison baseline, notify connected Samplers once per Reference selection, and skip unchanged node dimensions when resizing. Review baseline monitoring, synchronous Take/Queue checks and generation/storage contracts are retained; package metadata is 3.9.2.
CPU/JavaScript regression checks passed 1,703 cases, with 2 skips and 2 explicit expected failures for the separate Inspector reconfigure bug. Offline twelve-node/runtime checks, isolated Chromium checks and the actual Core/frontend/LiteGraph desktop smoke passed without GPU generation. The live smoke covers native assignment graph serialization/reload and upstream edit/restore using synthetic nodes; UI file-save and stored-Take acceptance remain separate. DOM rebuilds remain; real ComfyUI browser save/reload, mobile freeze resolution and full workflow acceptance are still pending. No delayed update timer is added. See GitHub Releases for the published version; Registry publication is separate.
## Previous package 3.9.1 — generation stability history
This patch stabilizes V3.9 generation and Review without adding LoRA Plan or V4.0. Public V3.9 node IDs and official workflows remain unchanged. V3.8X2 stays available as a separate workflow; historical releases and tags remain available.
The included repairs cover:
- Second Pass audio-only and mixed keyframes, with video-only spatial adaptation.
- Conditioning and Reference inheritance for the actual Review output, including partial output and a single middle chunk.
- Take compatibility using Sampling Contract v6 and Graph Contract v4, including sampler closures and MODEL CFG/wrapper settings.
- Review Driving Audio cropped once from the physical group's natural frame range, sharing the PCM origin for Exact ON/OFF.
- Core-standard audio resampling with the legacy fallback when the API is unavailable.
- The documented Reference Encode Cache limitation for direct weight mutation inside the same VAE object.
## Compatibility
Original v5 Takes and history remain readable and are not deleted or converted. They cannot supply prefixes for v6 generation. Start a new Full Video or use Start again from Chunk 1 when moving an older Run to the repaired runtime.
Run Storage v3 and State/Session formats are retained. Unknown upstream settings can still generate; when their identity cannot be observed safely, automatic Take reuse is disabled.
## Validation and remaining limits
- Full CPU regression: 1,696 passed, 1 skipped, no failures; CUDA initialization attempts: zero.
- Offline verification: native PackedLayout and Fixed 3x5-second planning passed; twelve public nodes registered.
- Targeted GPU checks passed partial-prefix Review, single-middle-chunk Review and complete three-group reuse at 512x512 / 24 fps. Corresponding saved FLAC matched source PCM, and original Take/raw files were retained.
- Integrated generation and Take-reuse GPU checks passed for the repaired runtime.
- Browser save/reload acceptance and full acceptance of the unchanged default workflow remain pending. These targeted results do not establish every accelerator or quality combination.
- Optional latent-upscale doubled outlines are tracked separately in [Issue #27](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/issues/27).
- Versioned source downloads are listed in GitHub Releases. Registry publication is separate, and Release publication does not complete the pending acceptance gates.
See README.md, README_JA.md and CHANGELOG.md for user instructions and repair details. Current package records are in PACKAGE_VALIDATION.txt and PACKAGE_INFO_JA.txt; docs/VALIDATION_JA.md separates the current acceptance procedure from historical V2 instructions. Follow-up documentation corrections on main retain the published v3.9.1 tag.
+332
View File
@@ -0,0 +1,332 @@
# ComfyUI-H3-Continuum 3.9.11 — V3.9
Generate long-form MiniMax H3 video and audio in chunks, review each result,
retry a section, and continue from compatible saved Takes.
**V3.9 is the current workflow; V3.8X2 remains available separately.**
[Download v3.9.11](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.11/ComfyUI-H3-Continuum-v3.9.11.zip) ·
[Release notes](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.11) ·
[Checksums](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.11/SHA256SUMS.txt) ·
[日本語](README_JA.md)
## 3.9.11 — Spectrum signature stability / Review continuation
Fix another confirmed cause of false Sampling v6 read-only: repeated imports of
unchanged audited Spectrum code can have different marshal encodings. A fixed,
Python-specific supplemental audit checks the complete loaded descriptors while
preserving the original saved identity. Unknown or modified code remains
non-reusable; existing safe v6 Takes keep their compatibility.
CPU/JS: **2,139 passed / 2 skipped / 2 known Inspector expected failures**.
Targeted browser/GPU checks with **Spectrum + Comfy Kitchen Attention** passed:
Review buttons enabled, **Chunk 1 preserved / Chunk 2 generated, one reused and
one new**, both audio/video outputs fully decoded. Scope: Python 3.13.12,
Core 0.42.1, Kitchen 0.2.39, audited local Spectrum, 512×512, 24 fps,
two 5-second chunks, 8-step Turbo, first pass only. These are targeted repair
checks, not all-provider, quality or performance acceptance.
Update the existing installation through Manager or replace its custom-node
package, **restart ComfyUI and hard-refresh the browser (Ctrl+F5)**. Use a new,
unique Run Name with Spectrum and Review Each Chunk to verify Chunk 1 → 2.
Keep existing Takes and workflows; old unsafe/v5 Takes are not promoted.
If a separate Custom Scripts menu thumbnail tries to load MP4 as an image,
turn **Settings → Show Image On Menu OFF**. This tested workaround prevents
new thumbnail HTTP errors; it is not a Continuum code fix and is not applied
automatically. [Full release notes and limits](docs/RELEASE_NOTES_V3911.md).
## 3.9.10 — Spectrum reuse and Reference assignments
Fix false Sampling v6 read-only caused by Spectrum source CRLF line endings,
and add separate audited Python 3.12 profiles for the two supported Spectrum
implementations. Existing Python 3.13 profiles and valid Take identities stay exact.
Unknown code or runtime state remains non-reusable.
With external Chunks inputs, the V3.9 Reference Images table shows an assignment
range of 1–16 instead of a stale widget count. This does not change the number
of generated chunks or expand saved selections automatically.
CPU/JS: **2,096 passed / 2 skipped / 2 known expected failures**. Separate
Python 3.12 component, storage and actual-JS checks passed. Reference table
browser acceptance passed. **No new GPU acceptance is claimed for 3.9.10.**
Restart ComfyUI and refresh the browser after updating. Keep existing workflows
and Takes. Start a new Run for a newly supported configuration; old unsafe/v5
Takes remain readable and are not automatically made reusable.
[Release notes and limits](docs/RELEASE_NOTES_V3910.md).
## 3.9.9 — KJ Preview Override / Review continuation
Fix new-Run v6 read-only with the separately audited upstream KJ profile, and
show saved reasons when reuse is unavailable. Keep the original local profile,
Sampling v6 guards, old Takes and official workflow bytes.
CPU: **2,075 passed / 2 skipped / 2 known expected failures**, plus overlapping
90-case JS coverage. Upstream KJ GPU and normal-ComfyUI browser Continue both
passed: **Chunk 1 preserved, Chunk 2 generated, one reused / one new**; all four
AV outputs fully decoded. Browser checks used the existing local KJ profile.
These are targeted repair checks, not general quality or all-provider acceptance.
Restart ComfyUI and hard-refresh after updating. On Preview Override, disconnect
optional VAE/Audio VAE and set Tiny VAE `none`; retain generation VAEs. Correct
unsupported settings before starting a new Run. Old unsafe/v5 Takes remain
readable and are not automatically made reusable. No workflow rewiring or Take
deletion is required. [Full release notes](docs/RELEASE_NOTES_V399.md).
## Getting started video
[Watch: H3 Continuum V3.9 — Chunks, Prompts & Reference Images](https://youtu.be/AKJxBXaiG6Q) — **12:26**, with English narration, subtitles and chapters.
The video covers First Image setup, chunk settings, Review/Take retries,
Timeline prompts and Reference Images. For screenshots and every control,
open the [illustrated user guide](docs/USER_GUIDE.md).
## Install or update
Use one Continuum installation in `ComfyUI/custom_nodes`.
Models and third-party custom nodes are not bundled.
### Fixed-version ZIP
1. Download the **custom-node ZIP** above and optionally verify its checksum.
2. Extract its package folder into `ComfyUI/custom_nodes`.
When updating, replace the existing package; do not leave duplicate copies.
3. Restart ComfyUI and hard-refresh the browser (**Ctrl+F5**).
4. Open a V3.9 workflow below and select your installed models and input files.
Keep your saved workflows, Run/Take folders and settings when updating.
**Workflow ZIPs contain graphs, not the custom-node installer.**
### Git or ComfyUI-Manager
For a new Git installation:
```bash
cd ComfyUI/custom_nodes
git clone https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum.git
```
For an existing Git installation:
```bash
cd ComfyUI/custom_nodes/ComfyUI-H3-Continuum
git pull --ff-only origin main
```
If Manager owns your installation, update that copy through Manager.
Restart ComfyUI and refresh the browser after updating.
Registry review, Manager's selected version and GitHub Releases are separate;
the fixed-version links above identify the exact v3.9.11 package.
The package declares Python **3.10+** and ComfyUI **0.32.0+**.
The minimum declaration is not a GPU acceptance result for every Core version.
## Required model files and extensions
Download the weights separately from [Comfy-Org / MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3).
The table follows the **saved V3.9 template selections**; folders are relative to `ComfyUI/`.
| Component | File / download | Folder |
| --- | --- | --- |
| H3 diffusion model | [minimax_h3_fl2va_pruned_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors) | `models/diffusion_models/` |
| Text encoder | [qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors) | `models/text_encoders/` |
| Video VAE | [minimax_h3_video_vae_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_int8_convrot.safetensors) | `models/vae/` |
| Audio VAE | [minimax_h3_audio_vae_fp32.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_audio_vae_fp32.safetensors) | `models/vae/` |
Select the downloaded files in the loaders; set the text encoder's type to `minimax`.
Reselect paths if the saved `minimax/` subfolder differs from your installation.
The Video VAE loader selects INT8, although its older embedded download metadata names FP16;
choose the VAE you actually installed. [Other model variants](https://huggingface.co/Comfy-Org/MiniMax-H3/tree/main/diffusion_models) must match the generation task and loader support.
Quantized variants require compatible Core/GPU support; these selections are not a universal hardware guarantee.
The retained V3.8X2 graph instead saves DasiwaMinimaxH3_dasiwaHybridV2_int8.safetensors and
[FP16 Video VAE](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_fp16.safetensors).
That custom model is not bundled or supplied by the table above; reselect a compatible H3 model you have installed.
The complete supplied graph also needs these external node packages:
- [Spectrum](https://github.com/xmarre/ComfyUI-Spectrum-MiniMax-H3) — optional acceleration; saved disabled. Its presence does not imply every version is reuse-compatible; see the compatibility table below.
- [KJNodes](https://github.com/kijai/ComfyUI-KJNodes) — supplies the template's H3 SageAttention patch. Follow its attention dependency requirements, or replace/bypass that patch if unavailable.
- [rgthree-comfy](https://github.com/rgthree/rgthree-comfy) — supplies `Power Lora Loader (rgthree)`.
**Optional Turbo:** download one task-matched [LightX2V Turbo LoRA](https://huggingface.co/lightx2v/Minimax-h3-Turbo) into `models/loras/`; the standard workflows start with all entries disabled. The separate Turbo Sample enables one LoRA.
Follow that LoRA's sampler/step instructions; [listed files and setup](docs/USER_GUIDE.md#turbo-lora-and-spectrum-in-supplied-workflows) explain the choices. Models and extensions are not installed by Continuum.
## Choose a workflow
| Workflow | Download | Use |
| --- | --- | --- |
| **V3.9** | [JSON](examples/workflows/MiniMax_H3_Continuum_V39.json) / [ZIP](examples/workflows/MiniMax_H3_Continuum_V39.zip) | Current Sampler and fixed Reference Image slots |
| **V3.9 Turbo Sample** | [JSON](examples/workflows/MiniMax_H3_Continuum_V39_Turbo_Sample.json) / [ZIP](examples/workflows/MiniMax_H3_Continuum_V39_Turbo_Sample.zip) | Auto, 2 x 8s dance and Thai rap; [setup and limits](docs/TURBO_SAMPLE.md) |
| **V3.8X2** | [JSON](examples/workflows/MiniMax_H3_Continuum_V38X2.json) / [combined ZIP](examples/workflows/MiniMax_H3_Continuum_V38X2.zip) | Retained workflow; combined ZIP also contains V3.9 |
They are also available in **Templates → ComfyUI-H3-Continuum**.
V3.8X2 graphs and their Reference wiring are not automatically converted to V3.9.
Keep the original graph and open the dedicated V3.9 graph for new work.
The templates reference external Spectrum, rgthree and KJNodes nodes.
Install, replace or remove missing optional dependencies before Queue.
In the standard workflows, Spectrum and Turbo LoRA entries are saved disabled; ComfyUI-Easy-Use is not required.
In the V3.9 template, select your own **First Image** file before Queue.
Reference loaders 1–6 start bypassed and all per-chunk assignments start off.
Slots 7–9 require you to add and connect loaders.
See [template setup and screenshots](docs/USER_GUIDE.md#start-here-v39-and-the-retained-v38x2-workflow).
## First generation
Start with a small two-chunk test before a long sequence.
1. Select your H3 model, text encoder, sampler and appropriate VAE files.
2. Write `Sequence Prompt`; use `Prompt Format = Fixed` for one shared prompt.
3. For image-to-video, use `Size Source = First Image` and choose a resolution.
The template starts at **Draft — 0.30 MP**. For exact Width/Height, use `Manual`.
4. Set `Chunks` to **2**, `Seconds per Chunk` to **5**, and check `Total Length` = **10 seconds**.
5. Keep `Base Seed` unchanged and `Control After Generate` set to `fixed`.
6. Set `Run` to `Review Each Chunk` and `Progress` to `On — Resume and Takes available`.
7. Leave `Regenerate From = Auto`, read `Ready to Queue`, then press ComfyUI's top-right **Run** button.
`Chunks` is the final target count, not the number to add on the next Queue.
Review normally generates one review unit at a time: the first output in this
example is **5 seconds**, even though the target is 10 seconds.
With Last Image terminal merging, the final two logical chunks may form one unit.
For uninterrupted generation, select `Generate Full Video` instead.
Keep Progress on if you want saved Takes, compatible resume and later regeneration.
## Review, continue and retry
Selecting a Review action does not start sampling. Select it, then press
ComfyUI's **Run** button (`Queue`) to execute it.
| Action | Next Queue |
| --- | --- |
| `Use it and continue` | Keep accepted chunks and generate the next review unit |
| `Try this chunk again` | Keep earlier chunks and create another Take of the reviewed unit |
| `Use it and finish the rest` | Keep accepted chunks and generate all remaining units |
| `Back to Settings` / `Return to Review` | Navigate between settings and review; neither queues work nor deletes Takes |
| `Use This Take` | Select a stored result without new sampling; decoding/saving may still run |
| `Continue From Here` | Branch from the selected Take and generate the next review unit |
For the **2 × 5-second** example, continue after Chunk 1 to reuse it and generate
Chunk 2; the completed result is **10 seconds**.
At completion, retrying the current unit creates another Chunk 2 Take.
Keep the same model/LoRAs, seed, prompts, media, dimensions, sampling schedule,
continuation settings and Run identity while continuing.
Keeping only the seed fixed is insufficient to guarantee reuse.
Read the status/reuse counts before treating a result as a successful continuation.
To extend a completed sequence, keep those conditions and `Regenerate From = Auto`,
increase the final `Chunks` target, and Queue again.
[Illustrated Review, Take and extension steps](docs/USER_GUIDE.md#review-continue-and-revise-a-chunked-video).
## Regenerate from a chosen chunk
1. Open settings and choose **Regenerate From = Chunk N**.
2. Keep Progress on and earlier-chunk generation inputs unchanged.
3. Choose `Generate Full Video` to rebuild N through the target in one Queue,
or `Review Each Chunk` to pause after the next review unit.
4. Set **Variation Nonce** and press ComfyUI's **Run** button.
5. Restore `Regenerate From = Auto` before ordinary continuation or Take actions.
Nonce **0** requests another automatic variation after a completed regeneration;
a compatible interrupted regeneration resumes its existing variation.
A positive Nonce fixes that variation: repeating it with identical inputs does
not request a new result. Review retry manages its own variation separately.
Earlier compatible chunks and previous Takes are retained.
Later chunks follow the changed continuation, so Full Run from Chunk 2 may
regenerate more than Chunk 2 when the target contains additional chunks.
Terminal-merged pairs are atomic; arbitrary frames inside a chunk cannot be edited.
[Regeneration details and compatibility](docs/REGENERATE_INTENT_V396.md).
## Prompts and Reference Images
- **Fixed:** one shared prompt; **List:** per-chunk prompts; **Timeline:** time-based instructions.
- V3.9 Reference Images uses fixed **Image 1–9** slots and one Sampler connection.
`All chunks` shares connected images; `Per chunk` lets you tick assignments.
- `@R1` always means Image 1, even if other slots are empty. Use tags only for
active References; resolved picture numbers can differ by physical group.
- First/Last Image, Reference Images, Reference Audio and Driving Audio have
different roles. Driving Audio preserves a source track; Reference Audio conditions generation.
- For a Reference-only test, turn First/Last Image off and choose Manual size.
A terminal-merged final pair needs the same effective Reference set in both chunks.
- Pre-resize large source images: conditioning resize does not eliminate
source-loading RAM use. A subject may persist through video continuity after its assignment ends.
[Reference guide](docs/V39_REFERENCE_INLINE.md) ·
[Prompt examples](docs/README_HISTORY.md#prompt-formats) ·
[V3.9 prompt skill](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/tree/main/write-h3-v39-reference-prompts) ·
[General prompt resources](docs/USER_GUIDE.md#prompt-and-skill-downloads)
## Storage, decoding and Second Pass
Progress saves Run/Take data for compatible reuse. The optional **Decode Cache
Helper** caches decoded results; it is separate from saved sampling history.
Finalize assembles the output; downstream Core nodes create and save the video.
Set scratch storage under **Settings → H3Continuum → Storage → Manage temporary storage**.
The folder is on the ComfyUI server and applies to Finalize and Decode Cache.
It does not move saved Runs/Takes or finished videos.
Change or clean it only with empty running/pending queues.
Moving folders on one physical drive does not reduce that drive's writes.
[Storage modes, cleanup and limits](docs/TEMPORARY_STORAGE_JA.md).
**Second Pass** is an optional bridge for external refinement/upscaling.
It is separate from chunk continuation and ordinary Review retries.
The V3.8X2 standard workflow does not require Hi-Res Fix.
V3.8 Second Pass does not support partial Review sequences; V3.9 can inherit
validated conditioning for its actual output groups.
[Integration contract](docs/V38_OPEN_INTEGRATION_CONTRACT.md).
## Compatibility and v3.9.9 scope
| Area | Supported boundary |
| --- | --- |
| Saved history | Existing Takes stay readable. Old v5 or unsafe history is not repaired or promoted into reusable Sampling v6 history; start a new Run when required. |
| Unknown MODEL wrappers | Fresh generation remains available; reuse requires observable, matching contracts. No blanket approval by class name or version. |
| Attention / Spectrum | Finite audited profiles support Core PyTorch/Kitchen and specified Spectrum implementations, including upstream v0.2.29. [Exact scope](docs/ISSUE31_SAMPLING_SIGNATURES.md). |
| KJ Model Preview Override | Only the pinned KJ/Core source profile: **VAE / Audio VAE disconnected, Tiny VAE `none`**, Core NoPreviews/Auto/Latent2RGB. KJNodes 1.5.2 alone is insufficient; the audited local source differs from upstream. [Supported hashes](docs/KJ_PREVIEW_OVERRIDE_V398.md). |
Published **v3.9.9** passed new-Run, separate-Queue Chunk 1→2 GPU continuation
with **PyTorch + KJ** and **Comfy Kitchen INT8 + audited local Spectrum + KJ**.
Preview images remained held, original Chunk 1 data/contracts stayed unchanged,
and all four video/audio outputs decoded successfully.
These were 512×512, 24fps, 2×5-second, 8-step Turbo Core-API tests on an RTX 5060 Ti 16 GB.
They do not establish support for other KJ/Spectrum builds or preview-VAE paths.
[Full conditions and verification limits](docs/RELEASE_NOTES_V398.md).
## Known limitations
- **Reference Plan Inspector:** stale display after repeated Sampler configuration
remains a known issue; the two expected test failures do not mean it is fixed.
- **Mobile:** reduced UI work is verified; mobile freeze resolution is unconfirmed.
- **Resources:** nine high-resolution References or long final decoding can exhaust
VRAM/RAM. Disk-backed Finalize does not prevent allocations in other nodes.
- **Refinement:** high-ratio latent resize can cause artifacts; longer Hi-Res/Hybrid
cases and doubled outlines remain limited or under investigation ([Issue #27](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/issues/27)).
- **Continuity:** exact identity, motion, lip sync and frame-by-frame reproduction
are not guaranteed. Some long continuations have known quality limits.
- **Acceptance:** browser Run-button/save-reload, the reporter's exact full graph,
other provider builds, subjective quality and speed/VRAM benchmarks were not
established by the targeted v3.9.9 GPU recheck.
## Detailed documentation
| Topic | Read more |
| --- | --- |
| Setup, screenshots and complete controls | [Illustrated user guide](docs/USER_GUIDE.md) |
| Current Reference Images | [V3.9 Reference guide](docs/V39_REFERENCE_INLINE.md) |
| Updating from V3.8X2 | [Migration and retained contracts](docs/V38_RELEASE_AND_MIGRATION.md) |
| History, earlier screenshots and implementation notes | [README history](docs/README_HISTORY.md) / [CHANGELOG](CHANGELOG.md) |
| Current release and GPU verification | [v3.9.9 notes](docs/RELEASE_NOTES_V398.md) / [package validation](PACKAGE_VALIDATION.txt) |
| Bug reports | [GitHub Issues](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/issues) — include the workflow, status text and `auto-resume disabled:` reason |
Historical Releases and tags remain available. Documentation updates on `main`
do not replace the published v3.9.9 tag or package assets.
This condensed README changes documentation only; public nodes, official
workflow JSON/ZIP files, Sampling v6 and existing Runs/Takes are unchanged.
## License
[MIT](LICENSE). Third-party components retain their own [licenses and notices](THIRD_PARTY_NOTICES.md).
+302
View File
@@ -0,0 +1,302 @@
# ComfyUI-H3-Continuum 3.9.11 — V3.9
MiniMax H3の映像・音声をチャンクに分けて生成し、結果を確認しながら
一部分の再生成や、互換性のある保存Takeからの継続ができます。
**現在のWorkflowはV3.9です。V3.8X2も別のWorkflowとして保持しています。**
[v3.9.11本体ZIP](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.11/ComfyUI-H3-Continuum-v3.9.11.zip) ·
[Release](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/tag/v3.9.11) ·
[チェックサム](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/releases/download/v3.9.11/SHA256SUMS.txt) ·
[English](README.md)
## 3.9.11 — Spectrum署名の安定化/Review継続
監査済みSpectrumを再読込すると、同じコードでもmarshalの表現が変わり、
新規Takeが誤って「v6 read-only」になる条件を修正しました。旧監査を優先し、
必要な場合だけ固定プロファイルで読込済みコード全体を検査します。
正常な既存v6 Takeの署名は維持し、未知・改変コードの再利用拒否は緩めません。
CPU/JSは **2,139成功/2スキップ/既知Inspector期待失敗2件**。
**Spectrum+Comfy Kitchen Attention**のブラウザー/GPU検証ではReviewボタンが有効となり、
**Chunk 1保持・Chunk 2生成(再利用1/新規1)**と両出力の映像・音声の全デコードを確認しました。
対象はPython 3.13.12、Core 0.42.1、Kitchen 0.2.39、監査済みローカルSpectrum、
512×512・24fps・5秒×2・8-step Turbo・First Passのみです。
全構成、画質、速度の受入を意味するものではありません。
Managerまたは既存custom-nodeフォルダーの更新後、**ComfyUIを再起動し、Ctrl+F5でブラウザー更新**。
一意な新しいRun NameでSpectrumとReview Each Chunkを有効にしてChunk 1→2を確認してください。
既存Take・ワークフローは維持します。過去のunsafe/v5 Takeの再利用許可は変更しません。
別拡張Custom ScriptsのメニューがMP4を画像として取得してHTTPエラーになる場合は、
**Settingsで「Show Image On Menu」をOFF**にする回避方法を確認済みです。
Continuumのコード修正ではなく、設定を自動変更する更新でもありません。
[詳細・検証範囲](docs/RELEASE_NOTES_V3911.md)。
## 3.9.10 — Spectrum再利用とReference割り当て表示
SpectrumソースのCRLF改行でSampling v6 read-onlyになる判定を修正し、対応済みの
2種類の実装にPython 3.12用の監査済みプロファイルを追加しました。既存3.13の
プロファイルと正常なTakeの識別値は維持します。未知のコード・追加状態は拒否します。
外部Chunks接続時のReference Imagesは、古いWidget値の代わりに割り当て範囲1–16を
表示します。生成チャンク数や保存済みの選択内容は変更しません。
CPU/JS:**2,096成功・2スキップ・既知の期待失敗2件**。Python 3.12の対象試験、
保存・継続と実JS照合も成功。Reference表示は実ブラウザー確認済みです。
**3.9.10としての新たなGPU受入は未実施です。**
更新後はComfyUIを再起動し、ブラウザーを更新してください。既存WorkflowとTakeは
そのまま保持できます。新しく対応した構成は新規Runで確認してください。
旧unsafe/v5 Takeは閲覧用として保持し、自動変換しません。[詳細と制約](docs/RELEASE_NOTES_V3910.md)。
## 3.9.9の修正と検証
確認済みの公開KJ Preview Overrideで、新規Runまでv6 read-onlyとなる対応漏れを修正。
再利用不可のTakeには保存時の理由を表示します。安全判定・既存Take・Workflowは維持します。
CPU **2,075成功/2スキップ/既知の期待失敗2件**。公開KJのGPU継続と、既設KJを維持した
実ブラウザーのReviewボタン・Continue From Here→Runを確認し、**Chunk 1保持・Chunk 2生成
(1再利用・1新規生成)**に成功。4本の映像・音声を全デコードしました。
更新後は再起動とブラウザー強制再読込を行ってください。Preview Override側の任意VAE/Audio VAEは
未接続、Tiny VAEはnoneにし、通常の生成用VAEは維持してください。旧unsafe/v5 Takeは保持されますが
更新だけで再利用可能にはなりません。設定修正後は新Runで開始します。配線変更・Take削除は不要です。
[検証条件と制約・Release notes](docs/RELEASE_NOTES_V399.md)。
## 基本操作を動画で見る
[H3 Continuum V3.9 — Chunks, Prompts & Reference Images](https://youtu.be/AKJxBXaiG6Q) — **12分26秒**、英語ナレーション・字幕・チャプター付き。
First Image、チャンク設定、Review・Takeの再試行、Timeline Prompt、Reference Imagesを説明しています。
画面写真と詳しい操作は[日本語の詳細ガイド](docs/USER_GUIDE_JA.md)を参照してください。
## インストール・更新
Continuumは`ComfyUI/custom_nodes`内に1つだけ配置してください。
モデル・外部カスタムノードは本体ZIPに含まれません。
### 固定バージョンのZIPを使う
1. 冒頭の**本体ZIP**を取得し、必要に応じてチェックサムを確認します。
2. パッケージフォルダーを`ComfyUI/custom_nodes`へ展開します。
更新時は既存パッケージを置き換え、重複したコピーを残さないでください。
3. ComfyUIを再起動し、ブラウザーを**Ctrl+F5**で強制再読込します。
4. 下記のV3.9 Workflowを開き、導入したモデルと入力ファイルを選びます。
保存済みWorkflow、Run/Takeフォルダー、設定は保持してください。
**Workflow ZIPはグラフの配布物であり、カスタムノードのインストーラーではありません。**
### Git・ComfyUI-Managerを使う
Gitで新規導入する場合:
```bash
cd ComfyUI/custom_nodes
git clone https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum.git
```
既存のGit導入を更新する場合:
```bash
cd ComfyUI/custom_nodes/ComfyUI-H3-Continuum
git pull --ff-only origin main
```
Managerで導入した場合は、そのコピーをManagerから更新してください。
更新後はComfyUIを再起動し、ブラウザーを再読込します。
Registry審査・Managerが選択する版・GitHub Releaseの状態は別です。
正確なv3.9.11を使う場合は、冒頭の固定版リンクを参照してください。
パッケージの宣言上の最低要件は**Python 3.10以降・ComfyUI 0.32.0以降**です。
この最低要件の宣言だけで、すべてのCore版でのGPU動作確認を意味するものではありません。
## 必要なモデル・拡張機能
重みは[Comfy-Org / MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3)から別途取得します。
次の表は**保存されているV3.9テンプレートの選択値**です。配置先は`ComfyUI/`からの相対パスです。
| 用途 | ファイル・ダウンロード | 配置先 |
| --- | --- | --- |
| H3生成モデル | [minimax_h3_fl2va_pruned_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors) | `models/diffusion_models/` |
| テキストエンコーダー | [qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors) | `models/text_encoders/` |
| 動画VAE | [minimax_h3_video_vae_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_int8_convrot.safetensors) | `models/vae/` |
| 音声VAE | [minimax_h3_audio_vae_fp32.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_audio_vae_fp32.safetensors) | `models/vae/` |
各Loaderで取得したファイルを選び、テキストエンコーダーのtypeは`minimax`にします。
保存済みの`minimax/`サブフォルダーが環境と異なる場合は、実際の配置先から選び直してください。
動画VAEの選択値はINT8版ですが、旧ダウンロード情報にFP16版が残っています。
実際に導入したVAEを選んでください。[別のモデル形式](https://huggingface.co/Comfy-Org/MiniMax-H3/tree/main/diffusion_models)は生成用途とLoaderの対応に合わせて選択します。
量子化形式には対応するCore・GPUが必要であり、上表は全ハードウェアでの動作保証ではありません。
保持しているV3.8X2グラフでは、DasiwaMinimaxH3_dasiwaHybridV2_int8.safetensorsと
[FP16動画VAE](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_fp16.safetensors)が選択されています。
このカスタムモデルは同梱されず、上表の配布元から取得するものでもありません。導入済みの互換H3モデルを選び直してください。
配布グラフ全体を使う場合は、次の外部ノードも必要です。
- [Spectrum](https://github.com/xmarre/ComfyUI-Spectrum-MiniMax-H3):任意の高速化機能。保存時は無効です。全バージョンでのTake再利用を保証しません。
- [KJNodes](https://github.com/kijai/ComfyUI-KJNodes):テンプレートのH3 SageAttentionパッチを提供します。必要なAttention依存関係を導入するか、利用できないパッチを置換・Bypassしてください。
- [rgthree-comfy](https://github.com/rgthree/rgthree-comfy):`Power Lora Loader (rgthree)`を提供します。
**Turboを使う場合のみ:** 用途に合う[LightX2V Turbo LoRA](https://huggingface.co/lightx2v/Minimax-h3-Turbo)を1つ選び、`models/loras/`へ配置します。
標準WorkflowではLoRAはすべて保存時に無効です。別のTurbo Sampleでは1つ有効です。配布元のSampler・Steps指定に従ってください。
[ファイル一覧と設定の詳細](docs/USER_GUIDE.md#turbo-lora-and-spectrum-in-supplied-workflows)も参照できます。Continuumがこれらを自動導入することはありません。
## Workflowを選ぶ
| Workflow | ダウンロード | 用途 |
| --- | --- | --- |
| **V3.9** | [JSON](examples/workflows/MiniMax_H3_Continuum_V39.json) / [ZIP](examples/workflows/MiniMax_H3_Continuum_V39.zip) | 現行Samplerと固定Reference Imageスロット |
| **V3.9 Turbo Sample** | [JSON](examples/workflows/MiniMax_H3_Continuum_V39_Turbo_Sample.json) / [ZIP](examples/workflows/MiniMax_H3_Continuum_V39_Turbo_Sample.zip) | Auto・2×8秒のダンスとタイ語ラップ。[設定・制約](docs/TURBO_SAMPLE.md) |
| **V3.8X2** | [JSON](examples/workflows/MiniMax_H3_Continuum_V38X2.json) / [統合ZIP](examples/workflows/MiniMax_H3_Continuum_V38X2.zip) | 既存Workflow用。統合ZIPにはV3.9も収録 |
ComfyUIの**Templates → ComfyUI-H3-Continuum**からも開けます。
V3.8X2のReference配線や保存履歴はV3.9へ自動変換されません。
元のグラフを保持し、新しい作業は専用のV3.9グラフで開始してください。
不足する外部ノードは導入・置換・削除してからQueueします。ComfyUI-Easy-Useは不要です。
V3.9テンプレートでは、自分の**First Image**を選んでください。
Reference Loader 1〜6はBypass、チャンク別割り当てはすべてOFFで保存されています。
Image 7〜9を使う場合はLoaderを追加・接続します。
[テンプレートの詳しい説明](docs/USER_GUIDE_JA.md#最初にv39とv38x2)。
## 最初の生成
長い動画を作る前に、短い2チャンクで確認してください。
1. H3モデル、テキストエンコーダー、Sampler、対応VAEを選びます。
2. `Sequence Prompt`を記入します。全チャンク共通なら`Prompt Format = Fixed`を使います。
3. 画像から作る場合は`Size Source = First Image`と解像度を選びます。
初期値は**Draft — 0.30 MP**です。幅・高さを直接指定する場合は`Manual`にします。
4. `Chunks`を**2**、`Seconds per Chunk`を**5**にし、`Total Length`が**10秒**になることを確認します。
5. `Base Seed`を維持し、`Control After Generate`を`fixed`にします。
6. `Run`を`Review Each Chunk`、`Progress`を`On — Resume and Takes available`にします。
7. `Regenerate From = Auto`のまま`Ready to Queue`を読み、ComfyUI上端の**Run/実行ボタン**を押します。
`Chunks`は最終目標数であり、次のQueueで追加する数ではありません。
Reviewでは通常1単位ずつ生成するため、この例の最初の出力は**5秒**です。
Last ImageのTerminal Mergeでは、最後の2チャンクを1単位として扱う場合があります。
一括生成する場合は`Generate Full Video`を選びます。
保存Take・互換Resume・後からの再生成を使う場合はProgressをONにしてください。
## 確認・継続・再試行
Review操作を選ぶだけでは生成は始まりません。選択後にComfyUIの
**Run/実行ボタン**(`Queue`)を押してください。
| 操作 | 次のQueueで行うこと |
| --- | --- |
| `Use it and continue` | 採用済みチャンクを保持して、次のReview単位を生成 |
| `Try this chunk again` | 前のチャンクを保持して、確認中の単位を別Takeで再生成 |
| `Use it and finish the rest` | 採用済みの部分を保持して、残りをまとめて生成 |
| `Back to Settings` / `Return to Review` | 設定と確認画面の移動。生成開始・Take削除は行わない |
| `Use This Take` | 保存結果を採用。新しいSamplingは行わないがDecode・保存は実行され得る |
| `Continue From Here` | 選んだTakeまでを保持した分岐を作り、次の単位を生成 |
**2×5秒**の例では、Chunk 1を採用して継続すると、それを再利用してChunk 2を生成し、**10秒**の完成動画になります。
完了後に現在の単位をRetryすると、別のChunk 2 Takeを作ります。
継続時はモデル・LoRA・Seed・Prompt・入力素材・寸法・Sampling設定・継続設定・Run識別を維持します。
Seedを固定しただけで再利用が保証されるわけではありません。Statusと再利用数を確認してください。
完成動画を延ばす場合は条件を維持し、`Regenerate From = Auto`のまま最終目標の`Chunks`を増やしてQueueします。
[Review・Takeの詳細](docs/USER_GUIDE_JA.md#10秒を5秒ずつ確認しながら作る)。
## 指定チャンクから再生成する
1. 設定を開き、**Regenerate From = Chunk N**を選びます。
2. ProgressをONにし、前のチャンクの生成条件を維持します。
3. N以降をまとめて作るなら`Generate Full Video`、次の単位で確認するなら`Review Each Chunk`を選びます。
4. **Variation Nonce**を指定し、ComfyUIの実行ボタンを押します。
5. 通常の継続・Take操作へ戻る前に、`Regenerate From = Auto`へ戻します。
Nonce **0**は、再生成完了後の再実行で別Variationを自動選択します。
互換性のある中断処理では、同じVariationをResumeします。
正のNonceはVariationを固定します。同じ条件・同じ正数を繰り返しても別結果の要求にはなりません。
ReviewのRetryは、これとは別にVariationを管理します。
前の互換チャンク・以前のTakeは保持します。
後続は変更後の継続に従うため、Full RunのChunk 2指定は、目標数によってChunk 2以降をまとめて再生成します。
Terminal Mergeのpairは分割せず、チャンク内の任意フレームだけを変更することもできません。
[再生成・互換性の詳細](docs/REGENERATE_INTENT_V396.md)。
## Prompt・Reference Images
- **Fixed**は共通Prompt、**List**はチャンク別、**Timeline**は時間指定です。
- V3.9のReference Imagesは**Image 1〜9の固定スロット**を持ち、Samplerへ1本で接続します。
`All chunks`は共通使用、`Per chunk`は画像とチャンクの交点を選択します。
- `@R1`は空きスロットに関係なくImage 1です。有効なReferenceだけをタグで参照してください。
実際のPicture番号は物理groupごとに解決されます。
- First/Last Image、Reference Images、Reference Audio、Driving Audioは用途が異なります。
Driving Audioは元の音声を保持し、Reference Audioは生成条件として使います。
- Reference単独を試す場合はFirst/Last ImageをOFF、サイズをManualにします。
終端を結合するpairでは、両チャンクの有効なReferenceセットを揃えてください。
- 大きな入力画像は事前に縮小してください。条件付けのresizeだけでは元画像の読込RAMは減りません。
割り当てを外した後も、映像の連続性により被写体が残る場合があります。
[Referenceガイド](docs/V39_REFERENCE_INLINE.md) ·
[Prompt例(英語)](docs/README_HISTORY.md#prompt-formats) ·
[V3.9用Promptスキル](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/tree/main/write-h3-v39-reference-prompts) ·
[Prompt・スキル配布](docs/USER_GUIDE_JA.md#プロンプトスキルのダウンロード)
## 保存・Decode・Second Pass
ProgressはRun/Takeを保存します。任意の**Decode Cache Helper**はデコード結果のキャッシュであり、保存履歴とは別です。
Finalizeで結合し、後段のCoreノードで動画を作成・保存します。
一時保存先は**設定 → H3Continuum → Storage → 一時ストレージを管理**で指定します。
ComfyUIサーバー側のフォルダーで、FinalizeとDecode Cacheに適用します。
Run/Takeや完成動画は移動しません。変更・削除は実行中/待機中Queueが空のときに行ってください。
同じ物理ドライブ内のフォルダー移動だけでは、書き込みを別機器へ逃がせません。
[保存方式・削除・制約](docs/TEMPORARY_STORAGE_JA.md)。
**Second Pass**は外部のRefinement・拡大処理へ渡す任意の機能です。
チャンク継続や通常のReview Retryとは別で、V3.8X2標準WorkflowにHi-Res Fixは不要です。
V3.8ではReview途中のpartial sequenceに対応しません。V3.9は検証済みの実出力groupの条件を継承できます。
[外部連携の仕様](docs/V38_OPEN_INTEGRATION_CONTRACT.md)。
## 互換性・v3.9.9の対応範囲
| 対象 | 対応条件 |
| --- | --- |
| 保存履歴 | 既存Takeは読取可能です。旧v5・unsafe履歴をSampling v6の再利用可能履歴へ自動修復・昇格しません。必要に応じて新Runを使います。 |
| 未知のMODEL wrapper | 新規生成は可能です。再利用には生成契約の完全な観測と一致が必要で、名前・版だけで許可しません。 |
| Attention/Spectrum | Core PyTorch/Kitchenと、公式v0.2.29を含む指定Spectrum実装の監査済みプロファイルに対応します。[厳密な範囲](docs/ISSUE31_SAMPLING_SIGNATURES.md)。 |
| KJ Model Preview Override | 固定したKJ/Core実装のみ。**VAE/Audio VAE未接続・Tiny VAE `none`**、Core NoPreviews/Auto/Latent2RGB。監査済みローカルソースはupstreamと異なり、KJNodes 1.5.2全般の合格ではありません。[対応ハッシュ](docs/KJ_PREVIEW_OVERRIDE_V398.md)。 |
公開版**v3.9.9**は、新Run・別QueueでのChunk 1→2継続を
**PyTorch+KJ**と**Comfy Kitchen INT8+監査済みローカルSpectrum+KJ**で確認しています。
プレビュー画像を保持し、元Chunk 1と契約を維持、映像・音声4本は全デコード成功でした。
条件はRTX 5060 Ti 16 GB、512×512、24fps、2×5秒、8-step Turbo、Core API経由です。
別のKJ/Spectrum実装やPreview VAE接続を合格とするものではありません。
[詳しい条件・未確認範囲](docs/RELEASE_NOTES_V398.md)。
## 既知の問題・制約
- **Reference Plan Inspector:** Samplerの再configure後に古い表示が残る問題は未修正です。
2件の期待失敗は修正済みを意味しません。
- **モバイル:** UI処理の削減は確認していますが、フリーズ解消は未確認です。
- **メモリ:** 大きなReference画像9枚や長尺の最終DecodeでVRAM/RAM不足になる場合があります。
Disk-backed Finalizeでも、他ノードの大きなメモリ確保は防げません。
- **Refinement:** 高倍率のLatent Resizeでアーティファクトが残る場合があります。
長いHi-Res/Hybrid条件と二重輪郭には制約・調査中の事項があります([Issue #27](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/issues/27))。
- **連続性:** 完全な同一性・動作・口の同期・元動画の全フレーム再現は保証しません。長尺には既知の品質制約もあります。
- **検証範囲:** ブラウザー実行/保存再読込、報告者の完全一致グラフ、他実装、主観画質・音質、速度・VRAM比較は、今回の限定GPU再検証で確立していません。
## 詳細資料
| 内容 | 資料 |
| --- | --- |
| 導入・画像・詳細操作 | [日本語の詳細ガイド](docs/USER_GUIDE_JA.md) / [英語の図解ガイド](docs/USER_GUIDE.md) |
| 現行Reference Images | [V3.9 Referenceガイド](docs/V39_REFERENCE_INLINE.md) |
| V3.8X2からの更新 | [移行・保持する仕様](docs/V38_RELEASE_AND_MIGRATION.md) |
| 更新履歴・旧版画像・実装説明 | [日本語の履歴資料](docs/README_HISTORY_JA.md) / [CHANGELOG](CHANGELOG.md) |
| 最新版の検証記録 | [v3.9.9詳細](docs/RELEASE_NOTES_V398.md) / [配布検証](PACKAGE_VALIDATION.txt) |
| 不具合報告 | [GitHub Issues](https://github.com/ukr8b3g-cmyk/ComfyUI-H3-Continuum/issues) — Workflow、Status、`auto-resume disabled:`の理由を添えてください |
過去のRelease・タグは保持しています。mainの文書更新で、公開済みv3.9.9のタグや配布物を置き換えることはありません。
この整理は文書のみであり、公開ノード・公式Workflow JSON/ZIP・Sampling v6・既存Run/Takeは変更しません。
## ライセンス
[MIT](LICENSE)。外部コンポーネントの[ライセンス・表記](THIRD_PARTY_NOTICES.md)も参照してください。
+174
View File
@@ -0,0 +1,174 @@
a42a85fb4dda2d4100c0f87d9836429e51aad187c8d07c8338360a3016a779dc .comfyignore
c7765c1229960ae75685a8a557ccfe8cf1b58d843f1fdec29d165ddc011e7217 CHANGELOG.md
53f8300410cffd775b059f22e582e97af162d9f1b2d0ac69ad44e7a5a991ac4f INSTALL_JA.txt
c44abbd789091bbead01250dbd5453e60539d2665c69f162335fdbd2936019c2 LICENSE
5bd811b25eaa7e3906718630bedad1b171ee1d47b4957d55f61e0ad5c7115261 PACKAGE_INFO_JA.txt
c8b3ebfb8ac181e51ce62a16ec52a24ed97148eb1a784ea23fc4073d59a9e679 PACKAGE_VALIDATION.txt
3d65caf035b56a6acffb006f40cde72f0ef62b66c14795c2252c9c67cbf9c88f README.md
4d4bc762f339d64ebffe3cc4c79f520828b79d90d3a1933f96ed030d51aeacbb README_JA.md
0dbe8a5f71c92f3523942343b40787104c8b96781461ba3ba82934a6bdbe5834 THIRD_PARTY_NOTICES.md
02ea0951ce2e7ac2d5f3bbf02c596a9f9ea8adcdf2a113dca4c8db3cc19c36b3 __init__.py
7fd122ff08232e114a6ef32171217ea6324e980eb7257d560c466b8177a3d3ec audio_compat.py
3e7a1ec3380be2a222c8a3e9b8a6bb184d3a760478957f48186438f15235bdba branch_provenance.py
c1ed3a0342730450958fb62fd21854a876991f3a4aefb24e5383b0c73cd2312d compatibility.py
4d62508f900af9f93ec320afb900c27cc9a300d1e0c0a94714258498c5ede5fc conditioning.py
294251c40b1be2e296c5e5f627b68091d087bdb39179e3a0c3cebd2ee8a344f5 constants.py
cf255b8a635471229aebadc926acfdcacb65963adbcb9e0f9505d04eada2c6b5 continuation.py
51f1d211dfc36602a006fe5d14f4ebb08182694ad464aa9176340ff7e2bd1e41 decode_cache/__init__.py
647f55a9253976c059502dec13c7f64d7f7df1ecbe619d543c973f92f7f36776 decode_cache/identity.py
c2b44e3caed54c894556af547cd800328ed287a8cc90e0b5031f34bd6bd2224b decode_cache/nodes.py
986cc7a3dc153ff1b41c427a86756e505ea6e17d8b065df1ab15b8ff904f090e decode_cache/service.py
630ba3d2183964444c4341a8df507f7af61dac6a8e5aaca8cf387a5376d49f27 decode_cache/store.py
edf01a9c718ad1c3825c6036c4c3f76237c51c35dc12a1d83e435e722cbd7ef3 docs/ISSUE31_SAMPLING_SIGNATURES.md
b7ecd069d803cae7f86ad0ab89df144b5a5b157c168c73ee2962b47234d4ec0c docs/KJ_PREVIEW_OVERRIDE_V398.md
77c225d1e49e06d00b04acf811177c9a4317e792d4bfe92df539de99420c3563 docs/LOADER_PERSISTENCE_REPAIR.md
b30fe4640359bebfcdeeb94dbeec94cb346c8e3646509e1dcdb87d7021ba04ff docs/N2B_BRANCH_PROVENANCE_CONTRACT_V1.md
bce0337cce903938b6b8df7f52c5c67e2d0ee14599c693687e4180debc606db2 docs/README_HISTORY.md
9ee92cdd3783e61e3bc71b99d5c0df7dd0a9f129c8a6b37701d7001a4f745e77 docs/README_HISTORY_JA.md
cebf8462681796df807987d8afef2c78abb0953b54b2f5dcd12d583bde0ec806 docs/REGENERATE_INTENT_V396.md
bbe74f802339b758d8874900e2617dd1a46844a58e0f872d95f34b9b40ba20ed docs/RELEASE_NOTES_V3910.md
353c82a1350985c8a549fbf4dc46fc5c678f7dd8344318d00fe860fa39acf6cc docs/RELEASE_NOTES_V3911.md
49d02b7650d4a542307c9d4189dc217ba1db54c4eac959cc2e2a1ce57b501ae3 docs/RELEASE_NOTES_V399.md
91ee4adf828415e84e2f413e3a4e20dc16356f139e8ef1f6756f584cad04f3c8 docs/REVIEW_RESTORATION_REPAIR.md
4546ffb0cbaf270c52d1900908e46bfa2d3c0e2d0035ae5694680890e89aedd8 docs/TEMPORARY_STORAGE_JA.md
4c33d223a77c78e5c74946aa43f537031fd5aa415388d46fed975f9b07d53c3e docs/TIMELINE_VIDEO_EXPERIMENTAL.md
00f88cb57be5e79d9c881671bd13fa154d91843f4c1ae2f2451ee2a73841271d docs/TURBO_SAMPLE.md
92bee3f3c0c340356abdd06b4993fbf2e98cbe57e931f85cbfd11da0f7f87809 docs/USER_GUIDE.md
c3f0753bdae1c54044a6e9ad5770c45e85a306ac9c15cd363790f8625c865f94 docs/USER_GUIDE_JA.md
717577efdec5e61600504b77bc2a099ef022c4fe2333e936c3310c7182d8f2a0 docs/V38_OPEN_INTEGRATION_CONTRACT.md
3496636f645b39336fd95a4f21a562810c56f8e1d92fa6eeb1e4b0786ad11b37 docs/V38_RELEASE_AND_MIGRATION.md
4d17d74107e78404b190fec9494b443249e5aff4f58670c50d54dfdfb064334b docs/V39_REFERENCE_INLINE.md
a4705ae4b5730d2b43e29fe125a64196a031f14bcfa8702663a17aa89f683d89 docs/images/v39/v38x2-feature-summary-historical.png
ae3338f720fc22c05ab4a661c68f9c5dcb20d751a835f0e60d4738333be48e63 docs/images/v39/v39-feature-summary.png
84304d318eea6db3921d366647c6fff9ad488e8c4cfef6ca00988bfd2a6504bc docs/images/v39/v39-reference-images-node.png
b765b37502b012b462606c4d2dcef43f13950e5fd682824fb18cdb19d542c121 docs/images/v39/v39-sampler-node.png
a8c56379abe23b98c8ceed6ea5e60a02ecc3c6d9636232d7371615f4eb306e81 driving_audio.py
1b2212b7511fac0b63dfa6e9f006cd8644c72d08c6945ab0e4ed0e722c97a730 examples/MiniMax_H3_Continuum_V38X2.json
40199d2500174ba51c040d6983f88d74c4bfbaf19191e728818e6b969b869b0f examples/MiniMax_H3_Continuum_V39.json
705d1141842863b82abe26a8bb015d45eff3bc81ca5bdc53e58b464b743173c0 examples/MiniMax_H3_Continuum_V39_Turbo_Sample.json
1b2212b7511fac0b63dfa6e9f006cd8644c72d08c6945ab0e4ed0e722c97a730 examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.json
4fa8680037595f55f97715f9a2f63d28f11328a87f5c33c316cc4b0ae817e668 examples/workflows/MiniMax_H3_Continuum_V38X2+Decode_Cache_Helper.zip
1b2212b7511fac0b63dfa6e9f006cd8644c72d08c6945ab0e4ed0e722c97a730 examples/workflows/MiniMax_H3_Continuum_V38X2.json
f3d8dd0f0872afdd97fe24e58b5cb74190d03e3583a66a5d013fee41f6894cda examples/workflows/MiniMax_H3_Continuum_V38X2.zip
40199d2500174ba51c040d6983f88d74c4bfbaf19191e728818e6b969b869b0f examples/workflows/MiniMax_H3_Continuum_V39.json
f69b734b5bf19fb6db78bbe4737db0bef69c2a6cef2710f28767882ef35ec847 examples/workflows/MiniMax_H3_Continuum_V39.zip
67e81fbdd4c21a8d64fb3bedb5e495698fc8df5cdd9540c8ef5476caa76119c0 examples/workflows/MiniMax_H3_Continuum_V39_Reference_Inline.json
65689fd800a60ab6939bea020d630616b03a453cf6d48022cd1361992a765abc examples/workflows/MiniMax_H3_Continuum_V39_Reference_Inline.zip
705d1141842863b82abe26a8bb015d45eff3bc81ca5bdc53e58b464b743173c0 examples/workflows/MiniMax_H3_Continuum_V39_Turbo_Sample.json
2096e583c6805c0f6f54f76a81e0ed1246325a16d189afba0423fa05e2c19599 examples/workflows/MiniMax_H3_Continuum_V39_Turbo_Sample.zip
a344da581b3c2d77558a460d2b5256e6c9a63b5008c98b52999ceda2e0b2b767 graph_contract.py
bf0556b076dbaca67c3405a7d86c333ca7fdf3d4381529b0a9edc906519943e9 guide_timeline.py
1473c384082700f422f2cf9141e0d012d87d2b43ac8a8a433edc7172e6ca7bf6 hardening.py
23bddc5a41d2e997f4fbf789c7128e32f4f197f1405b2aef1c76794f57482446 install_windows.bat
12bf572a65d57bbc9a72b459f29691c2057768f4fb7a74f9db87f4775e995bda install_windows.ps1
139546ec1ff459945aa89b50f74b5ee69f62a0e07bbddfcae06936091a409a83 layout_adapter.py
d3e213005670e94dee33a240349a4d245cf9a3b6602099f11ed30cf5a32e2c21 media.py
1e6514845702225b36d6f993c4e37924d629449365cf67370829df3c7ffd5db6 metadata.ini
d7e613e2cc24110213b477bdd1d390234a41f2af3b1ed006a809066d71d658eb model_patch.py
ecb65a5dbf9e1683c5a3cadd82daaea3a90a2b776f6ebabfbe8b07aa93177422 nodes.py
6ba95639b52219fc37b4f51d52cf6879f75c7418a8d8815b3725b3f201a4f1e6 preview_override_provider_public_v1.json
d4cf474cbd1a98867075c45b53b2ab4d47752bb11611c916bac2a6831ca82c0b preview_override_provider_v1.json
3b7e18bd2ba50fd6c8fe71c58ca79a0bf752f362ed78b7357ce1998efc934b4b preview_override_signature.py
b470819f16fc179654dc1600721a63f0a5a14e777f4c004d574b499da6886ba5 public_api.py
4dcda05d4e3a57e7d0941876329425bf49bed01d0be08d5de05e17973bb6cc31 pyproject.toml
caa572ea65dafc86850db99f52433d360ac9c4ab36b854292a3dccd5ba32dc76 reference.py
9539f5cb9fb695841073fa58d9246d5a7410bc372f6cd340378185004dfaf978 reference_audio.py
5cb9bfd6810d3a93a637451980a4cc5c1436e5b84cfd1c7a111cd192e876351b reference_video.py
467edb2c188d024c2392aafe7423b3f835e16b10f570da76e2f7dda8a962c1c5 requirements.txt
985e7647bd2626af5df68ca702cf6ebb38cc09f3ffe0e239d3e8ef256352a5d8 run_storage.py
1227d406008ee1463d3b8f0ac50adad1b3de2062186affef751b5627d978c866 spectrum_code_audit_v1_py312.json
631807b6d9e009e60736985a4f943c4214502be3e80275410da481cab02a4ad0 spectrum_code_audit_v1_py313.json
8f786989af6339be8cec8f2bf602da89344cf96202d29c980af5c07175eea3d3 spectrum_provider_v029.json
8cdf37b165eb68462dd7accf4a1fd63043f02479f9c377778fb9d4b6feaddcc6 spectrum_provider_v029_py312.json
0efc8d65cb6f59042457ad843fe1b77a4bee45e59d3732f5c83fbc75a31ae77b spectrum_provider_v1.json
71801234f6d2e08b660803194653821ca648e5b9a0d0c3f138bc7ccc6fe9d8c6 spectrum_provider_v1_py312.json
81608cb2dff48e68b960dca2b58ce0bceb270197d9f1f44f906e3e8286bbc7eb spectrum_signature.py
3a359a0467725cc292ccb4c86cf0c3d30bb6a114d01f5345792b09ea3d45441d state.py
6056de6c0a5322a8a51ba5a114538dca2ef67788cd1afba10fedd483b95f6afa state_io.py
660a9df28c7d62ad383cda5514c48c7efcb3576f435af023040116d533a56563 storage_api.py
517662b104ab1507bb927a39f25b8503f092c2ba4c39bc277379ba9d9e31b334 storage_fs.py
daeda14d9f5338835661e6738e074a3897d936cd847fe3e78519efabbcdfd0ef storage_memory.py
53da3ac42f4a66e8adc4560049c7c8e7ada82599be8c61f0573c234342ca36ed storage_settings.py
43ec4023dc06c941e5d7a04db4b8a89fb58d744ceb986f6eb9bf534d4fdcb87b temporal.py
f218e1a93c42467c6057c5c1d04d57cc82f6331b97ec9257e4e2dfb9c831876a timeline_video.py
0bc369ee428b8a5bc8e370a81fbab427262a1fdb7805a78c442c91698d65efba tools/__init__.py
2743597d289d9eb12334d1f5cdd630497e237814ddf48b17f6f68da299c01150 tools/p20_file_backed_tensor_poc.py
aab887698f4767722c833b9e55d605f9597ab0d823e32e8c5416f26a210cab1d 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
fed4bc3cbff47bd0b16b6e99385680dc2253c745f30b7f686afafbb25f77efb1 v2/motion.py
de47a847ba27390df542086735a926d2812d77ad05b21ccc2e67633d4ffd11b0 v2/nodes.py
dc2b901789e4b024dbcbc4024c63eb8cbc564d77003ce8c35c0584851ba6dfbd v2/prompts.py
4080f1875b958b316e8e76852c4be5527a6de5c71d604e7642d3098478eb4a36 v2/sampling.py
2fd811794c4cc0f2ce050250b80484876454926b9f20fce6af3a97d728e5acdf v2/seam_guard.py
be0d8585fa57e0ccd6d02577bbc7299629e5bfe20e186747f571fccc98b67d7e v2/seam_types.py
12cfcc0c71ca087fe39a5ce2922959a62b2bb311bfe664f05c4480affce03708 v2/seeds.py
0de733c55bb61e69d48918eb5bc91318fc7cf3af383fb8937522ced9df018c47 v2/sequence.py
3ea23dbce6fcd217b6e81235855479b9b16fed7a21693cf156f9014555c4fe13 v2/session.py
13213e7709fd02bb810af3c18e4cd7d010f8cdfb121a4b99866a9f2333331089 v2/session_io.py
78c830cdf49034c6e3b2cd3da5914d5cfc5638eb63ec6dbd1bab13c50d6d4caf v3/__init__.py
ea2922567df90436dd6fa21696833a49dd0cbfeee142a5fedc3a7c303824d473 v3/adaptive_continuity.py
7815230e0a9540bc2edeaf818e940b7a1fdd817fd217ba8a4f9cb21aaf6a308e v3/assembly.py
70bec17d0dce1873b9bb4a51b09daf76833722ce89f005a22b029533a367e62b v3/assembly_v35.py
3f62fdb35e804f42d7cbf0828b4e87e69a2b99246c3f7467fe4fa698f1d803c9 v3/conditioning_bridge_nodes.py
6403c2bde3fc0b8cddef78567f663fddb48130628f4c9258fcd679c28fd0cf13 v3/driving_nodes.py
147a1d3fc5e09b323a4c3d13d30e432410389bae52b58330462375b9f307b791 v3/easy_audio_nodes.py
64b3e54b42e5156642f9957ccc374fd190d9fc7145637984e702534fb1bf80b4 v3/easy_image_nodes.py
ac859cb1a6e23b8ceae300d818c24fe1346b649a0d663017a9b3ac64aa96fca3 v3/easy_nodes.py
11e9daa45237392ac84ac1b54b3e8d5e980e77102779831824794a2a6675500b v3/easy_video_nodes.py
fe03ae0aa0dbbbe5f950bb7da34c18a078d841547992c374ea8beda5e3ad4715 v3/execution_planner.py
69bf49d0601edbe51730b9d409b1cde647feabde0bde561e416b0b472a27f4e6 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
4a48f74584d8ba3187e1accc31ae5acd3a2ffb9a491bb4f5ca43322db418e770 v3/node_facade.py
f2779a7453a84dec8b993cf044e69ec90da6fe86940a73181234b5000f5a8fa4 v3/nodes.py
a3411c7a295308d21623551cf4aeca5bef511eb5f063f31ac84032e3bdf4e16d v3/packed_row_planner.py
b7c4a35a5e73f528492bc6946b97b687c412f1d3f5f976c19d45c6dc20288c9a v3/pixel_vae_resize.py
7e8681bc1ca1633389e1af1ab14100338d23a047f96c59c19151acbbfae5c108 v3/plan.py
0e3dd69d6d2bec6d9491c2fb806c25f0c62629b1eb5f9e4f77ae8d27a5b19cfc v3/planning_types.py
ec71e3965f445756d54d005c0e27bea520e26dbac44e1ee3d3867bfe2da100b0 v3/ref_encode_cache.py
8b9c1cadf76e2c2425d6bf8a5783ced593a75f83a6b3f219a0f870b4c177e058 v3/reference_effective_plan.py
b64f4d3d9547ac00f8edb2155109476df5b8baea730fb94e8b5bfca6d11564e6 v3/reference_images_v39.py
4cc53a322960373949cc4e86a3102c04d3dce4dfac00f7cc62b01cf637775b62 v3/reference_plan_inspector.py
196d1b6f4a73c4fb8669e9c399ffae526bd74765f96fbf5340c780f4331e5594 v3/reference_routing.py
1366da221237853eddc9e4b724d4c28917868ea32607dd086361a84df052cfde v3/reference_runtime.py
4fb950bbdc7cdb55365fde373ee190af6cdf99f7ce4c54ef73b94f0aca4e1fda v3/reference_storage_contract.py
057921bf2b05e88c2cbc08c16e2ac483aea905b8a144fbadf4a21d6ae8252427 v3/reference_video.py
8d6cd0d7f507fd6c2d33667a6ea205e131d47571444abc94d529a98748a52517 v3/refine_context.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
ae909b43ad17934c85881d3b0bea81e7b45c215eeb4d1f9f6a9ea72faf633ddf v3/reliability_v38.py
520a4ae849f83450855ce0023c582db5f91d29d8694a99aa8cf491351c837cff v3/resolution.py
3f03d8659305d2def41939205d21cdc6f35e32943274e87afe539d15b9635f9b v3/review_control.py
be6610fb9427546d9485a17015cfbdc8786715e6a0967f3e4c1dee35d8768385 v3/runtime_coordinator.py
d0a004aa3030c8adaa5ea788f9acc758fcb4a556f203f9a3f63fa4e4b5772063 v3/sampling_engine.py
97fcb293e0714c3a74b89f08e11c21dce45d25a3010948be1af9dc059d288187 v3/second_pass.py
452022107cea233aa84d5366ec4943ac5aadbd5fcf786113f1d542a641eac8f7 v3/second_pass_nodes.py
6e71e944313339f14e14e11cec682593159ca5542aa5d38095371da781d60224 v3/targeted_refine_sampling.py
5a044bdd70c546e4446e0c26af92aae88049ffa2e0e2d01b52033a83a3152d0e v3/targeted_second_pass.py
26b13614ba0a5fd8b192a106c9503b2f4b6fe7f9268a0fcb0f544979a49cab34 v3/video_adapter_nodes.py
2f07ace1462644f0bee553827b3571535de4d0c2d9ef847bd9e0ca73a4eed5cb v3/video_seam.py
4178dcfa442abdb06ce276e05bd7bcbaa6da28469ba5e57d3da3c663de4e4a9d v3/video_seam_v35.py
755a4d8b3ce66e94efea1a23e45ff6702042931c417c337ed35273c7e19e7c12 version.py
b935ad3bb729948bb3890ce967b0ecbef737a5e51ddfc47a0060fc20aa78dcda video_reference_modes.py
685df8e0fa23e3663ab31da1e4470cd19bdaa0dc16362cb606e874d9d6153c2c web/decode_cache_helper.js
fefafd4550511d80bd85ade46a0476f0cf3de13ddb94a908dff6b175f2a0e199 web/easy_bypass_toggle.js
092088096307d33ac016b82b4774ca38845a2ff2f63b97ac6da8c5aca4fea413 web/easy_load_audio.js
9db0aa94f634578a962d5db49e5c70356040a59df968e3a2e531b327a623081f web/easy_load_image.js
35090816ba7470a7255eb85d003b7e79f8a0065982dacf98a18f41c8ebff655d web/easy_load_video.js
0c68d13a1f8beb7431a32b471f8b0612c42fcc4bf72dd97611a025d158008662 web/easy_v38.js
933b5c675294a20ccec263916a1f4453d5b06a530d660ad8e56389d02d7f3023 web/project_id.js
ae59273f163a116ece418957c557c4fd8c3285e3c60814679b9361d2e6e6fa02 web/reference_audio_ui.js
46c9f75c9462bf26300332448f4431cca801f38964ca0a49bc2c50a88a7cc40f web/reference_image_ui.js
e99c74b78da1aa18be61cb053fa05e5abd106caa5eb5c814cf585786aae1e7f8 web/reference_images_v39.js
42afab2241d39c1b07ff33d8b1370d4b0f729d81e53b4c99f4bc54c6a96b8800 web/storage_settings.js
bf41bf08dd0504eb753fa5781e6c2b8c1285758ad4bb7309975bb9231d5f8e41 web/video_reference_mode_ui.js
+12
View File
@@ -0,0 +1,12 @@
# Third-party notices
H3 Continuum Join interoperates with, but does not bundle source code from:
- ComfyUI native MiniMax H3 implementation
- ComfyUI-Spectrum-MiniMax-H3
- ComfyUI-SolAttn_triton
- SageAttention / ComfyUI-KJNodes
The package calls public ComfyUI sampling, VAE, ModelPatcher wrapper, NestedTensor, and native H3 payload/layout contracts. Optional accelerators must be installed separately and remain governed by their own licenses.
This package was independently implemented. No source files from the optional accelerator repositories are included.
+214
View File
@@ -0,0 +1,214 @@
# Public development log
## 3.9.11 — Spectrum loaded-code audit stability
Retain the legacy marshal audit and its four metadata files. If only function
code digests differ, compare complete loaded descriptors using fixed typed-code
profiles for Python 3.12/3.13 and the two already-audited provider source sets.
Validate profile provenance against the original metadata digest and full source
set; do not generate profiles, import providers or learn identities at runtime.
The supplemental audit never enters the stored contract. Preserve safe v6 Take
reuse and unsafe/v5 read-only history, with no workflow or storage migration.
Targeted browser/GPU checks passed with audited local Spectrum + Kitchen
Attention: enabled Review buttons, Chunk 1 retained, Chunk 2 generated, one
reused / one new; both AV outputs fully decoded. Generation completed without
execution errors or OOM. Separate third-party MP4 menu-thumbnail HTTP errors
were avoided by disabling Show Image On Menu, without product code changes.
See docs/RELEASE_NOTES_V3911.md for exact scope and remaining limits.
Full CPU/JS gate: 2,139 passed / 2 skipped / 2 existing Inspector expected failures,
with zero unexpected failures or CUDA initialization attempts. Python 3.12
component checks: 155 passed / 1 skip, excluding 21 tests tied to the older
Core's independent Attention limitation. Real-Core observer/storage fixtures
matched 53 expected reuse/refusal decisions and the production JS predicate.
Four normal pre-repair v6 Takes retained full contracts and reused Chunk 1;
unsafe/v5 histories stayed read-only. Both supplemental profiles reproduced
byte-for-byte with reverse import order. Compile/offline registration passed.
## 3.9.9 — KJ Preview Override / Review continuation
Fix new-Run v6 read-only with the separately audited upstream KJ profile, and
show saved reasons when reuse is unavailable. Keep the original local profile,
Sampling v6 guards, old Takes and official workflow bytes.
CPU: **2,075 passed / 2 skipped / 2 known expected failures**, plus overlapping
90-case JS coverage. Upstream KJ GPU and normal-ComfyUI browser Continue both
passed: **Chunk 1 preserved, Chunk 2 generated, one reused / one new**; all four
AV outputs fully decoded. Browser checks used the existing local KJ profile.
These are targeted repair checks, not general quality or all-provider acceptance.
Restart ComfyUI and hard-refresh after updating. On Preview Override, disconnect
optional VAE/Audio VAE and set Tiny VAE `none`; retain generation VAEs. Correct
unsupported settings before starting a new Run. Old unsafe/v5 Takes remain
readable and are not automatically made reusable. No workflow rewiring or Take
deletion is required. [Full release notes](docs/RELEASE_NOTES_V399.md).
## 2026-10-16 — V3.9 Turbo Sample
Add the user-supplied sample separately: Auto, 2 x 8s, multiline image-anchored
dance prompt, fixed background/camera, Thai rap and one enabled Turbo LoRA.
Preserve the supplied 6-step/Draft settings and document their unverified pairing
with the 4-step/768p LoRA. Fresh workflow/project IDs avoid user Run identity reuse;
remove misleading auto-download metadata for the saved custom model. Standard
workflows, existing Takes and runtime code stay unchanged. No new GPU validation,
runtime deployment, release or Registry publication is included.
Local CPU checks: 17 passed, zero CUDA initialization attempts. Workflow link
consistency, gallery/ZIP bytes, saved settings and both manifests were checked.
## 2026-10-16 — Japanese README organization
Align the Japanese README with the compact English entry point, including exact
model/VAE/text-encoder downloads, model folders, external node links and optional
Turbo guidance. Keep current compatibility and known limitations explicit.
Move all former Japanese detail and ten image references into USER_GUIDE_JA.md
and README_HISTORY_JA.md, preserving historical context and rebasing links.
Include these text guides in the Registry selection and update both manifests.
English documentation, product code, images, official workflows and existing
Runs/Takes remain unchanged. This is local documentation work, not a new release.
Local checks: 5 existing tests passed, 95 relative file/heading links resolved,
all ten original image references and original detailed text were retained, and
both manifests matched (464 source entries / 162 Registry entries). The Japanese
README is 247 lines instead of 801. Its 18 external destinations match English.
No CUDA initialization, runtime deployment, commit or push was performed.
## 2026-10-16 — condensed README and retained reference material
Organize the English README as a short installation and operation entry point.
Keep the version heading, fixed-version downloads, getting-started video, Review /
regeneration steps, history safety and bounded v3.9.8 compatibility/known limits.
Move the former detailed controls and screenshots into docs/USER_GUIDE.md, and
release/legacy implementation material into docs/README_HISTORY.md; retain all
original sections and image assets, with rebased links and historical context.
Follow-up: list the template-selected H3 diffusion model, text encoder, Video/Audio
VAEs with provider downloads and ComfyUI model folders. Link Spectrum, KJNodes,
rgthree and optional task-matched LightX2V Turbo LoRAs. Explain the saved INT8
Video VAE versus old FP16 download metadata without altering workflow bytes.
Include the two text references in the Registry selection and update both source
manifests. Product code, Japanese README, official workflows, stored Takes,
release tags/assets and runtime deployment are unchanged by this documentation work.
Local documentation checks: 5 existing tests passed; all 143 relative file/heading
links resolved, all 39 original image references were retained, and both manifests
matched (462 source entries / 160 Registry entries). README is 267 lines, down
from 1,574. No code, workflow, image or Japanese README changes were made.
## 2026-10-16 — published v3.9.8 GPU recheck documentation
Record a fresh GPU recheck after deploying and restarting the exact published tag `58fbd855`: PyTorch/KJ and Comfy Kitchen INT8 + audited local Spectrum/KJ each passed separate-Queue Chunk 1 to 2 continuation. KJ retained images, contracts and original Chunk 1 stayed equal, and all four AV outputs decoded. Existing Takes/workflows were hash-protected. README and Release notes distinguish this published-tag result from the earlier candidate gate and retain exact provider/no-preview-VAE/Tiny-none scope plus browser, quality and performance limits. This is a documentation-only main update; the original v3.9.8 tag and package assets remain unchanged.
## 2026-10-16 — package 3.9.8 / KJ Preview Override Phase A
- Audit the actual KJ Preview Override file, SHA-256 `d07c8e5ff7d7abd3e31acefe2cf29f618b5da5341b3b434e72ec2ac0953230b0`, rather than accepting KJNodes 1.5.2 by version alone. Pin sibling helpers and Core preview/dispatcher source, then compare loaded code/defaults/classes without importing or executing the provider during observation.
- Add a dedicated adapter only at `outer_sample/kj_preview_override`. Preserve all fixed wrapper settings and Core's key/list order. Ignore only the exact builtin transient `frames` list after the provider audit; preserve the generic no-KJ observer and all other reuse guards.
- CPU scope covers real-provider frame changes, reconstruction, fixed-setting/order changes, monkeypatch/source rejection, VAE/Tiny VAE exclusion, combined Attention/Spectrum identities, saved prefix bytes and old unsafe history. Full real-Core CPU gate: 1,995 passed / 3 skipped / 2 existing Inspector expected failures / zero unexpected failures and CUDA initialization attempts; the 48 dedicated KJ tests passed without skips. Normal ComfyUI GPU acceptance passed four Core-API Queues: PyTorch and Comfy Kitchen INT8 + the audited local Spectrum implementation, each with separate-Queue Chunk 1 to 2 continuation and held preview images. Both second Queues reused one chunk and generated one; original Chunk 1 bytes and contracts were unchanged. All four video/audio outputs fully decoded. See docs/KJ_PREVIEW_OVERRIDE_V398.md for exact support and limits. GitHub main/tag CI, Release asset integrity and Registry status are separate publication checks.
## 2026-10-15 — package 3.9.7 / linked-input regeneration cache
- Keep Full Run automatic variations reachable when Core leaves linked Chunks, Nonce, storage, regeneration boundary or generation mode unresolved during cache-key evaluation.
- Validate the actual chunk range at execution, and retain stable caching for known ordinary Full Run, storage OFF and directly specified fixed nonces. An unresolved external nonce conservatively reevaluates the node; Run Storage still owns prefix reuse.
- Keep Sampling Contract v6, Take protection, public schemas and official workflows unchanged. Add direct-input and real-Core cache regressions for both V3.8 and V3.9.
## 2026-10-15 — package 3.9.6 / regeneration intent and automatic variations
- Separate saved manual regeneration intent from the legacy stale Chunk 1 / nonce 0 state. Retain earlier unmarked later-chunk/fixed-nonce settings, and clear intent metadata when Auto or a one-shot restart consumes it. No widget order or API inputs change.
- Bypass Core output caching only for Full Run explicit regeneration with Run Storage on and automatic nonce 0. Run Storage remains the authority for compatible prefixes, interrupted variations and new completed variations; its Sampling v6 checks are unchanged.
- Add restored-workflow Queue cases for both public Samplers and a CPU-only real-Core cache lookup gate. Keep historical unsafe/v5 Takes read-only and official workflow bytes unchanged. Full CPU gate: 1,908 passed / 2 skipped / 2 known Inspector expected failures; zero unexpected failures and CUDA initialization attempts. Normal ComfyUI browser save/reload retained Chunk 2 / nonce 5 and Chunk 1 / nonce 0 after history loading. Five new-Run GPU queues passed continuation, Chunk 2 regeneration and two identical Full Run / nonce 0 submissions; earlier Chunk 1 bytes were preserved. GPU scope: PyTorch, Spectrum OFF, 512x512, 8-step Turbo; all five media outputs fully decoded. See docs/REGENERATE_INTENT_V396.md. GitHub main/tag CI, Release asset integrity and Registry status are verified separately during publication.
## 2026-10-15 — package 3.9.5 / Issue #31 publication
Main Linux/Windows CI passed. Correct the tag-presence probe to branch on the API exit status: a missing-ref error body must not be treated as an existing commit SHA. Product code and accepted GPU signatures are unchanged.
Consolidate the Attention fix and finite Spectrum binding adapter on the exact 3.9.4 public source tree. Add a separate audited upstream Spectrum 0.2.29 profile without changing existing local-provider identities. Keep old unsafe history, public node IDs, contracts and all official workflows. CPU/GPU and publication checks are recorded separately in docs/ISSUE31_SAMPLING_SIGNATURES.md.
## 2026-10-14 — Issue #31 Phase 1, unpublished
- Final standard CPU validation: 1,777 passed / 1 skipped / 2 existing Inspector expected failures; no failures. All three standard commands recorded zero CUDA initialization attempts. Native PackedLayout, prompt planning and twelve-node registration checks passed.
- Limit production edits to the MODEL attention signature adapter in run_storage.py. Use already-loaded Core registries and implementation bindings; never import Core/Kitchen or execute an attention kernel during observation.
- Include both container functions and provider implementations/state without persistent addresses. Keep unrelated v6 signatures and every existing reuse guard; do not rewrite old unsafe manifests or raw files.
- Add real-Core CPU signature, clone/recreation, separate-process/hash-seed, mutation detection, prefix reuse and history immutability regressions. Kernel registration in CPU fixtures is structural evidence, not INT8 execution acceptance.
- GPU Review continuity, Spectrum/KJ execution, browser behavior and reporter-exact reproduction remain separate. No public node, official workflow, installed runtime, package version, commit or release changes.
## 2026-10-14 — package 3.9.4 Registry packaging repair
- Reconcile the actual Registry ZIP with its declared Manifest: include the Review restoration guide and exclude prompt-authoring source files.
- Add an exact archive file-set, CRC and hash gate before Registry upload using the same pinned publishing CLI. Preserve runtime code, public node IDs, workflows and saved data.
- Publish 3.9.4 as a separate version; keep prior GitHub tags and assets unchanged. Registry scan approval and real Manager installation remain independent of upload success.
## 2026-10-13 - 3.9.3 storage panel failure handling
- Reproduce the initial panel failure with an empty HTTP 404. Startup logs identified a stale process retaining the configured address/port while the updated backend failed to bind; the new frontend could still be served from updated files.
- Keep Core's request address, base path and user/auth handling. Add explicit HTTP/invalid-response guidance, an initialized full-width storage candidate field, safe disabled mutation controls and manual recovery without reloading the page. Do not retry save or cleanup automatically.
- Keep the backend and generation contracts unchanged. Core 0.39.0 CPU regression passed 1,740 cases with 2 skips and 2 existing expected Inspector failures; CUDA attempts were zero. The frontend 1.53.10 browser gate passed empty-response diagnostics, manual recovery, save and cleanup at an alternate host/port. See PACKAGE_VALIDATION.txt for scope.
## 2026-10-13 — package 3.9.3 temporary storage
- Re-review the scratch storage proposal against actual Finalize, Decode Cache and Core settings lifecycles. Implement server-side settings with revision checks, queue coordination, immutable directory identities and no silent disk fallback.
- Add read-only status and explicit cleanup paths. Preserve live aliases and unknown owners; track detached helper disk entries using only metadata and weak leases.
- Add a ComfyUI settings panel without draw-loop scans or periodic polling. Keep existing workflow controls and node registration.
- Add CPU, real HTTP and filesystem regressions plus a Windows-focused CI storage gate. The real-Core CPU candidate passed 1,740 cases with 2 skips and the 2 existing Inspector expected failures, without CUDA initialization. Standard compile/runtime and actual Core/frontend settings save/reload/cleanup checks passed. All 25 JSON/ZIP assets retain their bytes; see PACKAGE_VALIDATION.txt for scope and platform limits.
## 2026-10-13 — Issue #30 frontend hotfix, package 3.9.2
- Limit production changes to baseline-free Review snapshot skipping, one Reference selection notification per connected Sampler, and dimension checks before resizing the Reference helper. Align package metadata and current public guidance with 3.9.2; retain 3.9.1 records as history.
- Keep Review drawing-time upstream monitoring when a baseline exists and fresh synchronous Take/Queue checks. Preserve native callbacks, immediate saved assignment values, public widget/socket order and official workflow bytes.
- Add frontend regression coverage for upstream widget/link edits, rapid Reference selections, All/Off with future assignments, helper reconfiguration and independent helpers/Samplers. Track the independent Inspector reconfigure bug at 2 and 100 passes with explicit expected failures; one-pass refresh must succeed.
- Browser checks use isolated Chromium DOM and graph fixtures without generation. Full ComfyUI canvas, mobile performance and live workflow acceptance remain separate checks.
- Validation: 1,703 CPU/JavaScript regression cases passed, 2 skipped and 2 expected failures for the independent Inspector bug; zero CUDA initialization attempts. Offline runtime planning and twelve-node registration passed. In isolated Chromium, 600 baseline-free draw callbacks made zero snapshots (previously 600); 30 connected Reference checks notified the Sampler 30 times (previously 60), with zero same-dimension resize calls (previously 30). DOM rebuilds remain, and mobile freeze resolution is unconfirmed.
- Final 3.9.2 candidate CPU gate passed 1,703 cases with 2 skips and 2 explicit Inspector expected failures. The actual Core/frontend/LiteGraph browser smoke passed checkbox interactions, Prompt/link/Bypass edit/restore and native assignment graph reload without submitting a prompt. This desktop headless/model-free check is separate from UI file-save, mobile hardware and stored-Take acceptance.
## 2026-10-04 — V3.9 stability patch, package 3.9.1
- Preserve Second Pass audio/mixed-keyframe conditions and inherit the conditioning and References belonging to the selected Review output.
- Strengthen Take compatibility with Sampling Contract v6 / Graph Contract v4. Retain old v5 history without adopting its prefixes into new generation.
- Align Review Driving Audio with the original physical-group time range. Prefer Core audio resampling and document the same-object VAE mutation/cache limitation.
- Keep public V3.9 node IDs, official workflows and stored State/Session formats unchanged. LoRA Plan is not part of this patch.
- Full CPU validation: 1,696 passed / 1 skipped / no failures, with zero CUDA initialization attempts. Offline layout/planning and twelve-node registration passed.
- Targeted Review Second Pass and integrated generation/reuse GPU checks passed. Browser acceptance remains pending; optional latent-upscale artifacts remain a separate issue.
- Put the patch summary and v5-to-v6 restart instructions at the beginning of both language READMEs.
- Replace workstation paths and private operational history in public documentation with portable instructions and public validation summaries. Original development records are preserved outside the publication checkout.
- Mark the eighteen real-Core integration cases as dependency skips in standalone CI when ComfyUI Core is absent. They still execute with Core installed; broken Core dependencies remain test failures. Production code is unchanged.
- Release-preparation checks for the affected tests and package metadata: 66 passed with real Core; 48 passed / 18 dependency skips without Core. Both CPU gates had zero CUDA initialization attempts.
- GitHub Actions confirmed 1,676 passed / 21 skipped / no failures in standalone CI. Eighteen skips require real Core; the remaining three reflect existing platform/fixture limits. Prepare the versioned GitHub Release with English/Japanese repair and migration notes; Registry publication remains separate.
- Reconcile PACKAGE_VALIDATION.txt, PACKAGE_INFO_JA.txt and docs/VALIDATION_JA.md with package 3.9.1, the actual CPU/CI scopes, v5 migration and Release status. Retain the original V3.9.0/V2 text under explicit historical sections. Documentation corrections follow the fixed v3.9.1 release tag on main; runtime and official workflow bytes are unchanged.
Earlier product behavior is described in CHANGELOG.md and the historical Release/tag versions. This log contains public engineering summaries rather than private operational records.
## 2026-10-13 — Prepare 3.9.3 versioned downloads
- Add 3.9.3 and retained 3.9.2 Release, custom-node ZIP and checksum links to the current English/Japanese guides. Update the installation heading to 3.9.3 and retain the implemented settings screenshot and historical validation records.
- Refresh Registry then development manifests from saved bytes. The existing release-metadata/public-surface CPU gate passes 8 tests with zero CUDA initialization attempts; all 25 tracked JSON/ZIP assets retain their bytes.
- Product code, package metadata, public schemas and saved-data contracts are unchanged. GitHub Release/asset and Registry publication are verified separately; no new GPU, long-form performance or physical SSD-write validation is claimed.
## 2026-10-15 — Issue #31 Spectrum binding identity candidate
Added a dedicated, fail-closed Spectrum binding adapter without changing the generic observer, Sampling v6, runtime signature v1, Graph v4, public nodes, workflows or package version. The immutable config fields and audited source/loaded-callable contract identify generation; reviewed runtime history, counters and profile caches do not change persistent identity. Unsupported structures, additional attributes and altered implementations remain non-reusable. Existing unsafe Takes are preserved without migration. CPU and GPU evidence are recorded separately; no commit or publication is authorized.
Issue #31 Phase 3 validation: the final standard CPU entry point passed 1,834 tests, 1 skip and 2 existing expected Inspector failures, with zero CUDA initialization attempts. The 57 new Spectrum tests cover all 27 config fields, transient-state/process stability, implementation/extra-state refusal, unaffected v6 contract identity and old unsafe Take protection; the 36 Phase 1 attention tests also pass. Under one audited local provider implementation, both PyTorch+Spectrum and Kitchen+Spectrum persisted new Chunk 1 Takes and reused them from a separate Queue to generate Chunk 2, with unchanged prefix hashes, identical safe contracts and fully decodable 10-second AV output. This is a targeted local GPU gate, not acceptance of other providers, KJ, browser behavior, subjective quality or benchmarks. No commit, push or publication occurred.
## 2026-10-20 — External Chunks Reference assignment table candidate
Only the V3.9 Reference Images helper presentation changes: external Chunks links make the destination count unresolved, expose assignment range 1–16, and label All/Off with that range. Direct counts retain the existing table. The frontend does not resolve arbitrary upstream values or alter native Chunks, saved selectors, Sampling identity or stored Takes. Added 21 JavaScript cases and four public-input CPU cases cover stale widget counts, zero/unrestored links, multiple Samplers, range actions, future assignments and callback stability. Existing CPU coverage passed 310 tests with two known Inspector expected failures; the four added CPU cases and metadata checks also pass. Targeted browser acceptance passed for external INT with stale widget values, live disconnection/restoration, actual KJ Set/Get routing, all-page All/Off actions, saving/reloading and workflow tab switching. The candidate display code was deployed to the chosen runtime and reloaded without restarting its backend. Existing saved Takes and workflows were preserved. No GPU generation, commit, push or public release occurred.
## 2026-10-20 — Spectrum source/runtime audit portability candidate
Normalize CRLF to LF in Spectrum provider-file and module-closure source checks. Add fixed Python 3.12 profiles generated from the same hash-verified 44-file and upstream 0.2.29 55-file sources. Retain the original Python 3.13 profile bytes and valid identity descriptors. Unknown code, file sets, closures and runtime extensions remain non-reusable; unsupported Python runtimes are not promoted. Old unsafe/v5 Takes remain readable without conversion, and public nodes, Sampling v6, Graph v4 and official workflows are unchanged.
The full standard CPU/JS gate passed 2,096 tests with two skips and two existing Inspector expected failures; compile and offline runtime verification passed with twelve public nodes. Targeted Spectrum/Attention coverage passed 169 tests with one legacy-profile skip. Python 3.12 component coverage passed 112 tests with one legacy-profile skip, checking all 27 configuration fields, code/state refusal and newline parity; 21 independent older-Core/Attention cases were outside that component gate. Separate-process storage checks passed 16 PyTorch/Kitchen cases on Python 3.13 and eight Spectrum/default-model cases on Python 3.12. Actual Take read-only JavaScript agreed with all 24 storage results, and all six previously valid complete Sampling Contracts remained identical. No CUDA initialization, new GPU generation, browser acceptance, commit, push or publication is claimed. The older Core/Kitchen observation limitation remains separate from Spectrum recognition.
## 2026-10-20 — 3.9.10 publication preparation
Prepare the tested Spectrum audit portability and Reference assignment display
repairs as the next 3.9 patch. Use SemVer 3.9.10 for GitHub and Registry while
reserving 4.0 for the major update. Preserve existing 3.9.9 and historical tags,
assets and official workflow bytes. Publish CPU/browser scope explicitly without
claiming new GPU acceptance. Version metadata, release workflows and package
manifests identify the same candidate; public asset and CI checks follow upload.
+32
View File
@@ -0,0 +1,32 @@
"""H3 Continuum — native MiniMax H3 chunk continuation."""
from __future__ import annotations
import logging
WEB_DIRECTORY = "./web"
# ComfyUI loads custom-node folders as packages. Standalone test collection may
# import this file as a top-level module; keep that path inert because ComfyUI is
# intentionally not a unit-test dependency.
if __package__:
from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
from .temporal import run_temporal_self_test
from .version import PACKAGE_VERSION
from .storage_api import register_routes
register_routes()
try:
run_temporal_self_test()
except Exception as exc:
raise RuntimeError(f"H3 Continuum Join self-test failed: {exc}") from exc
logging.getLogger("h3_continuum_join").info(
"H3 Continuum %s loaded (V2 integrated sampler + hidden legacy workflow compatibility)",
PACKAGE_VERSION,
)
else: # pragma: no cover
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS", "WEB_DIRECTORY"]
+29
View File
@@ -0,0 +1,29 @@
"""Use Core audio DSP; retain the existing adapter for older Core versions."""
from __future__ import annotations
import importlib
def resample_audio(waveform, source_rate: int, target_rate: int):
if source_rate == target_rate:
return waveform
try:
core_audio = importlib.import_module("comfy.audio")
except ModuleNotFoundError as exc:
if exc.name not in {"comfy", "comfy.audio"}:
raise
core_audio = None
core_resample = getattr(core_audio, "resample", None)
if core_resample is not None:
# Errors from an available Core API are real errors, not API absence.
return core_resample(waveform, source_rate, target_rate)
try:
torchaudio = importlib.import_module("torchaudio")
except ModuleNotFoundError as exc:
if exc.name != "torchaudio":
raise
raise RuntimeError(
"Audio resampling requires comfy.audio.resample or legacy torchaudio"
) from exc
return torchaudio.functional.resample(waveform, source_rate, target_rate)
+222
View File
@@ -0,0 +1,222 @@
"""Pure Branch Provenance Contract v1 helpers.
The contract describes immutable physical-group revisions independently from
the sampling contract that produced their tensors. A display label such as
``Take B`` is deliberately not persisted as identity.
"""
from __future__ import annotations
import hashlib
import json
from collections.abc import Iterable, Mapping
from dataclasses import dataclass
from typing import Any
BRANCH_PROVENANCE_VERSION = 1
TAKE_ACTION_AUTOMATIC = "Automatic"
TAKE_ACTION_USE = "Use This Take"
TAKE_ACTION_CONTINUE = "Continue From Here"
TAKE_ACTION_OPTIONS = (
TAKE_ACTION_AUTOMATIC,
TAKE_ACTION_USE,
TAKE_ACTION_CONTINUE,
)
class BranchProvenanceError(ValueError):
"""Raised when persisted branch ancestry is ambiguous or inconsistent."""
def _canonical(value: Any) -> str:
return json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=True)
def _hash(value: Any) -> str:
return hashlib.sha256(_canonical(value).encode("utf-8")).hexdigest()
@dataclass(frozen=True)
class PhysicalGroup:
start: int
end: int
physical_group: int
def as_metadata(self) -> dict[str, int]:
return {
"start": self.start,
"end": self.end,
"physical_group": self.physical_group,
}
def physical_groups(*, chunks: int, terminal_merge_enabled: bool) -> tuple[PhysicalGroup, ...]:
if isinstance(chunks, bool) or not isinstance(chunks, int) or chunks < 1:
raise BranchProvenanceError("chunks must be a positive integer")
if type(terminal_merge_enabled) is not bool:
raise BranchProvenanceError("terminal_merge_enabled must be a boolean")
if terminal_merge_enabled and chunks < 2:
raise BranchProvenanceError("Terminal Merge requires at least two chunks")
terminal_start = chunks - 1 if terminal_merge_enabled else None
groups: list[PhysicalGroup] = []
chunk = 1
while chunk <= chunks:
if terminal_start is not None and chunk == terminal_start:
groups.append(PhysicalGroup(chunk, chunks, chunk))
break
groups.append(PhysicalGroup(chunk, chunk, chunk))
chunk += 1
return tuple(groups)
def _record_identity(record: Mapping[str, Any]) -> dict[str, Any]:
entry = record.get("entry") or {}
return {
"sequence_index": int(record.get("sequence_index", -1)),
"storage_revision_id": str(record.get("storage_revision_id", "")),
"filename": str(record.get("filename", "")),
"file_size": int(record.get("file_size", -1)),
"file_sha256": str(record.get("file_sha256", "")),
"seed": int(record.get("seed", entry.get("seed", -1))),
"prompt_hash": str(record.get("prompt_hash", entry.get("prompt_hash", ""))),
}
def make_group_revision(
*,
parent_revision_id: str | None,
group: PhysicalGroup,
variation_nonce: int,
created_utc: str,
storage_revision_id: str,
generation_contract_sha256: str,
lineage_sha256: str,
records: Iterable[Mapping[str, Any]],
branch_cut: Mapping[str, Any] | None = None,
) -> dict[str, Any]:
if not isinstance(group, PhysicalGroup):
raise BranchProvenanceError("group must be a PhysicalGroup")
nonce = int(variation_nonce)
if nonce < 0 or nonce > 0xFFFFFFFF:
raise BranchProvenanceError("variation_nonce is outside uint32")
record_values = [_record_identity(record) for record in records]
expected_positions = list(range(group.start - 1, group.end))
if [record["sequence_index"] for record in record_values] != expected_positions:
raise BranchProvenanceError("physical group records are incomplete or non-atomic")
if not all(record["storage_revision_id"] for record in record_values):
raise BranchProvenanceError("physical group record source is missing")
seed_identity = _hash(
[
{
"sequence_index": record["sequence_index"],
"seed": record["seed"],
"prompt_hash": record["prompt_hash"],
}
for record in record_values
]
)
identity = {
"branch_provenance_version": BRANCH_PROVENANCE_VERSION,
"parent_revision_id": None if parent_revision_id is None else str(parent_revision_id),
"group": group.as_metadata(),
"variation_nonce": nonce,
"seed_identity": seed_identity,
"storage_revision_id": str(storage_revision_id),
"generation_contract_sha256": str(generation_contract_sha256),
"lineage_sha256": str(lineage_sha256),
"records": record_values,
}
revision_id = _hash(identity)[:24]
result = {
"revision_id": revision_id,
**identity,
"created_utc": str(created_utc),
"revision_order": f"{created_utc}|{revision_id}",
}
if branch_cut is not None:
result["branch_cut"] = {
"selected_revision_id": str(branch_cut.get("selected_revision_id", "")),
"after_physical_group": int(branch_cut.get("after_physical_group", 0)),
}
return result
def validate_group_revision(value: Mapping[str, Any]) -> dict[str, Any]:
if not isinstance(value, Mapping):
raise BranchProvenanceError("group revision must be an object")
if int(value.get("branch_provenance_version", -1)) != BRANCH_PROVENANCE_VERSION:
raise BranchProvenanceError("group revision provenance version is unsupported")
group_value = value.get("group")
if not isinstance(group_value, Mapping):
raise BranchProvenanceError("group revision physical group is missing")
group = PhysicalGroup(
start=int(group_value.get("start", 0)),
end=int(group_value.get("end", 0)),
physical_group=int(group_value.get("physical_group", 0)),
)
if group.start < 1 or group.end < group.start or group.physical_group != group.start:
raise BranchProvenanceError("group revision physical group is invalid")
rebuilt = make_group_revision(
parent_revision_id=value.get("parent_revision_id"),
group=group,
variation_nonce=int(value.get("variation_nonce", -1)),
created_utc=str(value.get("created_utc", "")),
storage_revision_id=str(value.get("storage_revision_id", "")),
generation_contract_sha256=str(value.get("generation_contract_sha256", "")),
lineage_sha256=str(value.get("lineage_sha256", "")),
records=value.get("records") or [],
branch_cut=value.get("branch_cut"),
)
if str(value.get("revision_id", "")) != rebuilt["revision_id"]:
raise BranchProvenanceError("group revision immutable identity is invalid")
if str(value.get("seed_identity", "")) != rebuilt["seed_identity"]:
raise BranchProvenanceError("group revision seed identity is invalid")
rebuilt["revision_order"] = str(
value.get("revision_order", rebuilt["revision_order"])
)
return rebuilt
def resolve_chain(
catalog: Mapping[str, Mapping[str, Any]],
head_revision_id: str,
) -> list[dict[str, Any]]:
head = str(head_revision_id)
if not head:
raise BranchProvenanceError("selected revision ID is empty")
reverse: list[dict[str, Any]] = []
seen: set[str] = set()
current: str | None = head
while current is not None:
if current in seen:
raise BranchProvenanceError("group revision ancestry contains a cycle")
seen.add(current)
raw = catalog.get(current)
if raw is None:
raise BranchProvenanceError(
f"group revision parent is missing: {current}"
)
revision = validate_group_revision(raw)
reverse.append(revision)
parent = revision.get("parent_revision_id")
current = None if parent is None else str(parent)
chain = list(reversed(reverse))
expected_start = 1
lineage = str(chain[0].get("lineage_sha256", ""))
for revision in chain:
group = revision["group"]
if int(group["start"]) != expected_start:
raise BranchProvenanceError("group revision ancestry is not a contiguous prefix")
if str(revision.get("lineage_sha256", "")) != lineage:
raise BranchProvenanceError("group revision ancestry crosses sampling lineages")
expected_start = int(group["end"]) + 1
return chain
def active_revision_map(chain: Iterable[Mapping[str, Any]]) -> dict[str, str]:
active: dict[str, str] = {}
for revision in chain:
validated = validate_group_revision(revision)
active[str(validated["group"]["physical_group"])] = validated["revision_id"]
return active
+291
View File
@@ -0,0 +1,291 @@
"""ComfyUI native-H3 and accelerator compatibility checks."""
from __future__ import annotations
import inspect
from typing import Any, Iterable
class CompatibilityError(RuntimeError):
"""Raised when a MODEL is not the supported native MiniMax H3 runtime."""
def _missing_callable_parameters(
callable_obj: Any,
*,
positional: Iterable[str] = (),
keywords: Iterable[str] = (),
) -> list[str]:
"""Return parameters that a callable can no longer accept.
Compatibility wrappers are allowed to replace a concrete signature with
``*args``/``**kwargs``. Sol-Attn's MiniMax-H3 Morton integration does this
for ``PackedLayout.__init__`` while transparently forwarding the original
arguments. Treating the wrapped signature as an API removal produces a
false incompatibility even though construction remains valid.
Explicit parameters are preferred when available. ``*args`` satisfies
missing positional parameters and ``**kwargs`` satisfies missing keyword
parameters. If ``inspect.signature`` itself is unavailable, the caller
still receives the exception and may fail closed.
"""
params = inspect.signature(callable_obj).parameters
has_var_positional = any(
parameter.kind is inspect.Parameter.VAR_POSITIONAL
for parameter in params.values()
)
has_var_keyword = any(
parameter.kind is inspect.Parameter.VAR_KEYWORD
for parameter in params.values()
)
missing: list[str] = []
for name in positional:
if name not in params and not has_var_positional:
missing.append(name)
for name in keywords:
if name not in params and not has_var_keyword:
missing.append(name)
return missing
def check_comfy_h3_runtime() -> list[str]:
"""Return human-readable incompatibilities with ComfyUI's native H3 API.
The check deliberately validates public/runtime contracts only. It does not
import optional accelerators and therefore cannot make their installation a
hard dependency.
"""
issues: list[str] = []
try:
import comfy.ldm.minimax.model as h3_model
except Exception as exc: # pragma: no cover - requires a broken Comfy install
return [f"cannot import native MiniMax H3: {exc}"]
layout_cls = getattr(h3_model, "PackedLayout", None)
model_cls = getattr(h3_model, "MiniMaxH3Model", None)
if layout_cls is None:
issues.append("PackedLayout is missing")
else:
try:
missing = _missing_callable_parameters(
layout_cls.__init__,
positional=(
"text_len",
"latent_t",
"latent_h",
"latent_w",
"audio_t",
),
keywords=(
"keyframes",
"refs",
),
)
for name in missing:
issues.append(f"PackedLayout no longer accepts '{name}'")
except (TypeError, ValueError) as exc:
issues.append(f"cannot inspect PackedLayout: {exc}")
if model_cls is None:
issues.append("MiniMaxH3Model is missing")
else:
for name in (
"forward",
"rope_freqs",
"_cond_video_rows",
"_cond_audio_rows",
):
if not hasattr(model_cls, name):
issues.append(f"MiniMaxH3Model.{name} is missing")
if tuple(getattr(h3_model, "FRAME_PER_TOKEN", ())) != (1, 4, 4, 4, 4):
issues.append("MiniMax H3 temporal compression grid changed")
try:
import comfy.model_base as model_base
base_cls = getattr(model_base, "MiniMaxH3", None)
if base_cls is None or not hasattr(base_cls, "extra_conds"):
issues.append("native MiniMaxH3 BaseModel.extra_conds is missing")
except Exception as exc:
issues.append(f"cannot inspect MiniMaxH3 BaseModel: {exc}")
try:
from comfy.patcher_extension import WrappersMP
for name in ("APPLY_MODEL", "DIFFUSION_MODEL"):
if not hasattr(WrappersMP, name):
issues.append(f"WrappersMP.{name} is missing")
except Exception as exc:
issues.append(f"cannot import model wrapper API: {exc}")
try:
import comfy.nested_tensor
if not hasattr(comfy.nested_tensor, "NestedTensor"):
issues.append("comfy.nested_tensor.NestedTensor is missing")
except Exception as exc:
issues.append(f"cannot import NestedTensor API: {exc}")
return issues
def run_native_layout_self_test() -> str:
"""Exercise the installed native H3 PackedLayout without loading a model.
This catches the most dangerous class of upstream change: a layout that can
still be constructed but no longer maps reference/target rows the way the
Continuum adapter expects.
"""
import torch
import comfy.ldm.minimax.model as h3_model
from .constants import (
MARK_AUDIO_CONTEXT,
MARK_AUDIO_END_FRAME,
MARK_AUDIO_OVERHANG,
MARK_CONTEXT_FRAMES,
MARK_VIDEO_CONTEXT,
)
from .layout_adapter import normalize_condition_latents, patch_layout_in_place
video = torch.zeros(1, 24, 2, 2, 2) # five-frame context
audio = torch.zeros(1, 32, 2, 8)
ref = {
"kind": "video_audio",
"latent_t": 2,
"latent_h": 2,
"latent_w": 2,
"ref_audio_t": 8,
"latent": video,
"audio_latent": audio,
MARK_VIDEO_CONTEXT: True,
MARK_CONTEXT_FRAMES: 5,
MARK_AUDIO_CONTEXT: True,
MARK_AUDIO_END_FRAME: 5.0,
MARK_AUDIO_OVERHANG: -1.0 / 3.0,
}
layout = h3_model.PackedLayout(
3, 7, 2, 2, 10, keyframes=None, refs=[ref]
)
position_id = id(layout.position_ids)
payload = {"layout": layout, "keyframes": [], "refs": [ref]}
normalize_condition_latents(payload)
result = patch_layout_in_place(payload, strict=True, debug=False)
if id(layout.position_ids) != position_id:
raise CompatibilityError("layout self-test replaced position_ids")
ref_video = next((a, b) for a, b, kind in layout.segments if kind == "ref_img")
target_video = next((a, b) for a, b, kind in layout.segments if kind == "video")
ra, rb = ref_video
va, _vb = target_video
if not torch.equal(layout.position_ids[ra:rb], layout.position_ids[va : va + (rb - ra)]):
raise CompatibilityError("layout self-test could not align video context")
audio_refs = [
{
"kind": "audio",
"ref_audio_t": length,
"audio_latent": torch.zeros(1, 32, 2, length),
}
for length in (2, 3, 4)
]
audio_layout = h3_model.PackedLayout(
3, 7, 2, 2, 10, keyframes=None, refs=audio_refs
)
audio_segments = [
stop - start
for start, stop, kind in audio_layout.segments
if kind == "ref_audio"
]
packed_audio_rows = torch.cat(
[h3_model.pack_audio(item["audio_latent"]) for item in audio_refs], dim=0
).shape[0]
if audio_segments != [4, 6, 8] or sum(audio_segments) != packed_audio_rows:
raise CompatibilityError(
"layout self-test found a multi-Reference-Audio packed-row mismatch"
)
return (
f"native PackedLayout self-test passed; rows={layout.position_ids.shape[0]}, "
f"position_ids_id={result['position_ids_id']}, "
f"reference_audio_rows={packed_audio_rows}"
)
def ensure_native_h3_base_model(base_model: Any) -> None:
"""Validate a ComfyUI BaseModel instance before adding our wrapper."""
inner = getattr(base_model, "diffusion_model", None)
if inner is None:
raise CompatibilityError("MODEL does not expose diffusion_model")
missing = [
name
for name in (
"blocks",
"final_layer",
"patch_size",
"latents_dim",
"audio_latents_dim",
"rope_freqs",
)
if not hasattr(inner, name)
]
if missing:
actual = f"{type(inner).__module__}.{type(inner).__name__}"
raise CompatibilityError(
f"MiniMax H3 model contract is unavailable on {actual}; missing "
+ ", ".join(missing)
)
def _wrapper_keys(model: Any) -> tuple[str, ...]:
"""Collect ModelPatcher wrapper keys without depending on enum values."""
wrappers = getattr(model, "wrappers", {}) or {}
found: list[str] = []
if not isinstance(wrappers, dict):
return ()
for group in wrappers.values():
if not isinstance(group, dict):
continue
found.extend(str(key) for key in group.keys())
return tuple(found)
def _contains_any(values: Iterable[str], *needles: str) -> bool:
text = " ".join(values).lower()
return any(needle.lower() in text for needle in needles)
def accelerator_summary(model: Any) -> str:
"""Best-effort, non-authoritative summary of attached accelerators.
Optional custom nodes expose different public markers across releases. The
summary therefore reports only what is observable and never gates execution.
"""
options = getattr(model, "model_options", {}) or {}
transformer = options.get("transformer_options", {}) or {}
wrapper_keys = _wrapper_keys(model)
parts: list[str] = []
if _contains_any(wrapper_keys, "spectrum"):
parts.append("Spectrum wrapper detected")
sol_marker = transformer.get("sol_compose") is not None or _contains_any(
wrapper_keys, "sol_attn", "sol-attn", "solattn"
)
if sol_marker:
parts.append("Sol-Attn marker detected")
if transformer.get("optimized_attention_override") is not None:
if sol_marker:
parts.append("chained attention override present (Sage/other fallback possible)")
else:
parts.append("attention override present (Sage/other)")
if options.get("h3_continuum_join"):
parts.append("Continuum APPLY_MODEL wrapper installed")
return "; ".join(parts) if parts else "accelerator markers not detected (informational only)"
+105
View File
@@ -0,0 +1,105 @@
from __future__ import annotations
from typing import Any
CONDITIONING_MODE_T2VA = "t2va"
CONDITIONING_MODE_I2VA = "i2va"
CONDITIONING_MODE_LAST_ONLY = "last_only"
CONDITIONING_MODE_FL2VA = "fl2va"
CONDITIONING_MODE_REFERENCE = "reference"
CONDITIONING_MODES = frozenset(
{
CONDITIONING_MODE_T2VA,
CONDITIONING_MODE_I2VA,
CONDITIONING_MODE_LAST_ONLY,
CONDITIONING_MODE_FL2VA,
CONDITIONING_MODE_REFERENCE,
}
)
_MODE_LABELS = {
CONDITIONING_MODE_T2VA: "T2VA + Continuation",
CONDITIONING_MODE_I2VA: "I2VA + Continuation",
CONDITIONING_MODE_LAST_ONLY: "Last Frame + Continuation",
CONDITIONING_MODE_FL2VA: "FL2VA + Continuation",
CONDITIONING_MODE_REFERENCE: "Reference + Continuation",
}
def conditioning_mode_from_presence(
*, has_first: bool, has_last: bool, has_reference: bool
) -> str:
if has_reference:
return CONDITIONING_MODE_REFERENCE
if has_first and has_last:
return CONDITIONING_MODE_FL2VA
if has_first:
return CONDITIONING_MODE_I2VA
if has_last:
return CONDITIONING_MODE_LAST_ONLY
return CONDITIONING_MODE_T2VA
def detect_conditioning_mode(
*, first_frame: Any, last_frame: Any, reference_assets: Any
) -> str:
return conditioning_mode_from_presence(
has_first=first_frame is not None,
has_last=last_frame is not None,
has_reference=reference_assets is not None,
)
def conditioning_mode_label(mode: str) -> str:
try:
return _MODE_LABELS[str(mode)]
except KeyError as exc:
raise ValueError(f"unknown conditioning mode: {mode!r}") from exc
def conditioning_display_label(
*,
has_first: bool,
has_last: bool,
has_reference: bool,
) -> str:
"""Return a user-facing label without changing the runtime mode contract."""
if has_reference:
if has_first and has_last:
return "Hybrid FL2VA + Reference + Continuation"
if has_first:
return "Hybrid I2VA + Reference + Continuation"
if has_last:
return "Hybrid L2VA + Reference + Continuation"
return "Reference + Continuation"
mode = conditioning_mode_from_presence(
has_first=has_first,
has_last=has_last,
has_reference=False,
)
return conditioning_mode_label(mode)
def conditioning_mode_display_label(
mode: str,
*,
has_first: bool = False,
has_last: bool = False,
has_reference: bool = False,
) -> str:
"""Legacy display helper retained for existing callers and tests."""
if has_first or has_last or has_reference:
return conditioning_display_label(
has_first=has_first,
has_last=has_last,
has_reference=has_reference,
)
return conditioning_mode_label(mode)
def conditioning_mode_uses_video_vae(mode: str) -> bool:
if mode not in CONDITIONING_MODES:
raise ValueError(f"unknown conditioning mode: {mode!r}")
return mode != CONDITIONING_MODE_T2VA
+123
View File
@@ -0,0 +1,123 @@
"""Constants shared by H3 Continuum Join."""
from __future__ import annotations
FPS = 24.0
AUDIO_SAMPLE_RATE = 32_000
AUDIO_LATENT_FPS = 40.0
FRAME_RESCALE = AUDIO_LATENT_FPS / FPS
FRAME_PER_TOKEN = (1, 4, 4, 4, 4)
CHUNK_SECONDS_DEFAULT = 5.0
CHUNK_SECONDS_MIN = 4.0
CHUNK_SECONDS_MAX = 30.0
CHUNK_SECONDS_STEP = 0.1
CHUNK_SECONDS_TOOLTIP = (
"Target duration shared by every chunk. 5–15 seconds is the recommended "
"and validated range. Values above 15 seconds are supported, but VRAM "
"use and processing time can increase substantially, especially at high "
"resolution."
)
STATE_MAGIC = "H3_CONTINUUM_STATE"
PLAN_MAGIC = "H3_CONTINUUM_PLAN"
SESSION_MAGIC = "H3_CONTINUUM_SESSION"
PROMPT_PLAN_MAGIC = "H3_CONTINUUM_PROMPT_PLAN"
MARK_SCHEMA = "_h3cj_schema"
MARK_VIDEO_SLOT = "_h3cj_video_slot" # legacy/internal-slot compatibility
MARK_PIXEL_START = "_h3cj_pixel_start"
MARK_VIDEO_CONTEXT = "_h3cj_video_context"
MARK_CONTEXT_FRAMES = "_h3cj_context_frames"
MARK_AUDIO_CONTEXT = "_h3cj_audio_context"
MARK_AUDIO_END_FRAME = "_h3cj_audio_end_frame"
MARK_AUDIO_OVERHANG = "_h3cj_audio_overhang"
CONTINUUM_REFERENCE_METADATA_KEY = "_h3_continuum"
CONTINUUM_INTEROP_KEY = "h3_continuum"
CONTINUUM_INTEROP_API = 1
CONTINUUM_ACTUAL_PREFIX_STEPS = 2
MODEL_WRAPPER_KEY = "h3_continuum_join.apply_model.v1"
V2_RUNTIME_KEY = "h3_continuum_v2"
LAYOUT_ORIGINAL_TIME_ATTR = "_h3cj_original_time_v1"
LAYOUT_SIGNATURE_ATTR = "_h3cj_patch_signature_v1"
LAYOUT_DEVICE_CACHE_ATTR = "_h3cj_device_cache_v1"
CONTINUITY_OPTIONS = (
"Balanced — 22 frames",
"Fast — 5 frames",
"Strong — 39 frames (Experimental)",
)
CONTINUITY_FRAMES = {
CONTINUITY_OPTIONS[0]: 22,
CONTINUITY_OPTIONS[1]: 5,
CONTINUITY_OPTIONS[2]: 39,
}
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"
PROMPT_MODE_OPTIONS = (PROMPT_MODE_FIXED, PROMPT_MODE_LIST, PROMPT_MODE_TIMELINE)
PROMPT_FORMAT_AUTO = "Auto"
PROMPT_FORMAT_FIXED = "Fixed"
PROMPT_FORMAT_LIST = "List"
PROMPT_FORMAT_TIMELINE = "Timeline"
PROMPT_FORMAT_OPTIONS = (
PROMPT_FORMAT_AUTO,
PROMPT_FORMAT_FIXED,
PROMPT_FORMAT_LIST,
PROMPT_FORMAT_TIMELINE,
)
DIAGNOSTICS_OFF = "Off"
DIAGNOSTICS_BASIC = "Basic"
DIAGNOSTICS_FULL = "Detailed Report"
DIAGNOSTICS_LEGACY_FULL = "Full"
DIAGNOSTICS_OPTIONS = (DIAGNOSTICS_BASIC, DIAGNOSTICS_FULL, DIAGNOSTICS_OFF)
DIAGNOSTICS_ACCEPTED_OPTIONS = DIAGNOSTICS_OPTIONS + (DIAGNOSTICS_LEGACY_FULL,)
def normalize_diagnostics_mode(value: str) -> str:
return DIAGNOSTICS_FULL if value == DIAGNOSTICS_LEGACY_FULL else value
SEAM_CORRECTION_AUTO = "Auto"
SEAM_CORRECTION_OFF = "Off"
SEAM_CORRECTION_BASIC = "Basic"
SEAM_CORRECTION_OPTIONS = (
SEAM_CORRECTION_AUTO,
SEAM_CORRECTION_OFF,
SEAM_CORRECTION_BASIC,
)
+169
View File
@@ -0,0 +1,169 @@
"""Reusable native-H3 continuation preparation independent of ComfyUI UI nodes."""
from __future__ import annotations
from typing import Any
import torch
from .constants import (
CONTINUUM_INTEROP_API,
CONTINUUM_REFERENCE_METADATA_KEY,
MARK_AUDIO_CONTEXT,
MARK_AUDIO_END_FRAME,
MARK_AUDIO_OVERHANG,
MARK_CONTEXT_FRAMES,
MARK_SCHEMA,
MARK_VIDEO_CONTEXT,
)
from .state import extract_av_streams
from .version import STATE_SCHEMA_VERSION
POLICY_REPLACE = "Use Continuum context; keep visual identity tokens (Recommended)"
POLICY_ERROR = "Error if a first-frame keyframe exists"
POLICY_KEEP = "Keep first-frame keyframe too (Advanced)"
FIRST_FRAME_POLICIES = (POLICY_REPLACE, POLICY_ERROR, POLICY_KEEP)
def clone_conditioning(conditioning):
"""Clone the outer conditioning list and metadata dictionaries."""
output = []
for index, item in enumerate(conditioning):
if not isinstance(item, (tuple, list)) or len(item) != 2:
raise ValueError(f"conditioning entry {index} is not [tensor, metadata]")
if not isinstance(item[1], dict):
raise ValueError(f"conditioning entry {index} metadata is not a dictionary")
output.append([item[0], dict(item[1])])
if not output:
raise ValueError("conditioning is empty")
return output
def conditioning_diagnostics(conditioning) -> dict[str, int]:
"""Return non-authoritative cues used in the Join report."""
first_keyframes = 0
visual_tokens = 0
for item in conditioning:
if not isinstance(item, (tuple, list)) or len(item) != 2:
continue
metadata = item[1] if isinstance(item[1], dict) else {}
for keyframe in metadata.get("minimax_keyframes") or ():
if int(keyframe.get("resolved_frame_index", 0)) == 0:
first_keyframes += 1
tags = metadata.get("minimax_token_tags")
if torch.is_tensor(tags):
visual_tokens += int((tags == 0).sum().item())
return {"first_keyframes": first_keyframes, "visual_tokens": visual_tokens}
def prepare_conditioning(
conditioning,
*,
video_context: torch.Tensor,
audio_context: torch.Tensor | None,
audio_grid_offset: float,
context_frames: int,
new_frame_count: int,
first_frame_policy: str,
preserve_last_frame: bool,
source_frame_count: int | None = None,
):
"""Add one native H3 video/video-audio reference as timeline context."""
if first_frame_policy not in FIRST_FRAME_POLICIES:
raise ValueError(f"unknown first-frame policy: {first_frame_policy!r}")
if not torch.is_tensor(video_context) or video_context.ndim != 5:
raise ValueError("video_context must be [1,24,T,H,W]")
if tuple(video_context.shape[:2]) != (1, 24):
raise ValueError("video_context must have shape [1,24,T,H,W]")
if audio_context is not None:
if not torch.is_tensor(audio_context) or audio_context.ndim != 4:
raise ValueError("audio_context must be [1,32,2,T]")
if tuple(audio_context.shape[:3]) != (1, 32, 2):
raise ValueError("audio_context must have shape [1,32,2,T]")
context_t = int(video_context.shape[2])
context_ref: dict[str, Any] = {
"kind": "video_audio" if audio_context is not None else "video",
"latent_t": context_t,
"latent_h": int(video_context.shape[-2]),
"latent_w": int(video_context.shape[-1]),
"ref_audio_t": int(audio_context.shape[-1]) if audio_context is not None else 0,
"latent": video_context.contiguous(),
MARK_SCHEMA: STATE_SCHEMA_VERSION,
MARK_VIDEO_CONTEXT: True,
MARK_CONTEXT_FRAMES: int(context_frames),
CONTINUUM_REFERENCE_METADATA_KEY: {
"api": CONTINUUM_INTEROP_API,
"role": "video_context",
"audio_role": "audio_context" if audio_context is not None else None,
},
}
if audio_context is not None:
context_ref.update(
{
"audio_latent": audio_context.contiguous(),
MARK_AUDIO_CONTEXT: True,
MARK_AUDIO_END_FRAME: float(context_frames),
MARK_AUDIO_OVERHANG: float(audio_grid_offset),
}
)
output = clone_conditioning(conditioning)
for _, metadata in output:
old_frame_count = metadata.get("minimax_frame_count")
if old_frame_count is None:
old_frame_count = source_frame_count
old_keyframes = [dict(item) for item in (metadata.get("minimax_keyframes") or [])]
kept = []
for keyframe in old_keyframes:
frame_index = int(keyframe.get("resolved_frame_index", 0))
if frame_index == 0:
if first_frame_policy == POLICY_ERROR:
raise ValueError(
"conditioning already has a first-frame keyframe. Disconnect the image "
"for continuation, or use the recommended identity-token policy."
)
if first_frame_policy == POLICY_KEEP:
kept.append(keyframe)
continue
is_last = old_frame_count is not None and frame_index == int(old_frame_count) - 1
if is_last and preserve_last_frame:
keyframe["resolved_frame_index"] = int(new_frame_count) - 1
kept.append(keyframe)
elif is_last:
continue
else:
# Core H3 accepts arbitrary guide positions. Preserve them and
# let the native keyframe/layout path decide their semantics.
kept.append(keyframe)
if kept:
metadata["minimax_keyframes"] = kept
else:
metadata.pop("minimax_keyframes", None)
metadata["minimax_frame_count"] = int(new_frame_count)
refs = [
dict(item)
for item in (metadata.get("minimax_refs") or [])
if not (item.get(MARK_VIDEO_CONTEXT) or item.get(MARK_AUDIO_CONTEXT))
]
refs.append(dict(context_ref))
metadata["minimax_refs"] = refs
return output
def new_h3_latent(template: dict[str, Any], *, video_t: int, audio_t: int):
"""Create an empty native H3 AV latent matching the template geometry/dtype."""
try:
import comfy.model_management
import comfy.nested_tensor
except Exception as exc: # pragma: no cover
raise RuntimeError(f"ComfyUI H3 latent helpers unavailable: {exc}") from exc
video, audio = extract_av_streams(template)
device = comfy.model_management.intermediate_device()
new_video = torch.zeros(
(1, 24, int(video_t), int(video.shape[-2]), int(video.shape[-1])),
device=device,
dtype=video.dtype,
)
new_audio = torch.zeros((1, 32, 2, int(audio_t)), device=device, dtype=audio.dtype)
return {"samples": comfy.nested_tensor.NestedTensor((new_video, new_audio))}
+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.service.store.operation(), 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
+427
View File
@@ -0,0 +1,427 @@
"""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 contextlib import nullcontext
from collections import OrderedDict
from dataclasses import dataclass, field
import numpy as np
import torch
from .identity import CacheBypass, tensor_blocks, tensor_digest
if "." in __package__:
from .. import storage_settings, storage_fs
from ..storage_memory import system_memory_bytes
else: # The existing standalone cache test/probe entry points remain supported.
storage_settings = storage_fs = None
system_memory_bytes = None
MiB = 1024**2
GiB = 1024**3
def available_ram():
if system_memory_bytes is not None:
return system_memory_bytes()[0] or 0
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."""
with state.get("lock", nullcontext()):
_cleanup_private_files_locked(state)
def _cleanup_private_files_locked(state):
for path, entry in list(state["entries"].items()):
if not entry.live():
try:
if path.parent in state.get("identities", {}):
storage_fs.check_identity(path.parent, state["identities"][path.parent])
path.unlink(missing_ok=True)
state["entries"].pop(path, None)
except OSError:
pass
for root, owner in state.get("owners", {}).items():
try:
storage_fs.check_identity(root, owner["identity"])
for name in owner["files"]:
path = root / name
if path not in state["entries"] and storage_fs.regular_file(path):
try:
path.unlink()
except OSError:
pass
except OSError:
pass
for root, expected in state.get("identities", {}).items():
storage_settings.remove_empty_cache_root(root, expected)
if state["root"] is not None and state["root"] not in state.get("identities", {}):
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._explicit_parent = temp_parent is not None
self._default_parent = self.temp_parent
self._owners = {}
self._scratch_token = uuid.uuid4().hex
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": {}, "identities": {},
"lock": self._lock, "owners": self._owners}
weakref.finalize(self, _cleanup_private_files, self._cleanup_state)
def operation(self):
manager = storage_settings.get_manager() if storage_settings else None
return manager.operation() if manager else nullcontext()
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:
if entry.path.parent in self._owners:
storage_fs.check_identity(entry.path.parent, self._owners[entry.path.parent]["identity"])
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()
for root, owner in self._owners.items():
storage_settings.remove_empty_cache_root(root, owner["identity"])
if self.root is not None:
try:
self.root.rmdir() # only an empty helper-owned directory
except OSError:
pass
def _directory(self):
manager = storage_settings.get_manager() if storage_settings else None
if manager is not None:
manager.register_store(self)
default = self._default_parent or tempfile.gettempdir()
parent = Path(default).resolve() if self._explicit_parent else manager.resolve("decode", default)
if self.root is not None and self.root.parent != parent:
self.root = None
self.temp_parent = parent
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
if manager is not None:
owner = storage_settings.create_cache_owner(self.root)
self._owners[self.root] = owner
self._cleanup_state["identities"][self.root] = owner["identity"]
manager.record_root("decode", self.root.parent)
if self.root in self._owners:
storage_fs.check_identity(self.root, self._owners[self.root]["identity"])
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 not None and path.parent in self._owners:
storage_fs.check_identity(path.parent, self._owners[path.parent]["identity"])
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
if root in self._owners:
storage_settings.register_cache_file(root, self._owners[root], filename)
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 inspect_scratch(self, *, cleanup=False, parent):
"""Pure status unless explicitly cleaning; preserve aliases and RAM entries."""
with self._lock:
result = {}
removed = {"removed_files": 0, "removed_bytes": 0, "errors": []}
entries = [(key, entry) for key, entry in self.entries.items()]
entries += [(None, entry) for entry in self.retired]
for key, entry in entries:
path = entry.path
if path is None or path.parent.parent != Path(parent):
continue
try:
if path.parent in self._owners:
storage_fs.check_identity(path.parent, self._owners[path.parent]["identity"])
if not path.is_file() or path.is_symlink():
continue
size = path.stat().st_size
live = any(ref() is not None for ref in entry.leases)
if cleanup and not live and self._delete(entry):
if key is not None:
self.entries.pop(key, None)
else:
self.retired = [item for item in self.retired if item is not entry]
removed["removed_files"] += 1
removed["removed_bytes"] += size
else:
result[str(path)] = "in_use" if live else "deletable"
if cleanup and not live:
removed["errors"].append(f"Could not delete {path.name}; file retained")
except OSError as exc:
result[str(path)] = "unknown"
if cleanup:
removed["errors"].append(str(exc))
# An interrupted unpublished write can leave a registered .tmp.
# The store lock proves no writer is active here; the entry ledger
# continues to protect any published mapping, including retired ones.
for root, owner in self._owners.items():
if root.parent != Path(parent):
continue
try:
storage_fs.check_identity(root, owner["identity"])
for name in owner["files"]:
path = root / name
if path in self._cleanup_state["entries"] or not storage_fs.regular_file(path):
continue
size = path.stat().st_size
if cleanup:
try:
path.unlink()
removed["removed_files"] += 1
removed["removed_bytes"] += size
except OSError as exc:
result[str(path)] = "deletable"
removed["errors"].append(str(exc))
else:
result[str(path)] = "deletable"
except OSError:
pass
if cleanup:
for root, owner in self._owners.items():
if root.parent == Path(parent) and root != self.root:
storage_settings.remove_empty_cache_root(root, owner["identity"])
result[f"__removed_{self._scratch_token}"] = removed
return result
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)}
+291
View File
@@ -0,0 +1,291 @@
# H3 Continuum A/B実機テスト記録
更新日: 2026-08-13
状態: 継続中。現時点の結果であり、最終推奨ではない。
## 1. 目的
H3 Continuumの3×5秒生成について、次を分離して評価する。
- 解像度とチャンク累積による顔・肌・Identity drift
- Spectrumの速度向上とSeed依存のForecast誤差
- WarmupとContinuum Actual Prefixの組み合わせ
- Seam Correction Off/Autoの映像・音声境界への効果
- 無音に近い条件と明確な歌唱・発話条件の違い
MP4本体は現時点ではGitへ追加しない。各番号はローカル出力ファイル名の末尾番号に対応する。
## 2. 主なテスト環境
```text
GPU RTX 5060 Ti 16GB
System RAM 64GB
Output 640×960 / 24fps / 15秒 / 360 frames
Image scale area / 0.60MP / resolution_steps 32
Chunks 3
Chunk seconds 5.0
Continuity Balanced — 22 frames
SageAttention sageattn_qk_int8_pv_fp8_cuda++
Sol-Attn なし
Audio continuity true
Exact total duration true
Diagnostics Basic
```
Spectrum ON時の主要設定:
```text
blend_weight 0.5
degree 1
ridge_lambda 0.1
window_size 2.0
flex_window 0.75
tail_actual_steps 1
max_history 8
history_storage system_ram
bootstrap_first_forecast true
anchor_residual_feedback false
selective_rollback_correction false
offline_smoothing_replay true
audio_blend_weight 0.0
```
## 3. 暫定実用設定
品質最優先ではなく、約31%の時間短縮を取る実用バランス設定として扱う。
```text
Spectrum On
Warmup 2
Actual Prefix 2
Continuity Balanced 22
Seam Off
```
注意: Seed 1235でSpectrum ON時の明確な画質崩れを確認しているため、全Seedで安定する設定ではない。
## 4. 解像度・チャンク比較
| 動画 | 解像度 | 尺 | 所見 |
|---|---:|---:|---|
| 00032 | 448×672、約0.3MP | 15秒 | 低解像度では肌・顔の微細なdriftが目立ちにくい |
| 00033 | 576×896、約0.5MP | 15秒 | 比較的安定 |
| 00034 | 576×896、約0.5MP | 5秒 | 単チャンクは安定 |
| 00035 | 640×960、約0.6MP | 5秒 | 0.6MP単独では大きな破綻なし |
| 00036 | 640×960、約0.6MP | 15秒 | 後続チャンクほど肌の変化が見えやすい |
暫定解釈: 0.6MPそのものより、Continuationで小さな誤差が次チャンクへ累積し、高解像度で可視化される可能性が高い。
## 5. Warmup比較
| 動画 | Warmup | 所見 |
|---|---:|---|
| 00038 | 1 | プッシュインあり。境界フリックは比較的目立たない |
| 00039 | 3 | 6秒台以降に顔の暗転・粗れが発生し、重大な破綻 |
| 00040 | 3 | 重大破綻は再現せず、軽い肌drift。結果の振れが大きい |
| 00041 | 2 | Seed 1234、Spectrum ON、Seam Off。全体として良好 |
暫定解釈:
- Warmup 3は結果が不安定なため不採用。
- Warmup 2はWarmup 3より安全だが、Spectrumの全Seed安定性は保証しない。
- Continuation chunkではActual Prefix 2が先頭2stepをActualへ要求する。
## 6. 厳密または準厳密なA/B比較
境界比は、境界の隣接フレームMAEを周辺の通常フレーム間MAE中央値で割った参考値。1未満なら境界変化が周辺動作より小さい。
### 6.1 Spectrum ON/OFF、Seed 1234
| 動画 | Spectrum | Warmup | Seam | 所見 |
|---|---|---:|---|---|
| 00041 | ON | 2 | Off | 良好。音声はほぼ無音、RMS約-63.7dBFS |
| 00045 | OFF | 無効 | Off | 良好。00041と視覚的にかなり近い |
Seed 1234ではSpectrum ONでもNativeに近い結果を維持した。
### 6.2 Spectrum ON/OFF、Seed 1235
| 動画 | Spectrum | Warmup | Seam | 5秒比 | 10秒比 | 所見 |
|---|---|---:|---|---:|---:|---|
| 00042 | ON | 2 | Off | 1.392 | 1.810 | Clip 1途中で服色変化。Clip 3で顔に強い斑点と肌崩れ |
| 00047 | OFF | 無効 | Off | 0.909 | 0.904 | 服色、肌、Identityを維持 |
確定事項:
- Seed 1235自体はNative生成で正常。
- 00042の崩れはSpectrumとSeed 1235の組み合わせで発生した可能性が高い。
- Seam CorrectionではClip内部のSpectrum Forecast誤差を修正できない。
### 6.3 Seam Auto/Off、Seed 1237
| 動画 | Spectrum | Warmup | Seam | 5秒比 | 10秒比 | 所見 |
|---|---|---:|---|---:|---:|---|
| 00044 | ON | 2 | Auto | 0.570 | 0.248 | 良好。Autoによる不自然な色変化なし |
| 00046 | ON | 2 | Off | 0.564 | 0.333 | 良好。Auto版と視覚差は非常に小さい |
確定事項:
- 無音に近い映像ではAutoの視覚的効果は小さい。
- Autoは10秒境界をわずかに平滑化したが、Offでも十分安定。
- 現時点ではOffを映像品質の基準とする。
## 7. Seed耐性
| Seed | Spectrum | Warmup | Seam | 動画 | 判定 |
|---:|---|---:|---|---|---|
| 1234 | ON | 2 | Off | 00041 | 良好 |
| 1234 | OFF | 無効 | Off | 00045 | 良好 |
| 1235 | ON | 2 | Off | 00042 | 失敗 |
| 1235 | OFF | 無効 | Off | 00047 | 良好 |
| 1236 | ON | 2 | Auto | 00043 | 許容。カメラ動作が強い |
| 1237 | ON | 2 | Auto | 00044 | 良好 |
| 1237 | ON | 2 | Off | 00046 | 良好 |
Spectrum ONの品質はSeed依存で変化する。結果確認なしの長尺・大量生成には追加の誤差検出またはフォールバックが必要。
## 8. 速度比較
| 条件 | 動画 | 生成時間 |
|---|---|---:|
| Spectrum ON | 00046 | 882.52秒、約14分43秒 |
| Spectrum OFF | 00047 | 1274.40秒、約21分14秒 |
```text
短縮時間 約391.88秒、約6分32秒
短縮率 約30.8%
処理速度 約1.44倍
```
別の比較でも約31.6%短縮しており、Spectrumの速度効果は再現している。ただし00046と00047はSeedが異なるため、この値は実用上の参考値。
## 9. 音声の現状
00041〜00047にはAAC音声ストリームがあるが、測定RMSは概ね-58〜-68dBFSで、聴感上ほぼ無音。したがって、歌唱、会話、伴奏を含むAudio ContinuityとSeam Autoの効果は未確定。
現時点の運用仮説:
```text
映像中心・無音に近い Seam Off
会話・歌唱・演奏あり Seam Autoの可能性。A/B未完了
```
## 10. 保留中・次のテスト
1. Seed 1235 / Spectrum ON / Warmup 1 / Seam Off
2. 固定カメラ・明確な持続歌唱で、同一SeedのSeam Off/Auto
3. 歌唱と小振幅・低速プッシュインを含む実用Promptで、同一SeedのSeam Off/Auto
4. 音声境界の前後100〜200msについて、瞬間ピーク、短時間RMS、F0、波形相関、スペクトル差、DC offsetを比較
5. 3チャンクで安定後、5×5秒または6×5秒でIdentity driftを確認
## 11. 検討中の対策
- Clip 1だけNative計算し、Continuation chunkからSpectrumを使用
- Spectrumの予測誤差が大きいstepだけActualへ戻す
- selective rollback correctionとanchor residual feedbackの同一Seed A/B
- 元画像による定期的なIdentity再アンカー
- 異常Contextを検出し、該当チャンクだけSpectrumなしで再生成
- Seam Autoの映像補正と音声補正を個別に選択可能にする
## 12. 将来のGitHub公開方法
- このMarkdownと機械可読なJSON/CSVを通常Gitへ追加する。
- コンタクトシートは`docs/assets/ab-tests/`等へ追加する。
- 大容量MP4は通常Gitへ直接追加せず、GitHub Release assetsまたはGit LFSを検討する。
- 公開前にPrompt、Workflow、モデル、ComfyUI revision、Python/Torch/CUDA、GPU、生成時間を各サンプルへ紐付ける。
## 00048 / 00049: 0.5 MP Seam Off vs Auto
- 共通条件: 576x896 (約0.5 MP), 24 fps, 3 x 5秒, Spectrum On, Warmup 1, Actual Prefix 2, Balanced 22, base seed 1235。
- 00048: Seam Off。5秒境界比 0.3583、10秒境界比 0.8562。
- 00049: Seam Auto。5秒境界比 0.3709、10秒境界比 0.4271。
- 視覚評価: 両方とも人物・衣装・肌は安定し、見た目の差は小さい。Autoは10秒境界を数値上改善した。
- 音声: 両方ともほぼ無音のため、音声シーム効果は未評価。
- 注意: 0.5 MP条件のため、0.6 MPで発生したSeed 1235の崩れをWarmup 1が解消したとは断定しない。
### 目視評価の補足
- ユーザー目視では00049(Seam Auto)の方がフリックが若干目立つ。
- 00048(Seam Off)の方が境界変化を比較的抑えられている。
- 境界指標の改善と主観的なフリック低減は一致しなかったため、本比較では目視評価を優先しSeam Offを採用候補とする。
## 00050: 音声あり一貫性テスト
- 条件: 576x896(約0.5 MP)、24 fps、3 x 5秒、Spectrum On、Warmup 1、Balanced 22、base seed 1235、Seam Off。
- 音声レベル: mean -19.9 dB、peak -6.4 dB。前回のほぼ無音サンプルより音声境界の評価に適する。
- 目視: 3チャンクを通して人物、髪、衣装、背景、露出は安定。肌・顔の累積崩れも目立たない。
- 5秒境界: 境界付近で瞬きが始まるためフレーム差はあるが、露出フリックより自然動作として見える。
- 10秒境界: 口形、顔、背景の連続性が高く、明確な視覚ジャンプは小さい。
- 未確認: 音声境界のクリック、F0、短時間RMS、スペクトル差の数値解析。
- 次の比較: 同一Prompt・Seed・解像度・Warmupのまま、SeamだけAutoへ変更した1本と比較する。
### 00050 音声の目視・聴感補足
- ユーザー聴感で10秒(Chunk 2→3境界)に短いプチノイズを確認。
- 同境界の映像連続性は良好であり、映像シームと音声シームの品質が一致しない例となった。
- 暫定対策候補: Video Seam Off、Audio Seam Autoを独立設定にする。
### 00050 実行レポート補足
- Prompt plan: Fixed、3 chunks、5.000秒。Seam correction Off。
- Chunk seeds: 12362262848839836333 / 1129406137053299874 / 8524677167168820503。
- Continuity motion: Chunk 2 = 0.378492、Chunk 3 = 0.388277。Continuation chunksはActual Prefix 2を要求。
- Retained frames: 124 + 119 + 119 = 362。Exact-durationで360 framesへ末尾調整。
- Audio: 480000 samples(32 kHz、15.000秒)。末尾補正 -2667 samplesは2 frames相当で、10秒境界のプチノイズ原因とは分離して扱う。
- 判定: sample-boundary alignmentは尺を整合させているが、波形位相・振幅の連続性までは保証しない。Audio Seam Off基準として保存する。
### 00050 境界評価の訂正
- 5秒(Chunk 1→2): 映像フリックが確認できる。
- 10秒(Chunk 2→3): 映像フリックは目立たないが、音声に短いプチノイズがある。
- 映像と音声の問題位置は一致していないため、Video SeamとAudio Seamは独立評価・独立処理が必要。
### 00050 最終訂正(この評価を優先)
- 5秒(Chunk 1→2): 映像フリックあり。
- 10秒(Chunk 2→3): 映像フリックは目立たない。
- 音声: 明確なプチノイズは確認できない。先行する「10秒に音声ノイズあり」という記録は取り消し、未検出として扱う。
- 00050はAudio Seam不具合の根拠にはせず、音声は専用テストで改めて検証する。
## V3.2.1 Reference + Continuation 実機成績
共通条件:
```text
Version H3 Continuum V3.2.1
Output 1056x608 / 24fps / 15秒 / 360 frames
Image scale 16:9 / 0.6MP / multiple 32
Chunks 3 x 5秒
Continuity Balanced 22
Reference images 2
Reference size Match Output
Audio Seam Off
Run Storage Save + Auto Resume
```
| 動画 | MODEL | Prompt | 生成時間 | Run Storage | 判定 |
|---|---|---|---:|---|---|
| 00006 | FL2VA | 縦構図指定が残る旧Prompt | 749.35秒 | 0 reused / 3 generated | MODEL切替前baseline |
| 00007 | Ref2VA | 縦構図指定が残る旧Prompt | 751.26秒 | 0 reused / 3 generated | Ref2VA切替を新Revisionとして検出 |
| 00008 | Ref2VA | 16:9横長へ修正したPrompt | 751.64秒 | 0 reused / 3 generated | 技術PASS、実用可能な結果 |
00008の実行結果:
```text
Conditioning mode Reference + Continuation
Prompt plan List / 3 unique prompts
Chunk 2 Actual Prefix 2
Chunk 3 Actual Prefix 2
Natural frames 362
Final frames 360
Revision 2167719e99b1e782
```
確認事項:
- 2枚のReferenceを全3チャンクで継続使用できた。
- FL2VAからRef2VAへの変更、およびPrompt変更を別Revisionとして扱い、旧Chunkを誤再利用しなかった。
- 00006~00008の生成時間は約749~752秒で、モデル切替やPrompt修正による異常な時間増加はない。
- 00008はユーザー目視を含め、V3.2.1 Reference + Continuationの実用可能な実機成績として保存する。
+177
View File
@@ -0,0 +1,177 @@
# Architecture — H3 Continuum Join 2.0
## 1. Design goals
1. Preserve the V1 native H3 continuation behavior.
2. Integrate N chunks without duplicating V1 temporal/layout logic.
3. Keep SageAttention, Sol-Attn, and Spectrum external and independently updatable.
4. Avoid global ComfyUI class mutation.
5. Fail closed when native H3 layout contracts change.
6. Prevent H3/VAE/CLIP model switching between continuation chunks.
7. Keep accepted chunk latents on CPU and bound transient decode memory.
8. Preserve exact long-chain A/V timing.
## 2. Module layers
```text
UI
nodes.py V1 compatibility nodes
v2/nodes.py integrated V2 nodes
V2 orchestration
v2/sequence.py phases, session reuse, reroll, reports
v2/sampling.py ComfyUI-native sampler path
v2/h3_builder.py empty AV latent, prompt and keyframe conditioning
v2/decoder.py deferred decode, preallocated assembly
v2/prompts.py Fixed/List/Timeline parser
v2/session.py in-memory accepted chunk/session model
v2/session_io.py atomic session persistence
v2/motion.py conservative latent motion analysis
v2/seeds.py deterministic per-chunk seed derivation
v2/diagnostics.py lightweight seam measurements
Shared continuation core
continuation.py native H3 video/video_audio reference construction
model_patch.py per-MODEL APPLY_MODEL wrapper
layout_adapter.py in-place MM-RoPE placement and payload normalization
temporal.py H3 17k+5 / 24fps / 40Hz grid
state.py V1 State and Plan schemas
media.py V1 trim/assembly helpers
compatibility.py runtime contract checks
```
V2 calls the shared continuation core. It does not implement a second continuation algorithm.
## 3. Three execution phases
### Phase 1 — conditioning preparation
- Resize first/last images once.
- VAE-encode their keyframe latents once.
- Tokenize and encode each unique Prompt once.
- Clone the externally patched MODEL once and add the Continuum APPLY_MODEL wrapper.
No H3 diffusion sampling begins until this phase completes.
### Phase 2 — H3-only loop
For each chunk:
1. Create native H3 NestedTensor AV latent.
2. Select 5/22/39-frame Context or Auto.
3. Add one native `video` / `video_audio` reference block.
4. Call the standard ComfyUI guider/sampler path.
5. Let Spectrum create and tear down its own run through its public wrappers.
6. Copy the sampled full AV latent to CPU once.
7. Derive the next V1-compatible State from that CPU chunk.
Video and Audio VAE decode are deliberately absent from this loop.
### Phase 3 — deferred decode
- Decode each CPU chunk after all H3 sampling.
- Immediately move decoded tensors to CPU.
- Remove the overlap.
- Copy images into one preallocated final IMAGE tensor.
- Place audio into cumulative 24fps-derived sample ranges.
- Release each raw chunk before decoding the next.
- Apply exact final duration if enabled.
## 4. Native H3 continuation representation
V1 and V2 both represent the previous tail as one reference block:
```text
kind: video or video_audio
latent: native H3 video latent tail
latent_t/h/w: native geometry
audio_latent: optional native H3 audio latent tail
ref_audio_t: audio latent length
_h3cj_* metadata: timeline placement contract
```
The outer APPLY_MODEL wrapper receives the payload built by ComfyUI, moves only marked Continuum reference rows onto the target timeline, and normalizes keyframe/reference latent lists.
## 5. Accelerator composition
### SageAttention
Continuum never replaces the attention kernel. Existing attention overrides remain intact.
### Sol-Attn
Sol-Attn registers H3 target spans by the identity of `PackedLayout.position_ids`. Continuum modifies this tensor in place and never replaces it. Sol conditioning sink and Morton tracking therefore retain their registration.
### Spectrum
Spectrum remains an external OUTER_SAMPLE / PREDICT_NOISE / SAMPLER_SAMPLE / DIFFUSION_MODEL wrapper stack. V2 calls the normal ComfyUI `guider.sample()` once per chunk. Spectrum starts and ends an independent runtime run for each call. Continuum imports no Spectrum private functions.
The recommended model chain is:
```text
UNET → Sage → Sol → LoRA → Spectrum → V2 Sampler
```
V2 then clones this ModelPatcher once; Spectrum's ON_CLONE callback creates an independent runtime binding on the clone.
## 6. State and Session
### V1 State
Contains only the maximum retained continuation tail and temporal metadata. It can start V2 through `initial_state`.
### V2 Session
Contains all accepted raw chunk AV latents plus:
- Prompt and SHA-256 Prompt hash
- per-chunk Seed
- Continuum Plan
- selected Context frames and motion score
- model/accelerator fingerprint
- branch parent/session identifiers
Tensors remain on CPU. Save Session writes safetensors and a JSON mirror atomically. The authoritative metadata is embedded in safetensors.
## 7. Reroll semantics
- `reroll_from_chunk=0`: reuse every matching accepted prefix.
- `reroll_from_chunk=N`: preserve chunks before N and regenerate N onward.
- A Prompt mismatch automatically stops reuse before the changed chunk.
- A first-frame fingerprint mismatch fails explicitly.
- A model/accelerator fingerprint mismatch is reported but accepted chunks remain fixed, because their latent output is already approved.
- The new output creates a child Session; the input Session is not mutated.
## 8. Audio timeline
H3 video is 24fps and audio latent is 40Hz. Decoded PCM is placed using cumulative integer boundaries:
```text
start_sample = round(cumulative_frames / 24 * sample_rate)
stop_sample = round(next_cumulative_frames / 24 * sample_rate)
```
This avoids the one-sample drift that can occur when every 119-frame segment is rounded independently.
## 9. Memory model
Full accepted AV latents are comparatively small and stored on CPU. The final decoded IMAGE is large, so V2:
- estimates final float32 IMAGE + one raw chunk + headroom before sampling;
- refuses unsafe jobs before expensive H3 work;
- allocates the final IMAGE exactly once;
- copies each decoded segment into its final range;
- avoids progressive whole-sequence concatenation.
## 10. Compatibility policy
The package checks:
- native `MiniMaxH3Model` class and required attributes;
- `PackedLayout` capability, including transparent `*args/**kwargs` wrappers;
- H3 temporal grid `(1,4,4,4,4)`;
- APPLY_MODEL and DIFFUSION_MODEL wrapper APIs;
- NestedTensor support;
- real PackedLayout row placement through the installer self-test.
Marked Continuum payload failures never silently fall back to stock reference placement, because that could render a plausible but semantically wrong join.
@@ -0,0 +1,93 @@
# R0 Failure Semantics Baseline
Date: 2026-09-14
Scope: current V3.8 Python-exception behavior
Storage root: pytest `tmp_path` only
## Isolation contract
すべてのfailure injectionは一時Run Storage rootで実施した。
```text
real h3_continuum storage touched: NO
existing Take / revision touched: NO
user backend 8188 touched: NO
GPU used: NO
public workflow changed: NO
```
このbaselineは、catch可能なPython exceptionが`RunStorageController.__exit__()`へ到達する場合を記録する。OS強制終了、電源断、process killの挙動を成功扱いしない。
## Results
| Injection point | Committed records after cleanup | Manifest status | Canonical pointer | Current observable behavior |
|---|---:|---|---|---|
| before Sampling | 0 | `interrupted` | none | errorを記録し、review pause metadataを除去 |
| after Sampling / before chunk commit | 0 | `interrupted` | none | sampled resultは永続化されない |
| after first entry of terminal physical group | 1 | `interrupted` | none | terminal pairの片側raw/recordがinterrupted revision内に見える |
| before manifest update (one-shot exception) | 1 | `interrupted` | none | in-memory recordを`__exit__()`が再度manifestへ書き、interruptedとして回収 |
| after manifest update | 1 | `interrupted` | none | committed recordを保持してinterrupted化 |
| before output projection | 1 | `interrupted` | none | recordを保持してinterrupted化 |
| during output projection | 1 | `interrupted` | none | recordを保持してinterrupted化 |
| before storage finalize | 1 | `interrupted` | none | in-progress recordを保持してinterrupted化 |
| before canonical pointer update (first `_write_project`) | 1 | `interrupted` | none | finalize途中のmanifestをexception cleanupがinterruptedへ戻し、2回目のproject writeはcanonicalを設定しない |
Assertions are implemented in:
```text
tests/test_runtime_redesign_r0_characterization.py
```
## Current write ordering
### `commit_chunk()`
```text
validate one logical entry
→ write temporary safetensors
→ fsync temporary
→ os.replace to chunk_000N.safetensors
→ fsync chunks directory
→ construct one record
→ replace manifest chunks in memory
→ write manifest
```
この処理はphysical group単位ではなくlogical entry単位である。terminal merged pairでも、1件目commitと2件目commitの間に例外が起きる窓がある。
### `finalize()`
```text
validate committed prefix and Session length
→ set status / review metadata
→ write manifest
→ build branch provenance
→ write manifest again
→ write project with set_canonical=True
```
Python exceptionが上位のstorage scopeへ戻れば、`__exit__()`はstatusを`interrupted`へ変更し、canonical指定なしでprojectを再書込する。
## Process-crash limitations
このR0 testは、次を保証しない。
- `os.replace(raw)`直後、manifest更新前にprocessが消失した場合のorphan raw回収
- 既存`chunk_000N.safetensors`を上書き中にprocessが消失した場合の旧manifest/raw整合性
- terminal pairの両entryを不可分にpublishすること
- manifest provenance書込後、project canonical更新前にprocessが消失した場合の再起動時selection
これらはR5のprocess-crash consistency対象である。R0でwrite orderやschemaを変更していない。
## R5-approved delta boundary
将来R5で許可される差分はV9どおり次に限定する。
- physical group全entryを先にvalidate
- immutable transaction raw filenames
- raw durabilityとSHA verification後にmanifestを1回でswitch
- `commit_group()`はcanonical pointerを更新しない
- canonical pointerはsuccessful finalize後だけ更新
Sampling結果、Session/State/Assembly、Review user-visible semantics、Run Storage v3 readabilityは変更しない。
@@ -0,0 +1,90 @@
# Failure Semantics Delta — R5
Date: 2026-09-14
Status: R5 Design Delta PASS / Implementation PASS / Validation PASS
Baseline: authoritative ComfyUI_W dirty tree, with R0–R4 PASS before R5
## Approved differences
R5 may change only these two externally observable failure details.
### D1: terminal physical-group manifest visibility
Previously, the first logical entry of a terminal merged pair could become
visible in an interrupted manifest before the second entry was committed.
R5 publishes all records of that physical group in one manifest replacement.
An incomplete terminal group is never manifest-visible.
After all raw files have been written and verified, catchable Python exceptions
may recover the entire terminal group as `interrupted`. They may not recover
only one logical half.
### D2: immutable transaction raw names and orphan layout
Legacy raw name:
```text
chunks/chunk_000N.safetensors
```
R5 raw name:
```text
chunks/rev-<revision>-txn-<transaction-id>-chunk-000N.safetensors
```
The reader continues to accept the legacy filename stored in existing v3
manifests. A retry uses a new transaction filename and never overwrites a raw
file referenced by an older manifest or Take. A process stop may leave an
unreferenced raw or temporary file. R5 does not adopt, promote, or delete that
orphan automatically.
## Manifest switch definition
```text
write a complete candidate manifest to a unique temporary file
→ flush and fsync the temporary file
→ atomically replace the active manifest
→ run the available directory durability helper
```
The completed atomic replacement is the **manifest visibility switch**. The
subsequent directory helper completion is the **manifest durability
completion**. Process-stop tests observe the state before replacement,
immediately after replacement, and after the directory helper separately.
On Windows, atomic replacement and media-level durability are not treated as
equivalent. The current Windows directory helper is a no-op; validation records
that limitation and does not claim power-loss or OS-crash durability.
## Behavior that remains unchanged
- non-terminal accepted-prefix meaning and resume position
- manifest status and Review/Take behavior
- canonical eligibility, fallback selection, and pointer meaning
- Sampling, Projection, and finalize failure semantics
- accepted chunk tensors, seeds, prompts, Session, State, and Assembly data
- Run Storage v3 schema readability
- Storage OFF filesystem-I/O behavior
`commit_group()` writes physical-group raw files and publishes their records.
It never updates the canonical project pointer. Canonical promotion remains in
the existing successful-finalize path.
## Process-stop acceptance
- Before manifest replacement, a fresh reader sees the previous complete
manifest. Any new raw files are unreferenced orphans.
- After manifest replacement, every raw referenced by the new manifest exists,
has the recorded size, and matches the recorded SHA-256.
- At the replacement boundary, the active file is a complete old manifest or a
complete new manifest. A partial JSON file and a half terminal group are
invalid.
- A forced process stop does not run `__exit__`; it is not required to change
status to `interrupted`.
- Existing canonical fallback selection is preserved even in windows where the
project pointer has not yet been replaced.
The test fixture covers raw-write, raw-verification, manifest-temporary,
manifest-replace, directory-helper, finalize-manifest, and project-pointer
boundaries with a separately terminated worker and a fresh reader.
+16
View File
@@ -0,0 +1,16 @@
# Future roadmap after V2
V2 is the integrated production path. Future changes must preserve V1/V2 schemas and remain optional.
Possible additions:
- streaming decode/save that does not retain the complete final IMAGE tensor;
- interactive per-chunk approval UI with a frontend timeline;
- persisted multiple child branches and branch comparison;
- richer identity diagnostics using optional external encoders;
- adaptive Spectrum seam policy only if Spectrum exposes a stable public hook;
- reference-video / Ref2VA identity-memory mode;
- multi-resolution continuation through explicit regeneration, never silent resize;
- batch-independent server/API orchestration.
These are not promises for a specific release. The current V2 avoids private accelerator APIs so updates remain maintainable.
@@ -0,0 +1,127 @@
# Issue #31 — Attention and Spectrum reuse signatures (3.9.5)
## 3.9.11 — stable supplemental loaded-code audit
Repeated imports of unchanged audited Spectrum source can produce different
marshal bytes for equivalent normalized code objects, observed with Python
3.13.12. This can mark a new Run read-only even though no source or settings
changed. It is a signature observation failure; the reporter's exact environment
has not been reproduced.
The original audit remains the first path. Only differences in function
`code_sha256` fields can trigger a supplemental audit. Fixed
`spectrum_code_audit_v1_py312.json` and `spectrum_code_audit_v1_py313.json`
profiles check all loaded provider module descriptors: typed code fields and
nested constants, defaults, keyword defaults, closures, class members and
provider references. Float/complex bits and constant types are preserved.
Source hashes, exact Python file sets, module provenance and runtime-state
checks remain required. Unknown constants or missing/invalid profiles reject
reuse; independent Attention failures remain failures.
The profiles are bound to the original metadata digest and complete audited
source set. They are generated offline with `tools/build_spectrum_code_audit.py`,
using explicit audited provider roots; opposite provider/module import orders
must produce identical bytes. The runtime never builds a profile, executes
provider functions, imports Spectrum or learns an approval from current code.
All four legacy provider metadata files and the returned persistent identity
remain unchanged. Normal pre-repair v6 Takes retain compatibility. Stored unsafe
Takes and v5 history stay readable and read-only; the repair never edits their
flags or manifests. Use a new Run when checking a previously rejected setup.
Sampling v6, Graph v4, Run Storage, public inputs and shipped workflows are
unchanged. Targeted browser/GPU Review continuation passed with the audited
local Spectrum provider and Kitchen Attention: Chunk 1 retained, Chunk 2
generated, one reused / one new, both AV outputs fully decoded. The supplemental
path is proven by CPU reproduction; its use during GPU execution is not traced.
See RELEASE_NOTES_V3911.md for environment, limits and the separate third-party
MP4 menu-thumbnail workaround.
CPU/JS validation: **2,139 passed / 2 skipped / 2 known Inspector expected
failures**, zero unexpected failures or CUDA initialization attempts. This
includes the existing 90-case Queue JS fixture. An additional 53 real-Core
observer/storage cases matched the production UI's read-only predicate: 30
reusable and 23 intentionally rejected. These use tiny CPU fixtures and actual
Core function references; no Attention kernel or H3 inference runs. Four normal
v6 Takes saved by pre-repair code kept identical full contracts and reused
Chunk 1 without changing their source files. Existing tests also preserve
unsafe/v5 history and reject reuse through the storage entry points.
Python 3.12 component coverage passed 155 tests with one skip; 21 tests tied to
the older Core's separate Attention limitation were excluded. The storage matrix
still checks that environment's eight Kitchen cases remain non-reusable for
its unobservable helper. This repair does not resolve that independent failure.
### 日本語 — 3.9.11の補助監査
同じ監査済みSpectrumを再読込した際、同等のコードでもmarshalの保存表現が変わり、
再利用不可になる条件へ対応します。旧監査を優先し、関数のコードハッシュだけが
異なる場合に限り、固定プロファイルでコードと読込済み記述全体を再検査します。
未知のコード・既定値やclosureの変更・追加状態の拒否は維持します。
旧署名を変更せず、正常な既存v6 Takeの互換性を保ちます。過去のunsafe/v5 Takeを
自動的に再利用可能にはしません。対象を限定したSpectrum+Kitchenの実ブラウザー・GPU検証で、
Review操作とChunk 1保持/Chunk 2生成を確認しました。詳細と制約はRELEASE_NOTES_V3911.mdを参照。
## 3.9.10 — Spectrum audit portability
The repair treats source CRLF and LF line endings as equivalent
in both the provider-file audit and provider module closures. All other source
bytes and the exact supported Python file sets remain checked. The canonical
source hashes are unchanged, so existing valid Python 3.13 signatures retain
their identities.
Separate `spectrum_provider_v1_py312.json` and
`spectrum_provider_v029_py312.json` profiles identify the same audited source sets
under Python 3.12. They were generated and checked with Python 3.12.10; the
original profiles remain byte-identical for Python 3.13.12. Other Python runtimes,
altered implementations, foreign closures and unknown runtime fields remain
non-reusable. The adapter does not execute provider functions to approve reuse.
This repairs Spectrum observation, not every Core/Kitchen/KJ combination.
Independent Attention/provider checks must also pass. In particular, an older
Core/Kitchen environment can still fail its own Attention observation even when
Spectrum is recognized. Do not upgrade Python or replace Attention solely to
make an old Take reusable. Keep old history and start a new Run after updating.
No new GPU or reporter-exact acceptance is claimed for this repair.
The standard CPU/JS gate passed **2,096 tests / 2 skips / 2 known expected
Inspector failures**, with compile and offline registration checks passing.
Separate-process storage probes passed 16 Python 3.13 PyTorch/Kitchen cases and
eight Python 3.12 Spectrum/default-model cases; actual Take read-only JavaScript
matched all 24. The six previously valid full Sampling Contracts stayed exact.
These CPU checks execute no Attention kernel or H3 checkpoint inference.
### 日本語 — 3.9.10の局所修正
Spectrum監査でCRLF/LFの改行差を同一として扱い、対応済みソースにPython 3.12用の
固定プロファイルを追加します。既存3.13の正常な識別値と旧Takeは維持します。
未知のコード・追加状態の拒否は継続します。Spectrumが識別可能でも、Core/Kitchenなど
別の観測に失敗する環境は再利用不可のままです。適用後は新規Runで確認してください。
旧履歴を利用可能にする目的でPythonやAttentionを変更する必要はありません。
## 3.9.8 Preview Override Phase A (2026-10-16)
The new adapter is restricted to the KJ source profile in `preview_override_provider_v1.json`: Preview Override SHA-256 `d07c8e5ff7d7abd3e31acefe2cf29f618b5da5341b3b434e72ec2ac0953230b0`, audited sibling helpers and Core preview/dispatcher files. The complete profile digest is part of the persistent identity, so later dependency-profile upgrades cannot retain the same identity accidentally. It compares loaded functions, nested code, defaults and supported classes with the pinned source; it never imports KJNodes, executes a preview callback, loads a VAE or initializes CUDA during signature observation. Source line endings are normalized to LF for provider auditing.
After that audit, the exact builtin `frames` list is treated as execution-local display data. Max resolution, node ID, JPEG quality, suppression, frame count, FPS and supported Core preview settings remain part of the identity. Core's cross-key insertion order and each wrapper list's order are preserved explicitly, because the generic dictionary observer sorts keys. The ordinary non-KJ signature path is unchanged.
Phase A requires `vae is None`, `audio_vae is None`, KJ Tiny VAE `none`, and Core NoPreviews/Auto/Latent2RGB. Unknown files, replaced code/defaults/helpers, extra wrapper state, foreign classes and approximate-VAE previews keep reuse disabled; they are not promoted by an empty frame list. This profile does not claim support for every KJNodes 1.5.2 checkout or the different upstream Preview Override source. No general `frames` exclusion is added.
Existing normal non-KJ Sampling v6 identities remain exact. Earlier safe KJ identities may differ and cannot be assumed reusable; earlier unsafe/v5 histories remain preserved and read-only. Start a new Run after updating; old KJ history is not migrated. Full real-Core CPU gate: 1,995 passed / 3 skipped / 2 existing Inspector expected failures / zero unexpected failures and CUDA initialization attempts; the 48 dedicated KJ tests passed without skips. Normal ComfyUI GPU acceptance passed four Core-API Queues: PyTorch and Comfy Kitchen INT8 + the audited local Spectrum implementation, each with separate-Queue Chunk 1 to 2 continuation and held preview images. Both second Queues reused one chunk and generated one; original Chunk 1 bytes and contracts were unchanged. All four video/audio outputs fully decoded. See docs/KJ_PREVIEW_OVERRIDE_V398.md for exact support and limits. Product files used in this targeted GPU gate are byte-identical to the 3.9.8 repair. Browser Run-button behavior, subjective preview quality, reporter-exact reproduction and per-kernel return tracing are not newly accepted.
## Previous 3.9.5 Attention / Spectrum repair
With Model Attention Backend between a LoRA Loader and Spectrum, cyclic Attention closures and a slots-based SpectrumH3Binding could be unobservable. Generation still succeeded, but Sampling v6 correctly refused reuse with "Saved history is read-only". This update identifies the reviewed runtime implementations rather than forcing resume_safe.
Core PyTorch and Comfy Kitchen INT8 overrides are identified by their loaded functions, defaults, closures, both container paths and numerical/provider state. Spectrum identity includes all 27 effective immutable config fields and audited source/loaded-function contracts. Reviewed history, counters and statistics do not change persistent identity. Unknown sources, foreign module closures, extra runtime state and altered implementations remain non-reusable.
Two explicit Spectrum source profiles are included: upstream v0.2.29 at commit 806fe498d574a726fecb8818917f00a4b993fd77 (55 provider files), and the prior audited 44-file implementation. Versions/class names alone do not enable reuse. The loaded-function contract is environment-specific: validation uses Python 3.13.12, ComfyUI Core 0.40.0 and comfy-kitchen 0.2.37; other source/runtime combinations may remain read-only. BSA/Flow/Untwist and KJ/Sage patch-node combinations are outside this targeted acceptance.
Update the custom node and restart ComfyUI. Start a new Run. Existing unsafe/v5 Runs are preserved and are not repaired or promoted; normal unaffected Sampling v6 identities remain compatible. Sampling v6, Graph v4, Run Storage v3, public IDs/socket order and shipped workflow bytes stay unchanged.
The signature gate passed 152 CPU tests with one original-profile-only skip and no failures; CUDA initialization attempts were zero. Full standard validation passed 1,893 tests with 2 skips and 2 existing Inspector expected failures (zero unexpected failures and CUDA initialization attempts). Public upstream 0.2.29 PyTorch/Spectrum and Kitchen/Spectrum new-Run GPU gates both passed separate-Queue Chunk 1→2 continuation, prefix/contract preservation and complete 512x512 / 24fps / 10-second AV decoding. Actual CUDA backend returns were observed. Existing Inspector reconfigure expected failures, browser acceptance, visual/audio quality and benchmarks remain separate.
## 日本語
Model Attention BackendとSpectrumを併用したReview継続で、Attentionの循環参照とslots付きBindingを観測できず、生成後のTakeが再利用不可になる問題へ対応します。全27設定値・実ソース・読み込まれた関数を識別し、実行中の履歴や統計値は永続署名へ含めません。resume_safeを強制せず、未知の実装や追加状態は安全側で拒否します。
公式Spectrum v0.2.29の固定コミットと、以前に監査した44ファイルの実装を別プロファイルとして扱います。別のSpectrum版、別のPython/Core実装、BSA/Flow/UntwistやKJパッチの組合せ全般を保証するものではありません。更新・再起動後は新しいRunを作成してください。以前のunsafe履歴を自動修復せず、既存TakeとWorkflowは保持します。
@@ -0,0 +1,95 @@
# KJ Model Preview Override continuation — 3.9.8 / Phase A
The audited Preview Override wrapper can keep its transient image list without changing the MODEL sampling identity. The adapter retains fixed settings, source and loaded implementation checks, the complete audit-profile digest, and Core's cross-key/list wrapper execution order. It does not add a generic exception for any field named `frames`.
## 3.9.9 public-provider repair
The source checkout additionally accepts the pinned upstream implementation from
[KJNodes commit 17195fc](https://github.com/kijai/ComfyUI-KJNodes/blob/17195fcfa8a05f601b766a0f09c9733284f47416/nodes/preview_override_node.py).
Its LF-normalized Preview Override SHA-256 is
`1916295463eb790d3e8ea2b0dae2b25344549479b92e90a1d238acddb2dde3ab`,
profile `kj-preview-upstream-17195fc-phase-a` in
`preview_override_provider_public_v1.json` (canonical profile SHA-256
`da128a4324d8e0a63d893501f8d65652d25da60690afaf1447d80f2a2b67617f`). Its sibling and Core hashes are the
same as the original table below. The wrapper implementation is unchanged; the
node factory additionally resolves display IDs through Core's DynamicPrompt.
Both source and loaded-code audits remain required. This does not cover arbitrary
KJNodes versions, future Core changes or preview-VAE configurations.
The original profile JSON and successful descriptors are preserved. Profile
registration alone cannot invalidate another profile's Takes. KJ-free contracts
are unchanged. Missing or malformed optional public-profile data disables only
that profile. Ordinary generation keeps its existing fallback.
Review and Render History distinguish v5 history from v6 Takes whose generation
conditions could not be verified. Bounded saved reasons identify unsupported
preview settings or implementations; missing metadata points to Detailed Report.
Reasons come from the selected Take's storage revision and do not affect its
sampling identity or enable disabled actions.
For an unsupported KJ/Core implementation, bypass **Model Preview Override** in a
workflow copy and test a new Run. For unsupported preview VAE settings, disconnect
only that preview node's optional VAE/Audio VAE and use Tiny VAE `none`; keep the
generation VAEs connected. For Core approximate-VAE preview, use Auto or
Latent2RGB. Correct the configuration before starting a new Run: repeatedly
restarting Chunk 1 with the same unsupported setup will not repair it.
Old unsafe/v5 Takes remain readable and are never promoted or rewritten.
Full real-Core CPU regression: **2,075 passed, 2 skipped, 2 known Inspector
expected failures, zero unexpected failures**. The 90-case production-JS fixture
also passed with eight real Run Storage project vectors. These checks overlap
the pytest total and must not be added together. Unmodified 3.9.8 fixtures confirm
exact legacy/KJ-free identities and byte-identical saved Takes; all 21 existing
workflow JSON/ZIP files are unchanged. Offline registration retains twelve nodes
and passes native PackedLayout / Fixed 3x5s checks. Recorded CPU drivers attempted
zero CUDA initializations. The skips cover a local-only Spectrum descriptor
fixture on upstream Spectrum and an unavailable historical V3.5 workflow.
The additional public profile passed two targeted H3 GPU Queues with cached
preview images and unchanged Chunk 1. Normal-ComfyUI browser Continue passed
separately with the retained original local profile. See
[3.9.9 validation and limits](RELEASE_NOTES_V399.md). The historical v3.9.8 tag
and assets retain their original local-only profile.
## Exact supported profile
The published v3.9.8 package accepts only the following explicitly audited source combination. KJNodes reports 1.5.2, but that version alone does not identify the supported implementation: this Preview Override file differs from upstream. The 3.9.9 extension is described above. Files are LF-normalized before source hashing. An unsupported provider remains non-reusable rather than blocking ordinary generation.
| Source | SHA-256 |
| --- | --- |
| KJ `nodes/preview_override_node.py` | `d07c8e5ff7d7abd3e31acefe2cf29f618b5da5341b3b434e72ec2ac0953230b0` |
| KJ `nodes/tiny_vae.py` | `61bf4daa634ef6bb901ff8630071caed12e733d17e7c4ba50082dc0aa5506591` |
| KJ `nodes/ltxv_nodes.py` | `11286583c56e653dbd57f5e8eda6902c84b759f16b359b3bf0c895b43e6b5364` |
| Core `latent_preview.py` | `b323be881ade3388254a72f5463e329f6d0a263b0078b69ae4256eb4e22dbba2` |
| Core `comfy/patcher_extension.py` | `1c7b3b855278d0b95d1c1a705fa0b3c91a265f320e2f97bdeb9d15469d6d4ac7` |
Profile: `kj-preview-1.5.2-local-d07c8e5-phase-a`. Canonical full-profile SHA-256: `d146bd89895fef5a8d576134d519e63bbf4ac1c35188f70b4de4e4ebfb498fc7`. The provider JSON is shipped with the runtime adapter.
Preview Override's optional VAE and Audio VAE must be disconnected, Tiny VAE must be exactly `none`, and Core preview must be NoPreviews, Auto or Latent2RGB. A generation Video/Audio VAE is still used normally; the restriction concerns the preview node's optional connections. Core approximate-VAE/TAESD, altered helpers, unknown wrappers, extra state and other providers are outside this profile. Source alone is insufficient: loaded functions, nested code, defaults, classes and selected bindings must match the audited implementation.
## Update and history protection
Restart ComfyUI, refresh the browser and create a new Run. Do not delete or rewrite old Runs/Takes. Earlier safe KJ identities may differ; old unsafe/v5 history is not repaired or promoted. Ordinary non-KJ Sampling v6 signatures remain exact. Sampling v6, Graph v4, Run Storage v3, State/Session formats, public node inputs and official workflow files are unchanged.
## Validation
Full real-Core CPU validation: 1,995 passed, 3 skipped, 2 existing Inspector expected failures, zero unexpected failures or CUDA initialization attempts. The dedicated real-provider tests passed all 48 cases, including 0/1/multiple held frames, reconstruction, fixed-setting changes, wrapper ordering, source/code/default/helper changes, VAE exclusion, Attention/Spectrum combinations, prefix preservation and old unsafe history. Offline registration retains twelve nodes.
The initial acceptance used the same repair product bytes. A subsequent recheck installed all 464 files from the published v3.9.8 tag (`58fbd855`), restarted normal ComfyUI, verified the live 3.9.8 startup banner and saved adapter/profile identity, and passed four new-Run GPU Queues:
| New Run | First Queue | Separate second Queue |
| --- | --- | --- |
| Model Attention Backend PyTorch + KJ Preview Override | Generate Chunk 1; 8 held images | Reuse Chunk 1, generate Chunk 2; 16 held images |
| Model Attention Backend Comfy Kitchen INT8 + audited local Spectrum + KJ Preview Override | Generate Chunk 1; 8 held images | Reuse Chunk 1, generate Chunk 2; 16 held images |
In both second Queues the KJ MODEL node was cached, the Sampler executed, the stored contract/revision stayed equal, and original Chunk 1 latent bytes were unchanged. All four video/audio outputs fully decoded (first Queue 5 seconds / 120 frames; second Queue 10 seconds / 240 frames, 512x512, 24fps). Saved contracts recorded Sampling v6, resume_safe=true and the pinned adapter/profile identity. Runtime source hashes and stored descriptors verified the repair was actually loaded.
Conditions: RTX 5060 Ti 16 GB, Python 3.13.12, PyTorch 2.14.1+cu130, Core 0.41.0, frontend 1.55.17, comfy-kitchen 0.2.37; 8-step Turbo LoRA, Euler/simple, 2x5-second chunks, Review Each Chunk / Continue, saving and Auto Resume on. Preview Override: resolution 512, quality 80, one frame, 12fps, suppress default on, VAE/Audio VAE absent and Tiny VAE none; Core Auto. Spectrum used the previously audited local implementation with offline smoothing/replay, system-RAM history/archive and model-aware off. This does not newly validate upstream Spectrum 0.2.29 combined with KJ, other wrapper orders, Sage patch nodes, or all preview configurations.
These were controlled submissions through the normal Core API. Browser Run-button/save-reload behavior, reporter-exact reproduction, per-kernel CUDA return tracing, subjective audiovisual/preview quality and performance benchmarks are not newly accepted. Held PNGs were 32x32, so the image counts do not establish high-resolution preview quality. The two known Inspector reconfigure expected failures remain. Existing workflow files and prior Takes were hash-protected; no history migration occurred. GitHub Release/package verification, Registry upload/moderation and real Manager installation remain distinct publication checks.
## 日本語
監査済みKJ Preview Overrideの一時画像だけを永続署名から分離し、固定設定・実装識別・ラッパー順序を保持します。KJNodes 1.5.2全体ではなく、上表のソースと読み込み済み関数を照合できる実装だけが対象です。VAE/Audio VAE未接続・Tiny VAE none・Core NoPreviews/Auto/Latent2RGBが条件です。
更新後は再起動し、新Runを使用してください。旧Take・Workflowの削除や移行は不要で、旧unsafe履歴は再利用不可のまま保持します。CPU 1,995成功(専用48件を含む)、PyTorchおよびKitchen+ローカルSpectrumの各2 Queueで画像保持後のChunk 1→2継続、元Chunk 1保持、4本の映像・音声全デコードを確認しました。初期の同一製品コードによる受入後、公開タグv3.9.8(58fbd855)を実環境へ反映・再起動して、新Runで同じ2構成の4 Queueも再確認済みです。画質・速度・実ブラウザー操作・全KJ構成への合格は主張しません。
@@ -0,0 +1,28 @@
# Loader persistence repair — 2026-09-21
Base: `3d7c2fd6928a545b12b84968b09dc455e7f9da65`.
Image keeps its Core-backed implementation and Enable convenience toggle. The mode descriptor lookup walks the prototype chain; a tracked Core accessor is called rather than shadowed by a detached closure. Draw/serialize/configure functions and widget collections are not replaced. The former drawing swap could truncate a stable Core widget view, separately from Issue #23's mode-store divergence. New regression models both failures.
The current paired official V3.8X2 workflows replace H3EasyLoadAudio with Core LoadAudio and H3ContinuumLoadVideo with Core LoadVideo + H3ContinuumVideoAdapter. Core titles, original media names, disabled input branches, video 24fps setting, and all unrelated node values and original links are preserved. Video/audio outputs remain wired through the old output node ID. Core LoadVideo and the converter are kept in the video input group. Disable the converter or entire group, not only the Core input while its adapter remains active.
Legacy H3EasyLoadAudio/H3ContinuumLoadVideo remain registered/deprecated. Their old backend input contracts remain intact. The new converter has no Enable, file selector, upload handler or custom JavaScript. It uses the established _resample_video_frames() and passes existing audio through without resampling. Source rate 24 is a frame-object no-op; 30/29.97 to 24 uses the existing duration-preserving selection. This does not claim VFR timestamp-aware conversion or motion interpolation.
No user Windows worktree, installed runtime, GPU, queue, saved workflow, Run Storage or Takes were accessed. A Core 0.36.0/frontend 1.53.6 live-browser save/reopen, A->B->A, direct/right-click Bypass and upload check remains pending. The fixed H3情報チェック handoff is PENDING: cross-task transport is unavailable in this session. No Release/tag or Registry publication.
Files already saved without their selection/OFF state require one explicit user reselection; never reconstruct them from defaults. Upstream graph replacement may correctly create a new Run Storage revision, so retain an old workflow for resuming its saved run.
## Validation result
- Original-code regression: 6 cases; 3 expected failures and 0 collection/runtime errors.
- Focused CPU/Node suite: 46 passed, zero failures/errors/skips.
- JavaScript module syntax, changed Python compilation, workflow JSON/ZIP parity, endpoint consistency and git diff whitespace checks passed.
- Official workflow structural guard preserved every non-loader node, each original link, and non-layout workflow metadata.
- Scope: isolated GitHub Actions CPU runner, not Windows deployment or a real-browser/GPU test.
## Loader repair full-suite follow-up (2026-09-21)
- Main repair `f8eb40d8b44e54386bcf3c5197c48f0f71daf6df` passed the 46 focused tests. Its first full CI returned 1376 passed, 3 skipped, and one stale pre-migration workflow fingerprint failure in `test_v38x2_decode_cache_integration.py`.
- Updated only that expected fingerprint to the user-approved migrated workflow (1B2212B7511FAC0B63DFA6E9F006CD8644C72D08C6945AB0E4ED0E722C97A730); all Decode Cache route and output assertions remain. No runtime or workflow bytes changed in this follow-up.
- Full isolated CPU/Node suite: 1377 passed, 3 skipped, zero failures/errors. Actions run 35558988542. Source was snapshotted with `tools/snapshot.ps1` before edits; source/Registry manifest hashes verified.
- Windows deployment, live-browser checks and GPU generation were not performed; fixed H3情報チェック handoff remains pending. No Release/tag/Registry publication.
@@ -0,0 +1,69 @@
# Branch Provenance Contract v1
Status: V3.8 N2b implementation contract.
## Purpose
Branch Provenance records which immutable physical-group revision is active at
each point in a Run Storage chain. It allows a user to select an older Take and
generate only the physical groups after that Take without deleting the former
branch or confusing equal nonces with equal ancestry.
Take labels are presentation only. Internal identity is always `revision_id`.
## Physical-group revision
Every completed physical group records:
- `revision_id`: immutable SHA-256-derived identity;
- `parent_revision_id`: the immediately preceding physical-group revision;
- `group`: one-based `start`, `end`, and `physical_group` values;
- `variation_nonce` and `seed_identity`;
- `storage_revision_id` and `generation_contract_sha256`;
- `lineage_sha256` and immutable chunk record identities;
- `created_utc` plus deterministic `revision_order`;
- optional `branch_cut` metadata.
Terminal Merge `[N-1,N]` is one physical group. A chain that contains only one
logical half is invalid.
## Canonical chain
`project.json` has exactly one `canonical_chain`, one
`canonical_head_revision_id`, and an `active_revisions` map. Browsing Takes does
not change them. `Use This Take` or `Continue From Here`, followed by the normal
Queue action, creates a finalized Schema v3 storage revision and atomically
switches the canonical chain.
`Continue From Here` keeps the selected prefix exactly and starts a new existing
sampling nonce boundary at the next physical group. The Sampling Contract itself
remains version 5 and is not extended with provenance fields.
## Run Storage Schema v3
Schema v3 separates `revision_id` (storage execution identity) from
`sampling_revision_id` (the unchanged Sampling Contract identity). A finalized
manifest contains Branch Provenance v1 metadata with its complete active chain,
branch selection/cut when applicable, and a monotonic `canonical_sequence`.
The write order is:
1. save and fsync new chunk payloads;
2. validate all logical records in the completed physical group;
3. atomically write the finalized manifest and its active chain;
4. atomically replace `project.json` with the new canonical head.
A failure before step 4 leaves the preceding canonical project head intact.
If `project.json` is corrupt, the highest validated `canonical_sequence` in a
finalized manifest is the recovery source. In-progress and interrupted revisions
are not Render History Take candidates.
## Schema v2 compatibility
Schema v2 manifests remain readable and are never rewritten merely by loading
them. Their contiguous records are interpreted in memory as a legacy chain with
one canonical physical-group revision per group. The first Schema v3 save uses a
separate storage revision directory, so the legacy manifest and payloads remain
unchanged.
No automatic Take garbage collection is part of N2b.
@@ -0,0 +1,215 @@
# Runtime Redesign R0 Characterization
Date: 2026-09-14 (Asia/Tokyo)
Phase: R0 only
Architecture changes: none
## 1. Historical baseline
この文書は2026-09-14時点のR0 CPU characterizationです。現行3.9.1の受入結果ではありません。当時の実装・Workflow・既存変更を保持した状態で調査し、アーキテクチャ変更やGPU生成は行っていません。
## 2. Baseline validation
R0変更前:
```text
full CPU pytest: 1187 passed, 1 skipped, 1 warning, 62.18 s
frontend_review_queue.cjs: 46 passed
tools/verify_runtime.py: PASS
registered public nodes: 7
```
実ComfyUI Queue、GPU、VAE DecodeはR0の対象外であり未実行。
## 3. Continuation source baseline
### 3.1 Storage OFF
| Inputs | Accepted prefix | Effective generation start | Continuation state | Current result |
|---|---:|---:|---|---|
| none | 0 | Chunk 1 | none | fresh Full Run |
| compatible explicit Session with 1 accepted chunk | 1 | Chunk 2 | last accepted Session entry | prefix reuse |
| Session + `Regenerate From = 2` | 1 | Chunk 2 | Session Chunk 1 | Chunk 2以降を再生成 |
| incompatible explicit Session | 0 | Chunk 1 | none | Sessionをadvisory rejectしてfresh run |
| initial State only | 0 | logical Chunk 1 | supplied State | generated plan is continuation and increments State `clip_index` |
| compatible Session + valid State | Session prefix | prefix後 | Session last entry | StateはSession検証前に抑止 |
| invalid Session + valid State | 0 | Chunk 1 | none | Stateへfallbackせずfresh run |
| initial State + invalid `Regenerate From > 1` | n/a | n/a | n/a | `SequenceRuntimeError` |
重要なV9との差分: 現在の`_preserved_prefix()`はSession validation、resolution、duration、identity不一致を例外として外へ出さず、noteを付けて空prefixを返す。このため、V9の「invalid/incompatible Sessionなら既存Sessionエラー」は現行実装の事実ではない。
実際の現行結果は次である。
```text
Session present + initial State present
→ initial State = None
→ Sessionを検証
→ Session invalid/incompatibleならSession prefixを0件へ落とす
→ initial Stateには戻らない
→ fresh Chunk 1を生成
→ reportへ "saved session was ignored; generated a fresh run (...)"
```
したがってR1以降で維持すべきbaselineは、ユーザーが別途変更を承認しない限り「no State fallback + advisory fresh run」である。
Storage OFF characterizationでは、Run Storage Review policy invocationは0、Run Storage filesystem I/Oは0だった。
### 3.2 Run Storage ON
| Inputs / saved state | Current result |
|---|---|
| explicit Session present | `RunStorageError: Run Storage cannot be combined with an explicit Session`。storage書込前に停止 |
| validated saved prefix + initial State | saved prefixが優先。Stateはcontinuation sourceにならない |
| no saved prefix + initial State | initial Stateを使用 |
| Review Continue | review decisionを作成後、prefix実読込後にreconcileして再度decisionを作成 |
現在のReview Continue decision-producing pathを隔離すると、pure policy callは2回だった。
```text
_resolve_review_contract()
→ resolve_review_execution() # first decision
→ prefix selection/load
→ _reconcile_review_execution_with_reused_prefix()
→ resolve_review_execution() # second decision
```
`_validated_review_head()`も同じpure functionをmetadata validationに使用するが、その戻り値はQueue decisionではない。R2の「Decision 1回」は上記decision-producing 2経路を1経路にする課題であり、R0では変更していない。
## 4. ContinuationSourceFacts mapping baseline
この型とprojection関数はR0時点のsource treeには存在しない。R3/R4で新しい意味を作らないため、現行runtime値からのmappingを次で固定する。
| selected kind | `accepted_chunks` | `reroll_from_chunk` | `physical_group_boundaries` |
|---|---:|---|---|
| `run_storage` | 実際にraw検証とloadを通過した`best_entries`数 | final branch contractの有効boundary。通常continueは0 | accepted prefix内で完全に成立した現行physical groups |
| `explicit_session` | `_preserved_prefix()`が受理したentries数 | explicit Session経路の実効`reroll_from_chunk` | terminal atomicity適用後、accepted prefix内で完全に成立したgroups |
| `initial_state` | 0 | 0または現行で許可される1 | empty tuple |
| `none` | 0 | 0(plain Full Run baseline) | empty tuple |
`initial_state`はaccepted raw prefixではない。logical Chunk 1のSamplingにcontinuation stateを供給するだけである。
## 5. Current validated-prefix representation
R0 source treeには`ValidatedPrefix`、`EmptyValidatedPrefix`、`PrefixFacts`、`ContinuationSourceFacts`、`to_planning_facts()`はまだ存在しない。現在は次のmutable valuesへ分散している。
- `review_head`: `revision_id`, `status`, `validated_prefix_count`, `review_unit`, `branch_regenerate_from`, `effective_reroll_nonce`, `updated_utc`, `manifest`
- `best_entries`: raw existence、SHA-256、entry contractを通過して実際にloadされたentries
- `best_records`: accepted entriesに対応するmanifest records
- `RunStorageController.reused_count`: `len(best_entries)`
- `RunStorageController.review_execution`: prefix load前decisionを、load後reconcileで置換した値
よってV9の`ValidatedPrefix.to_planning_facts() -> PrefixFacts`は「現行契約」ではなく、R2で導入する将来契約である。R0でその型を追加するとR1/R2実装へ先行するため、追加していない。R2で導入する場合も戻り型を`ContinuationSourceFacts`へ流用しない。
## 6. ReviewUnit inventory
Productionの`ReviewUnit`定義は1種類だけである。
```text
v3/review_control.py
class ReviewUnit(start, end, physical_group)
```
Production usage:
- `v3/review_control.py`: unit作成、normalization、pause metadata、Review/Take policy
- `run_storage.py`: import、review group marker、pause metadata validation、finalize validation
- `v3/nodes.py`: `review_execution`からprojection rangeを読む。別`ReviewUnit`型は定義しない
R0検索では別の`class ReviewUnit`は存在しなかった。
## 7. Required behavior coverage map
新しいR0 testは`tests/test_runtime_redesign_r0_characterization.py`に隔離した。既存fixtureと合わせた代表coverageは次の通り。
| Contract | Characterization coverage |
|---|---|
| Review Q1 → next → complete | `test_limit_one_returns_one_new_chunk_and_prefix_assembly`, `test_prefix_five_generates_only_chunk_six_and_completes`, L0/L1 storage tests |
| Regenerate Current | N0-N5 and terminal regenerate tests in `test_v38_review_run_storage.py` |
| Finish Remaining | `test_n5_finish_remaining_keeps_current_branch_nonce`, `test_finish_remaining_complete_records_the_final_generated_group` |
| Use This Take / Continue From Here | N2B take-selection, canonical, and continue tests |
| Back to Settings compatible extension | `test_i2va_two_to_three_reuses_both_canonical_prefix_chunks` |
| terminal physical group | terminal atomic tests in execution-cap and Run Storage suites |
| Session/State precedence | new R0 characterization tests |
| Balanced 22 / Strong 39 | new parametrized R0 characterization test |
| Reference Image / Audio and Refine Context | `test_audit_boundary_repairs.py`, `test_v35_context_sampler.py` |
| Video Reference | `test_p46a_reference_video_memory.py` and sequence contract tests |
| Timeline Video | `test_timeline_video.py` |
| Driving Audio | `test_v34_driving_audio.py` |
| Second Pass | `test_v35_second_pass_contract.py`, `test_v35_second_pass_sampling.py`, selective node tests |
| external wrappers | graph-contract Turbo/Sage tests and `test_model_patch.py` |
## 8. Hardening signature baseline
`hardening.run_sequence_with_hardening()` calls `inspect.signature(base).bind_partial(...)`. The current keyword-only `run_sequence` signature contains 41 parameters, in this order:
```text
model
clip
video_vae
audio_vae
sampler
sigmas
first_frame
last_frame
prompt_plan
width
height
continuity
base_seed
audio_continuity
exact_total_duration
diagnostics_mode
reroll_from_chunk
reroll_nonce
strict_compatibility
debug
seam_correction
enable_preview
session
initial_state
latent_only
reference_assets
reference_audio_source
reference_audio_vae
driving_audio_source
driving_audio_vae
reference_video_source
timeline_video_source
guide_source
capture_refine_context
memory_attribution
prompt_conditioning_cache
reference_encode_cache
continuation_transport
max_new_physical_groups
_memory_attribution_collector
_diagnostic_continuation_policy
```
R4 thin adapterはこの名前・keyword-only形・defaultsを維持する必要がある。
## 9. R1 concrete plan (not implemented)
R1はProjectionだけに限定する。
1. 現在`v3/nodes.py`にある`_review_decode_chunk_range()`の判断を、torch/ComfyUI非依存のpure `ProjectionDecision`へ写す。
2. `full_accepted_prefix`と`current_review_unit(start,end)`だけを表現する。
3. 現在の`_apply_review_decode_scope()`のTensor/Assembly再構築をOutput Projectorの単一ownerへ移す。
4. Session、full Refine Context、Run Storage recordsは切り詰めず、表示用Video/Audio latentとAssemblyだけを同じrangeで投影する。
5. terminal merged unitは既存physical group境界に従い分割しない。
6. Full Run、Finish Remaining、complete、Use This Takeは現行どおりfull projectionを維持する。
7. focused parity、full CPU、frontend、manifest、workflow SHA/ZIP parity、public schemaをGateにする。
R1ではReview policy、prefix探索、Session/State priority、Sampling、commit/finalizeを変更しない。R1実装は明示承認までHOLD。
## 10. R0 disposition
R0 Characterizationの実装対象はtest/documentationだけで、Production runtimeは変更していない。
R1へ進む前の要確認事項:
1. V9の「invalid/incompatible Sessionは既存エラー」を、実コードの「advisory reject + fresh run」へ訂正するか。
2. `ValidatedPrefix.to_planning_facts()`を現行契約ではなくR2導入契約として扱うか。
この2点を未訂正のままR2/R4へ進むと、現行挙動維持とV9本文を同時に満たせない。
+41
View File
@@ -0,0 +1,41 @@
# R6 Node Facade Delta
## Purpose
R6 reduces only the public V3.8 Sampler method into this fixed boundary:
```text
public inputs
-> RuntimeRequest
-> existing hardening/runtime adapter
-> RuntimeOutput
-> public tuple
```
`v3/node_facade.py` owns the immutable request container and the V3.8
status-only resolution/diagnostic decoration. It does not import or create a
Coordinator, Planner, Run Storage controller, Sampling Engine, or ReviewUnit.
## Preserved ownership
- `v2/sequence.run_sequence` remains the R4 signature-compatible hardening
adapter and keeps its explicit 41-keyword signature.
- `InternalRuntimeCoordinator` remains the sole owner of continuation-source,
Session/State priority, prefix validation, and Runtime execution ordering.
- `execution_planner` remains the sole owner of physical-group and Projection
decisions.
- `run_storage` remains the sole owner of R5 immutable raw transactions and
manifest publication.
- The V3.8 node still resolves its existing Size Source contract before the
request boundary and calls the unchanged V3.7 runtime inheritance path once.
## Non-goals and compatibility
No public node ID, socket, widget order, output tuple, Workflow, Sampling,
Review, Run Storage schema, canonical selection, or hardening behavior is
changed. Tensor/model identities are preserved; only keyword containers are
copied into immutable request mappings. Duplicate runtime keywords fail
instead of being silently overridden, matching the prior explicit-keyword
call's fail-closed behavior.
This phase introduces no temporary adapter, new dependency, or future hook.

Some files were not shown because too many files have changed in this diff Show More