Four-Way Undulating Glitch Mixer
Four videos, one travelling glitch wave — the node that fuses them
- images_a
- images_b
- images_c
- images_d
- meta_batch
- images
- field_preview
- transition_edges
You've got four takes of the same performance and you want them cycling A → B → C → D → A behind an irregular, block-glitched wave boundary instead of a hard cut. This is the node for that. Four-Way Undulating Glitch Mixer is the fastest route to the whole effect: feed it four IMAGE batches, get a composited video back, and it does the travelling glitch field internally. Nothing else in the pack is needed for a first pass - the other four nodes exist to pre-align your clips or to break the effect apart so you can remix it.
It's the flagship of a small, dependency-free pack built for one scenario: four similarly framed performance videos (the included example workflow uses four VHS-loaded clips) that an irregular wave boundary sweeps across on a loop. The README frames it honestly as a 0.8.0 prototype, so think of it as a very well-tested first release rather than a finished product.
How it works
Under the hood the mixer generates a per-frame field: a 0–1 value for every pixel that says which of the four sources owns it (the field times four gives you a source index, with smooth blending between neighbors). Then it composites your four batches against that field and clamps the result. The field itself is built from a travelling sine wave that's domain-warped in liquid mode, plus a few octaves of pseudo-random noise, nearest-neighbour block jitter (the digital block glitch), and horizontal tear stripes. All the sliders feed that one field.
Three mode options:
sequential_wipe- a clean undulating transition front, the classic wipe.liquid_wipe- a continuously reshaping, domain-warped liquid front. This is the one most people end up on.four_way_bands- all four sources drifting through the frame as moving bands.
The inputs that actually matter
You'll never touch every one of the two dozen-odd widgets. Start with these:
mode- pickliquid_wipefirst.cycle_frames- the length of one full A → B → C → D → A loop. At 24 fps,128gives about 5.3 seconds per cycle.wave_overlap-0.08starts the next boundary just before the previous one leaves the frame, so motion stays nearly constant instead of hard-resetting.frame_alignment- what to do when clips differ in length:trim_shortest,loop_shorter, orstretch_shorter.blend_curve-smoothstep,linear, orhard. Hard + highblock_jitter+ lowedge_softnessgives crunchier digital blocks.
The glitch texture lives in block_size/block_jitter and tear_height/tear_amount. seed randomizes the pattern. A good starting point, straight from the README:
mode: liquid_wipe
cycle_frames: 128
wave_count: 2.4
wave_amplitude: 0.18
wave_speed: 5
noise_amount: 0.035
noise_scale: 3
noise_speed: 2
block_size: 48
block_jitter: 0.018
tear_height: 20
tear_amount: 0.012
glitch_speed: 7
edge_softness: 18
wave_overlap: 0.08
blend_curve: smoothstep
Outputs
images- the final composite. Straight into a VHS Video Combine.field_preview- a coloured view showing which source controls each area. Great for debugging.transition_edges- a mask of the active blend boundaries. Feed this (plusimages) into Liquid Transition Warp to add a refractive glitch to the wave front.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/jsterlingvids/ComfyUI-UndulatingGlitch.git
Restart ComfyUI and search for "Undulating Glitch" (category image/video/undulating glitch). ComfyUI Manager can install it too, but it's not on the Registry yet (the pyproject.toml still has a placeholder publisher ID), so git clone or install-by-URL is the reliable route. No model downloads, no extra Python packages - it only needs the PyTorch ComfyUI already ships. To update: git pull in the folder.
Where people get burned
Memory. Four 1280×1280 float batches can eat tens of gigabytes before compositing. For long clips, connect a VHS Meta Batch Manager meta_batch output to this node (and to your VHS Load Video nodes and Video Combine); start at frames_per_batch: 16. The mixer preserves its global frame offset between VHS sub-executions, so batching doesn't reset the wave at each chunk.
Also worth knowing before you blame the node: the four clips should share frame rate, dimensions, duration, and framing. When only framing differs, run Four-Way Quick Align first. And since it's a 0.8.0 prototype, do a short test render before committing to a long encode.
Inputs (26)
| Name | Type | Default | Description |
|---|---|---|---|
| images_a | IMAGE | — | |
| images_b | IMAGE | — | |
| images_c | IMAGE | — | |
| images_d | IMAGE | — | |
| frame_alignment | COMBO | 3 options: trim_shortest, loop_shorter, stretch_shorter | |
| blend_curve | COMBO | 3 options: smoothstep, linear, hard | |
| mode | COMBO | 3 options: sequential_wipe, liquid_wipe, four_way_bands | |
| cycle_frames | INT | 964–10000 | — |
| transition_fraction | FLOAT | 0.780.01–1 | — |
| angle | FLOAT | 0-180–180 | — |
| wave_count | FLOAT | 1.50–20 | — |
| wave_amplitude | FLOAT | 0.100–0.75 | — |
| wave_speed | FLOAT | 1.0-12–12 | — |
| noise_amount | FLOAT | 0.0550–0.75 | — |
| noise_scale | FLOAT | 2.00.1–20 | — |
| noise_speed | FLOAT | 1.0-10–10 | — |
| block_size | INT | 481–1024 | — |
| block_jitter | FLOAT | 0.0550–0.75 | — |
| tear_height | INT | 201–512 | — |
| tear_amount | FLOAT | 0.0350–0.75 | — |
| glitch_speed | FLOAT | 6.000–30 | — |
| edge_softness | FLOAT | 10.00–256 | — |
| band_count | INT | 11–16 | — |
| seed | INT | 420–18446744073709550000 | — |
| wave_overlap | FLOAT | 0.080–0.5 | — |
| meta_batchopt | VHS_BatchManager | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| field_preview | IMAGE | — |
| transition_edges | MASK | — |