Nodes/RES4LYF/Frames Latent ReverseOrder
ComfyUI Node Runs on cloud

Frames Latent ReverseOrder

Flipping a video latent's frame order

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
Frames Latent ReverseOrder
  • frames
  • frames_reversed

This one does exactly what the name says, and there's no trick to it: feed it a batch of latents representing video frames, and it hands them back with the order flipped - last frame first, first frame last. One input, one output, no parameters to configure.

It's a small piece of a bigger toolkit. RES4LYF leans hard into video work with WAN - the README's vid2vid editing section and its unsampling/resampling machinery (invert a video, then resample it into something new) both involve moving through a latent sequence in a specific direction. Sometimes the direction you want to process in isn't the direction the clip was generated or loaded in, and rather than rebuilding your whole pipeline, you drop this node in and flip it.

The other obvious use is the blunt one: a boomerang effect, or just wanting the final output to play backward without re-running the whole generation with reversed guide frames.

Where it fits

  • frames (LATENT) in - your batch of video-frame latents.
  • frames_reversed (LATENT) out - the same batch, order reversed.

Where you put it in the chain matters more than the node itself. Reverse before sampling and the sampler (and anything reading "first frame" or "last frame" for guide purposes) sees the reversed order - which matters if your workflow treats the first frame specially, like a guide or reference frame for the rest of the clip. Reverse after decoding to images, and you're only flipping playback order for the final output, with generation happening in the original direction. Neither is "correct" - it depends on whether you want the reversal to influence the generation itself or just the finished video.

Installing it

Comes with the full RES4LYF pack:

  • ComfyUI Manager - search "RES4LYF," install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/ClownsharkBatwing/RES4LYF, then cd RES4LYF && pip install -r requirements.txt, restart.

No extra downloads for this node.

Common issues

The output looks unchanged. With a batch of one frame, reversing does nothing - make sure frames is actually carrying multiple frames along its batch dimension before wondering why this node seems to be a no-op.

Guide frames end up in the wrong spot. If your workflow uses the first frame of a latent as a reference or guide image for conditioning (common in image-to-video setups), reversing upstream of that logic will hand it the old last frame as the new "first." If guided generations start looking wrong after adding this node, that's the likely cause - move the reversal later in the chain, after whatever consumes the guide frame.

Combining with slicing. This pairs naturally with a frame-range slice (grab a sub-clip first, then reverse just that portion) rather than reversing an entire long clip when you only care about part of it.

CategoryRES4LYF/masks

Inputs (1)

NameTypeDefaultDescription
framesLATENT

Outputs (1)

NameTypeDescription
frames_reversedLATENT