ComfyUI Node
H3MD Loop Sampler + RefMod
H3MD Loop Sampler for H3MD Director + RefMod plans: every segment gets its RefMods (DiT refs + text encoder). Same inputs/outputs as H3MD Loop Sampler.
H3MD Loop Sampler + RefMod
- plan
- clip
- vae
- audio_vae
- low_res_model
- sampler
- sigmas
- high_res_model
- semantic_bridge
- options
- depth_control
- latent
- images
- audio
- frame_count
- summary
- long video
◄rerun_segments►
◄stop_after0►
◄rerun_new_seedtrue►
◄seed0►
◄cfg1.0►
◄transition_step6►
◄lowres_scale0.50►
◄rho0.00►
◄w_min0.50►
◄w_max1.00►
◄upscaler_modelnone►
◄seed_modeincrement►
◄decode_outputtrue►
◄highres_tilingtrue►
◄cache_modedisk►
◄delete_cachetrue►
◄resume_from_cachefalse►
CategoryMiniMax H3/H3MD
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| rerun_segments | STRING | Re-render only these segments (1-based, as in the log): e.g. 3 or 4-6 or 8-10, 13-14. Empty = normal run. Needs resume_from_cache on and every other segment in the cache. Each selected block starts from the end of the segment before it and its last overlap frames are locked to the start of the cached segment after it, so nothing else is re-rendered. Old files go to _replaced_<time>. 只重跑这些段(从 1 数,和日志一致):如 3、4-6、8-10, 13-14。留空 = 正常跑。需要打开 resume_from_cache,其余段都要在缓存里。每块开头接上一段结尾,结尾锁到下一段的旧开头,其余段不重跑;旧文件挪到 _replaced_<时间> 留底。 | |
| stop_after | INT | 00–255 | Run segments 1..N only (0 = all). Short test: 1 = only the first segment; set it back to 0 later and the cached segments are reused. 只跑到第 N 段为止(0 = 全部)。短测试填 1 = 只跑第 1 段;之后改回 0,已跑的段从缓存取。 |
| rerun_new_seed | BOOLEAN | true | Re-rendered segments get a new random seed (logged and stored in the cache), so a rerun differs even with the same prompt and refs. Off: the original seed. 重跑的段用新的随机种子(记进日志和缓存),提示词和参考图不变也能抽到不同结果。关:用原种子。 |
| plan | H3MD_PLAN | — | |
| clip | CLIP | — | |
| vae | VAE | Video VAE (pixel route of the lift when rho > 0). | |
| audio_vae | VAE | — | |
| low_res_model | MODEL | Model for the low-res pass (and the high-res pass when high_res_model is not connected). | |
| sampler | SAMPLER | — | |
| sigmas | SIGMAS | One schedule for both passes; split at transition_step. | |
| seed | INT | 00–18446744073709550000 | — |
| cfg | FLOAT | 1.00–100 | — |
| transition_step | INT | 61–10000 | Steps of the schedule run at low resolution; the rest run at full resolution. |
| lowres_scale | FLOAT | 0.500.25–1 | Size of the low-res pass (0.5 = half width and height). |
| rho | FLOAT | 0.000–1 | Share of the most inconsistent positions corrected toward the pixel-VAE route. 0 = learned upscaler only (no VAE round trip). |
| w_min | FLOAT | 0.500–1 | — |
| w_max | FLOAT | 1.000–1 | — |
| upscaler_model | COMBO | none | Learned H3 3D latent upscaler for the lift (models/latent_upscale_models or upscale_models). none = nearest. |
| seed_mode | COMBO | increment | increment (default): segment k uses seed + k, so equal-length segments do not get identical noise; same: every segment uses the seed. With resume_from_cache on, the seed of the run being resumed is reused. |
| decode_output | BOOLEAN | true | Decode every segment (video + audio VAE) after sampling and join the frames like H3MD Segment Join. Off: only the joined latent is produced. |
| high_res_modelopt | MODEL | Model for the high-res pass (default: low_res_model). | |
| highres_tilingopt | BOOLEAN | true | High-res pass: measure the free VRAM and use the fewest strips that fit (full frame when it fits - no cost on large cards). Off = always full frame. |
| cache_modeopt | COMBO | disk | disk: decode each segment right after sampling and write it to a disk cache (RAM holds one segment); merge at the end. ram: original in-RAM decode/join. |
| delete_cacheopt | BOOLEAN | true | Hidden / no effect since 2026-10-18: the Loop never deletes its cache before the video is saved. Use H3MD Save Video Interp -> delete_cache_after_save. |
| resume_from_cacheopt | BOOLEAN | false | Reuse cached segments with identical plan segment, refs, seed and settings (models/LoRAs are NOT checked). The base seed of the run being resumed is reused, so a randomized seed widget does not break the resume. |
| semantic_bridgeopt | H3MD_SEMANTIC_BRIDGE | Optional H3MD Semantic Bridge chain. Not connected = off. | |
| optionsopt | H3MD_LOOP_OPTIONS | H3MD Loop Options (advanced switches). Not connected = all defaults. | |
| depth_controlopt | H3MD_DEPTH | H3MD Depth Control (optional, appended LAST): depth ControlNet on the low-res stage for plan videos with 'depth' ticked. Not connected = off. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | Joined audio-video latent of all segments (seam overlaps removed). Can be connected externally (e.g. Separate AV Latent -> Hyper-VAE / VAE Decode -> VHS Video Combine) for upscaling or custom processing. NOT bounded: decoding the whole latent holds the whole clip in VRAM/RAM on long videos. Bounded path: 'long video' -> H3MD Save Video Interp. 拼好的音视频 latent,可接外部节点(如 Hyper-VAE / VAE 解码 → VHS Video Combine)放大或自定义处理;长视频整段解码可能爆显存/内存。 |
| images | IMAGE | Placeholder only (64x64; merge_images was removed) - NOT the video. For frames, decode 'latent' externally, or save with 'long video' -> H3MD Save Video Interp. (cache_mode=ram: still the whole clip in RAM.) 只是占位图,不是视频;要画面帧请在外部解码 'latent',或用 'long video' → H3MD Save Video Interp 出片。 |
| audio | AUDIO | Joined audio of the whole clip (the same audio H3MD Save Video Interp writes). Can be connected externally for custom processing; not a bounded-memory path on large / long videos. 整段拼好的音频,可接外部节点自定义处理;大/长视频不保证不爆内存。 |
| frame_count | INT | Number of video frames of the joined clip (24 fps). |
| summary | STRING | JSON report of every segment. |
| long video | H3MD_SEGMENTS | Cache folder + merge plan for H3MD Save Video Interp - the only output designed to stay within bounded VRAM/RAM (streamed chunk by chunk from the disk cache). None with cache_mode=ram. 接 H3MD Save Video Interp:唯一按有限显存/内存设计的出片路径。 |