ComfyUI Node

Frame Delay

Hold one frame of a video batch without changing its length

By IsItDanOrAi·Created 2 years ago·Updated about a year ago· 10
Frame Delay
  • image_batch
  • IMAGE
selected_frame0
frame_delay1

Frame Delay is a freeze-frame utility hiding behind a VR-themed name. It takes an image batch - in ComfyUI that's just your video's frames, stored as one tensor where the batch dimension is time - picks one frame, holds it for a set number of frames, and hands back a batch of exactly the same length. It's the quieter half of the ComfyUI-Stereopsis pack, but honestly it's the more generally useful one. Even if you never touch a VR headset, "hold this frame without resizing my whole batch" is a move you reach for in video work.

The pack's intended use: feed a generated video into this node on one side of a Side By Side concat, delay it a couple of frames, and let the temporal offset read as depth parallax when both eyes hit the SBS stream. It's the same cheap time-shift trick used in bargain-bin 2D-to-3D conversions - not real binocular depth, but a passable illusion on slow-moving shots.

How it works

The code is small enough to read in one sitting, and its behavior is worth knowing precisely because there's a subtlety that bites people. Here's what happens:

  1. selected_frame is clamped to your actual batch size minus one, so out-of-range values can't crash it.
  2. The chosen frame is cloned and repeated frame_delay times.
  3. The original frame is removed from the batch and the repeated copies are inserted in its place.
  4. The batch is sliced back down to its original size.

That last step is the whole story: the node keeps total length constant by chopping frames off the tail. It doesn't extend your video - it shifts it. Frame N gets duplicated for frame_delay frames, and however many frames that added get removed from the end. So your clip comes out the same length, just with a frozen segment and a slightly shorter ending.

The flip side of that math: with frame_delay set to 1, the node replaces the frame with a single copy of itself - a no-op. You need 2 or higher for it to do anything visible. Set it to 2 and frame N plays twice; the last frame of your video quietly disappears to pay for it.

The inputs that matter

  • image_batch - your frames, as an IMAGE tensor. Wire this straight from your video model's VAE decode, an AnimateDiff-style batch, or anywhere frames live.
  • selected_frame - which frame to hold, 0-indexed, default 0. The widget caps at 63, but that's just the slider bound: the code clamps to your real batch, so don't panic if your video is 100+ frames.
  • frame_delay - how many frames to hold it, default 1 (see above: that's a no-op; set 2+).

Output is a single IMAGE batch of the same length, ready to feed into the next node - a Side By Side concat for this pack's stereopsis workflow, or a VAE-decode/video-combine chain for freeze-frame work.

Installing it

Same story as its sibling node: no models, no requirements.txt, nothing but torch. Manager search "Stereopsis", or:

cd ComfyUI/custom_nodes
git clone https://github.com/IsItDanOrAi/ComfyUI-Stereopsis

Restart ComfyUI and it appears under IsItDan-Stereopsis. That's the entire install.

Common issues & troubleshooting

"It did nothing" almost always means frame_delay is 1. Default is 1, and 1 is a no-op by construction. Bump it to 2–4.

Your video got shorter, not longer. Expected: because the length is held constant by dropping the tail, the last few frames vanish. If you're encoding to video, account for it - you're trading the ending for a freeze, not adding time.

The "depth" is weak. One or two frames of offset is a faint illusion; push it too far and motion judders instead of reading as 3D. Real parallax needs two genuinely different camera views, which is exactly what this node doesn't produce - it's a hold-frame utility, and the stereopsis framing is its side gig. A community thread about the pack (r/comfyui, mid-2024) had a user hitting problems and shopping for alternatives, which tracks: this is a small, early-stage project. But for a simple hold-frame node, it's hard to get wrong.

One honest caveat: the pack is a single-commit project from July 2025. There are bigger, maintained video-utility packs out there with fancy frame manipulation. If you only need "hold this frame," though, this is a perfectly good - and dependency-free - way to do it.

CategoryIsItDan-Stereopsis

Inputs (3)

NameTypeDefaultDescription
image_batchIMAGE
selected_frameINT00–63
frame_delayINT11–1024

Outputs (1)

NameTypeDescription
IMAGEIMAGE