Nodes/Dream Video Batches/πŸ”’ Frame Set Reindex
ComfyUI Node

πŸ”’ Frame Set Reindex

Wipe the timeline clean β€” number your frames from scratch

By alt-key-projectΒ·Created 3 years agoΒ·Updated 7 months agoΒ· 95
πŸ”’ Frame Set Reindex
  • frames
  • frames
β—„start0β–Ί
β—„step1β–Ί

Frame Set Reindex [DVB] throws away your frame set's existing indices and writes new ones: start for the first frame, then step apart for everything after. Defaults are start 0, step 1, so the typical call turns a messy set into a clean 0,1,2,3,... No frames are added, removed, or reordered - only the labels on the timeline change. It's the "make it tidy" node, and in a pack where nodes constantly disagree about what a clean timeline looks like, tidiness is a real feature.

When the indices get messy

Every editing operation in this pack can leave scars. Frame Set Append reindexes the tail based on the head's last index. Frame Set Repeat stacks copies with stepped indices. Frame Set Merger produces a union that can have gaps wherever the two sets didn't overlap. Frame Set Reverse keeps indices where they are while flipping the images. None of that is wrong - it's just the pack's honest bookkeeping - but some downstream nodes refuse to work with the results. Blended Transition demands gap-free sets. Unwrap in FAIL mode demands the same. A Reindex on the way out fixes both: contiguous 0..N, ready for whatever comes next.

That's the real value proposition: Reindex is the cleanup pass you run before handing a composed frame set to a strict consumer. If you're about to hit an error that says "frame set contains gaps" or a transition that quietly refuses, a reindex right before it is usually the cure.

What it does NOT do

Worth being explicit about, because the pack ships two nodes that both touch indices and people mix them up. Frame Set Reindex rewrites the timeline: start and step replace everything. Frame Set Index Offset [DVB] slides the timeline: every index shifts by the same amount, preserving gaps and spacing. Offset is for alignment (push a clip so it overlaps another), Reindex is for normalization (make the clip 0,1,2,3 again). If a set is already contiguous, offsetting is what you want; if it's gappy or has odd starting values, reindexing is.

The honest caveat

Because it only changes labels, Reindex is useless on its own - nothing visually happens. If your goal is actually to reorder or duplicate frames, that's Frame Set Reverse or Frame Set Repeat, not this node. Reach for Reindex when a downstream node is complaining or when you want predictable numbers feeding into a Calculation or a framerate-driven fade. It's plumbing, but it's the plumbing that keeps the rest of the graph from leaking.

The pack-wide exit rule

Output is a FRAME_SET, so before it reaches a standard node - an encoder, a save node, anything not from this pack - pass it through Unwrap Frame Set [DVB] to get a plain IMAGE batch and framerate. Same rule as every node here; it's the one beginner trip-up worth memorizing for the whole pack.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-video-batches.git
cd comfyui-dream-video-batches
pip install -r requirements.txt

Restart ComfyUI, or search "Dream Video Batches" in ComfyUI Manager. No model downloads - this is arithmetic on the index list.

Category🎭 DVB/🎞 base

Inputs (3)

NameTypeDefaultDescription
framesFRAME_SETβ€”
startINT0β€”
stepINT1β€”

Outputs (1)

NameTypeDescription
framesFRAME_SETβ€”