Video Trails
Turn motion into long-exposure ghosts
- images
- IMAGE
If you've ever watched a light-painting video and wanted that look without a camera and a 30-second shutter, Video Trails is the node. Feed it a batch of frames and it turns anything that moves into smeared afterimages, while the static parts of the shot stay frozen. It's the kind of effect that used to mean frame-by-frame compositing in After Effects, and here it's one node between your VAE decode and your VHS save.
It's part of DJZ-Nodes, Drift Johnson's big grab-bag of ComfyUI utilities. This one sits firmly in the "video effects" half of the pack, which is where the pack's reputation lives - a lot of people find DJZ-Nodes specifically for the video nodes.
How it works
The node processes frames in sequence and keeps a running "trail buffer" in memory. Each new frame is compared to the previous one with optical flow (it's OpenCV under the hood), which tells it where things moved. Where motion passes the threshold, the current frame is blended into the buffer, stacking brightness. Where nothing moved, the existing buffer fades instead, so you get streaks, not a permanently smeared frame.
That's the whole trick, and it's why the knobs are laid out the way they are. There's no GPU magic here - it's per-pixel blending plus flow detection, which is cheap enough that even modest cards chew through clips without complaint.
The inputs that matter
You've got one real input, images (a batch of frames), and then a handful of dials that control the personality of the effect:
persistence(0.1–0.99, default 0.85) - how long a trail hangs around. Crank it to 0.95+ and you're in light-painting territory; drop it low and you get a subtle echo instead.fade_speed(0.01–0.5, default 0.15) - how fast static areas shed their ghost. Pair this with persistence and you can tune whether the whole frame glows or only the moving bits.motion_threshold(0.01–0.2, default 0.05) - how much movement counts as movement. Camera shake or noise can trip this; raise it if your "trails" are just shimmering noise.intensity(0.1–2.0, default 1.0) - brightness of the trails themselves, useful if you want the streaks to glow hotter than the source.blur_strength(0–1, default 0) - a soft blur on the accumulated trails, which is what makes the difference between "chromatic smear" and "dreamy ribbon."
The output is a single IMAGE batch, one modified frame per input frame. Wire it straight into a VHS Video Combine or Save Animated WEBP and you're done.
Installing it
This is a pack install, not a node install - Video Trails ships inside DJZ-Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt
Then restart ComfyUI. ComfyUI Manager works too - search "DJZ-Nodes" in the install tab. One heads-up: requirements.txt pulls in some chunky stuff (opencv, librosa, trimesh, moderngl), so the first install takes a while. It's a big pack; you're getting hundreds of nodes for the price of this one.
Troubleshooting
- Trails reset mid-clip. The effect is stateful - it accumulates from the first frame of the batch. If you feed it batches instead of one continuous stream, each batch starts fresh. Load your whole clip as a single batch.
- Everything is smeared. That's
motion_thresholdtoo low picking up compression noise. Raise it and your static background will stop ghosting. - Slow on long clips. Optical flow is the expensive part. If a 2-minute clip at 1080p grinds, process in chunks and accept the reset, or drop resolution first.
One honest caveat: this is a niche effect. You'll use it a lot if you make light-painting, neon, or kinetic typography content, and basically never otherwise. But when you want it, nothing in the core ComfyUI nodes will give it to you.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| persistence | FLOAT | 0.850.1–0.99 | — |
| fade_speed | FLOAT | 0.150.01–0.5 | — |
| intensity | FLOAT | 1.00.1–2 | — |
| motion_threshold | FLOAT | 0.050.01–0.2 | — |
| blur_strength | FLOAT | 0.00–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |