Sequence(SequenceStage)
SequenceStage assembles an ordered sequence of clips from one or more connected videos and outputs the result as a single COMFYTV_VIDEO.
Sequence Stage
Description
SequenceStage assembles an ordered sequence of clips from one or more connected videos and outputs the result as a single COMFYTV_VIDEO. Each entry in the segments list selects a video slot, defines an in/out trim in seconds, and specifies transition settings for that segment. The order of entries in segments is the playback order; the order of the connected videos inputs only determines the available source slots.
The node is intended to be configured through its segment list UI, which writes the segments JSON. Manual JSON editing is possible, but the structure and field names are part of the node interface and should be treated carefully.
Inputs
segments
- Type:
STRING - Required: yes
- Default:
""
A JSON array of segment objects in playback order. Each object has the shape {"slot", "in_s", "out_s", "transition", "trans_dur"}.
slot: identifies which connected video fromvideosto use for the segment.in_s: start time in seconds within the selected source video.out_s: end time in seconds within the selected source video.transition: transition setting associated with the segment, using the values offered by the segment list UI.trans_dur: duration in seconds for the transition.
Normally this field is populated by the segment list UI. The empty default means no segments are configured. Add at least one segment before expecting playback output.
videos
- Type:
AUTOGROW - Required: yes
A dynamic set of video inputs. Connect one or more videos, and each connected entry becomes available as a slot for the segments list. Add or remove inputs with the AUTOGROW controls, and keep slot references in the segment list aligned with the currently connected videos. At least one video should be connected for segments to resolve.
The number of connected videos does not need to match the number of segments; the same source can be reused across multiple segments with different trim ranges.
Outputs
COMFYTV_VIDEO
A single ComfyTV video output assembled from the ordered segments. It contains the selected trims in playback order, with transitions applied according to each segment's transition fields. Connect it to downstream nodes that accept COMFYTV_VIDEO.
Usage Notes
- The array order in
segmentscontrols playback order. Do not rely onslotorder for sequencing. - Reuse a video slot as often as needed; each segment can select different
in_sandout_sranges from the same source. - Use the segment list UI to add, reorder, and edit segments, especially when changing transitions, so the JSON remains aligned with the available
videosinputs. - When editing
segmentsmanually, verify JSON validity, slot references, increasing in/out ranges, and that trim times fall within each source video's duration. trans_duris expressed in seconds. Match the transition choice to the intended duration, and use a zero duration or cut-style option when an instant change is desired.- An empty
segmentsvalue means there is no playback to assemble; configure at least one segment.
Comments
Sign in with GitHub to join the discussion.