Nodes/IAMCCS-nodes/MiniMax H3 Segment Queue + Concat
ComfyUI Node

MiniMax H3 Segment Queue + Concat

The node that renders MiniMax H3 in segments, then stitches the master

By IAMCCS·Created 11 months ago·Updated 4 days ago· 113
MiniMax H3 Segment Queue + Concat
  • video
  • images
  • audio
  • bridge_images
    current_segment
    total_segments
    trim_head_frames
    enabledtrue
    filename_prefixIAMCCS/MiniMaxH3/segment
    merge_segmentstrue
    keep_segmentstrue
    render_idminimax_h3_render
    segment_base_name
    resolved_render_id

    MiniMax H3 gives you long, continuous, audio-native shots - but it doesn't hand you the whole timeline at once. Long-form video in ComfyUI is still chunked generation: render a segment, carry continuity into the next, repeat, then join. IAMCCS_MiniMaxH3SegmentQueueLoop is the piece of the IAMCCS Shotboard pipeline that turns "render this segment" into "render all the segments, save them as files, and concat the finished master." It's an output node with a side effect: it re-queues the workflow for you.

    How it works

    You feed it the current segment index and the total, plus the rendered segment's frames. It saves that segment as an MP4 named with your render_id (e.g. ..._seg_0001.mp4), writes a last-frame "bridge" image that the next segment's continuity path can read, and then - the clever part - it rewrites the queued prompt: every node with a segment_index input gets bumped to the next value, and the workflow is automatically re-queued. Run the graph once, walk away, come back to N saved segments. On the final segment it concats all the MP4s into one _full.mp4 master.

    The trim-overlap logic is where this gets subtle. trim_head_frames controls how many frames are shared between segments for a clean stitch. If it's more than 1, the node treats it as an overlap and trims the head of each saved segment so the concat uses a blending pass instead of a hard cut. That's why it wants the images input (plus audio for sync) rather than an opaque video container when you're using overlap - a VIDEO input is accepted, but only for the non-overlap path.

    The inputs that matter

    • current_segment / total_segments - the loop counter. Both are forceInput, so wire them from your plan, don't just click.
    • images + audio - the rendered segment to save. Connect video instead only if you're not trimming.
    • bridge_images - optional; the node falls back to your last frame if you don't supply it.
    • merge_segments - true and the last pass concats everything into _full.mp4.
    • keep_segments - false deletes the individual segment files after the merge.
    • render_id - the name prefix that keeps a multi-segment render together.

    There are no typed outputs; this is a terminal node that reports through the UI and the preview widget.

    Where people get burned

    The validation is strict on purpose. It refuses to run if current_segment is negative, if it's past total_segments, or - the classic - if you try to resume a render from segment 2+ without a render_id that ties it to the earlier segments. The message effectively tells you to reset segment_index to 0 before a new run. And if no node in the graph has a segment_index input to advance, the loop raises instead of silently doing nothing - that's your cue that the workflow isn't wired for looping.

    Install

    It ships inside IAMCCS-nodes, so install the pack once: ComfyUI Manager → search "IAMCCS", or cd ComfyUI/custom_nodes && git clone https://github.com/IAMCCS/IAMCCS-nodes.git, then restart ComfyUI. No extra Python deps for this node specifically - the pack handles its own ffmpeg shim on import.

    CategoryIAMCCS/MiniMax H3

    Inputs (14)

    NameTypeDefaultDescription
    current_segmentINT
    total_segmentsINT
    videooptVIDEO
    imagesoptIMAGE
    audiooptAUDIO
    bridge_imagesoptIMAGE
    trim_head_framesoptINT
    enabledoptBOOLEANtrue
    filename_prefixoptSTRINGIAMCCS/MiniMaxH3/segment
    merge_segmentsoptBOOLEANtrue
    keep_segmentsoptBOOLEANtrue
    render_idoptSTRINGminimax_h3_render
    segment_base_nameoptSTRING
    resolved_render_idoptSTRING

    Outputs (0)

    No outputs