AutoLoop_create_pseudo_loop_video(已弃用-mki-创建伪循环视频)
Turning a clip into a seamless-ish loop
- frames
- IMAGE
A looping video is just a video whose end leads naturally into its beginning. AutoLoop_create_pseudo_loop_video_makki (display name "AutoLoop_create_pseudo_loop_video(已弃用-mki-创建伪循环视频)") tried to make that automatic: it takes a non-looping clip's frames, finds the point where the motion nearly repeats, cuts there, and crossfades the two ends so the clip loops without an obvious jump-cut.
It's deprecated, it's described as "pseudo" loop in the name, and those two things tell you most of what you need to know.
How it works
Given a batch of frames, it:
- Searches the middle half of the clip for the frame index where adjacent frames look most similar (measured by cosine similarity of neighboring frame windows). The idea: if frame k looks like it could follow frame k-1, cutting there is a candidate loop point.
- Reorders the clip around that point - the "back" half first, then the "front" half.
- Crossfades the seam using a smoothstep-ish ease in/out over a transition window sized by
transition_duration(a proportion of total frames, default 0.2, capped at 0.5). The end frames blend into the start frames, hiding the join.
Inputs: frames (IMAGE - a batch of video frames) and transition_duration (FLOAT, 0–0.5). It requires at least 4 frames. Output: IMAGE - the reordered frame sequence, which you'd feed to a video encoder.
Why it's deprecated, and the honest caveat
"Pseudo" is doing real work in that name. Cutting to the most self-similar point and crossfading produces a loop that works for subtle, cyclical motion - a candle flicker, a waving flag, a slow camera drift - but it is not a true seamless loop, and for clips with big scene motion it will still visibly "reset" because it's stitching two different moments, not finding a motion-continuous cycle.
True loop generation in this ecosystem has moved toward model-based approaches (dedicated loop/warp video packs and generative tools that re-render the seam), which is presumably why the author shelved this one. If it's in an existing workflow it'll keep running - deprecated isn't deleted - but for new work, a maintained video-looping pack gives you a better result with the same idea done properly.
A practical note
Whatever node you end up using, feed it clean, pre-cut footage and test the loop point before committing to a long render. The transition_duration knob is the main thing you'll tune: too short and the seam jumps, too long and the loop gets soft and smeary through the transition. Start near the 0.2 default and adjust by what the seam actually looks like.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/MakkiShizu/ComfyUI-MakkiTools
cd ComfyUI-MakkiTools
pip install -r requirements.txt
Restart ComfyUI. Cute idea, competently built, and honestly superseded - treat it as a learning example and pick a maintained looping tool for real work.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| frames | IMAGE | Input video frames 输入视频帧 | |
| transition_duration | FLOAT | 0.200–0.5 | Transition duration as a proportion of total frames 过渡持续时间占总帧数的比例 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |