Loop Strip — Load Video
Get your walk-cycle footage into the graph
- frames
- fps
- frame_count
Every Loop Strip workflow starts here. This is the pack's front door: it turns a video file into the batch of frames that Loop Strip - Find Best Cycle needs to hunt for your seamless loop. Nothing fancy, but a few details decide whether it "just works" or dumps a black frame on you.
What it does
It's a ComfyUI-native video loader built on OpenCV's VideoCapture, supporting .mp4, .webm, .mov, .mkv, and .gif. It reads every frame, converts BGR to RGB (the silent fix people forget matters), normalizes to the 0–1 float tensors ComfyUI images use, and stacks them into a [N, H, W, C] batch.
Two ways in, and they matter:
- video - the upload combo. It lists video files sitting in your ComfyUI
input/folder. Drop a file there, refresh, pick it. - video_path - a text override that takes priority over the upload. You can type a local file path or even a URL; if it starts with
http, the node downloads it to ComfyUI's temp folder and cleans up after itself. Handy when the file lives elsewhere or you keep pulling the same source.
Outputs
Three, and each earns its keep:
- frames - the IMAGE batch. Into Find Best Cycle it goes.
- fps - the FLOAT the file reported (falls back to 30.0 if the codec doesn't say). Wire this into Loop Strip - Sprite Inspector so your preview plays at the right speed.
- frame_count - the INT, useful for sanity checks or driving other logic.
Install
Search "Loop Strip" in ComfyUI Manager and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/serhiiyashyn-sf/comfyui-loopstrip
cd comfyui-loopstrip
pip install -r requirements.txt
Restart afterwards. Dependencies are the pack's usual set - opencv-python, numpy, torch, scipy, requests - so a working ComfyUI install basically already has them. No models to fetch.
Where it bites
Two failure modes are worth knowing before they hit you.
Memory. The node reads every frame into a single tensor. A short walk-cycle clip is trivial; a five-minute 1080p video is a chunk of VRAM/RAM you don't want to spend just to find a loop. Trim your footage to a couple of clean passes first - it's faster and easier on the cycle detector anyway.
Codec roulette. OpenCV reads H.264 MP4s reliably. WebM from some generators, weird MOV variants, or anything exotic can fail to open or report garbage metadata - that's the case where fps falls back to 30 and you might not notice frames are off. If a video won't open, re-encode it to H.264 MP4 (ffmpeg is your friend) instead of fighting the node. It's a loader, not a demuxing miracle worker.
One more: if video_path is set, the upload combo is ignored entirely. People forget that and wonder why "the wrong file" loaded. Empty the override and the upload takes back over.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| video | COMBO | 0 options: | |
| video_pathopt | STRING | Override: file path or URL (takes priority over upload) |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| frames | IMAGE | — |
| fps | FLOAT | — |
| frame_count | INT | — |