MiniMax H3 Selective Segment Repair / 选择性分段重做 (Advanced)
Build the do-over list for your long video, non-destructively
- timeline
- repair_plan
- repair_plan_json
This is the entry point of the Selective Repair chain - the node that decides what needs fixing. It takes your long-video timeline and produces a non-destructive repair plan: a list of segments to redo, each with a compiled prompt, a repair seed, and context padding, all ready for the rest of the chain (RepairSegmentSelect → Bind → regenerate → Stage → Accept → Compose) to execute one by one. Its own job is planning only. It never overwrites, never auto-accepts, and never queues a generation.
You pick segments two ways, via selection_policy:
manual(default) - you type the indices inmanual_indices(e.g."0,3,5"). Simple, explicit, you're in charge.- evidence-based - feed a
quality_report_jsonplusthresholds_json, and segments failing your thresholds get added automatically. The default threshold shape is{"identity":{"min":0.75}}, so this is built for quality reports that score identity/similarity per segment. If you have a downstream quality-scoring node, this is the auto-scheduling route.
Either way, the plan records a repair_mode (auto default), an optional prompt_addendum you can attach to a redo ("fix the left hand"), and a seed_stride (1009) used to derive a fresh, deterministic repair seed per segment so re-runs are reproducible.
Inputs worth touching
timeline- aH3_T8_STUDIO_TIMELINE, required, from the pack's Studio/Long Video machinery.manual_indices- a comma/space-separated string when policy is manual.context_before_frames/context_after_frames- 22/22 defaults. These are the H3 grid-context paddings each redo carries so a regenerated segment blends into its neighbors instead of starting cold. 22 is the standard H3 context frame count; don't set them to 0 unless you specifically want zero-context redos.prompt_addendum- extra instructions for the redo prompt.quality_report_json/thresholds_json- only relevant in evidence mode.
Outputs: repair_plan (typed handle) and repair_plan_json for review.
Installing
In the T8mars MiniMax H3 Audio T8 pack:
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/comfyui-minimax-h3-audio-T8
or ComfyUI Manager → "MiniMax H3 Audio T8", restart. No pip deps; planning is pure computation.
The take
Start with manual - type the indices, review repair_plan_json, and check the context padding before you let it ride. The evidence route is seductive ("just fix whatever's below 0.75!") but it inherits the quality of whatever produced quality_report_json, and a bad score can pull in segments you never meant to touch. The context values are the real craftsmanship here: too little and your redo visibly clunks into its neighbors, too much and you're re-encoding nearly the whole scene. And remember the chain's iron rule - this node plans, it never executes. The plan is a wish list until a human accepts each item.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| timeline | H3_T8_STUDIO_TIMELINE | — | |
| selection_policy | COMBO | manual | 4 options: manual, failed_status, score_threshold, failed_or_score |
| manual_indices | STRING | 0 | — |
| quality_report_json | STRING | {"segments":[]} | — |
| thresholds_json | STRING | {"identity":{"min":0.75}} | — |
| repair_mode | COMBO | auto | 5 options: auto, seed_retry, prompt_tighten, reference_refresh, full_regenerate |
| prompt_addendum | STRING | — | |
| seed_stride | INT | 10091–18446744073709550000 | — |
| context_before_frames | INT | 220–362 | — |
| context_after_frames | INT | 220–362 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| repair_plan | H3_T8_REPAIR_PLAN | — |
| repair_plan_json | STRING | — |