Nodes/Undulating Glitch/Four-Way Undulating Glitch Mixer
ComfyUI Node

Four-Way Undulating Glitch Mixer

Four videos, one travelling glitch wave — the node that fuses them

By jsterlingvids·Created 2 months ago·Updated 2 months ago· 0
Four-Way Undulating Glitch Mixer
  • images_a
  • images_b
  • images_c
  • images_d
  • meta_batch
  • images
  • field_preview
  • transition_edges
frame_alignment
blend_curve
mode
cycle_frames96
transition_fraction0.78
angle0
wave_count1.5
wave_amplitude0.10
wave_speed1.0
noise_amount0.055
noise_scale2.0
noise_speed1.0
block_size48
block_jitter0.055
tear_height20
tear_amount0.035
glitch_speed6.00
edge_softness10.0
band_count1
seed42
wave_overlap0.08

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 - pick liquid_wipe first.
  • cycle_frames - the length of one full A → B → C → D → A loop. At 24 fps, 128 gives about 5.3 seconds per cycle.
  • wave_overlap - 0.08 starts 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, or stretch_shorter.
  • blend_curve - smoothstep, linear, or hard. Hard + high block_jitter + low edge_softness gives 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 (plus images) 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.

Categoryimage/video/undulating glitch

Inputs (26)

NameTypeDefaultDescription
images_aIMAGE
images_bIMAGE
images_cIMAGE
images_dIMAGE
frame_alignmentCOMBO3 options: trim_shortest, loop_shorter, stretch_shorter
blend_curveCOMBO3 options: smoothstep, linear, hard
modeCOMBO3 options: sequential_wipe, liquid_wipe, four_way_bands
cycle_framesINT964–10000
transition_fractionFLOAT0.780.01–1
angleFLOAT0-180–180
wave_countFLOAT1.50–20
wave_amplitudeFLOAT0.100–0.75
wave_speedFLOAT1.0-12–12
noise_amountFLOAT0.0550–0.75
noise_scaleFLOAT2.00.1–20
noise_speedFLOAT1.0-10–10
block_sizeINT481–1024
block_jitterFLOAT0.0550–0.75
tear_heightINT201–512
tear_amountFLOAT0.0350–0.75
glitch_speedFLOAT6.000–30
edge_softnessFLOAT10.00–256
band_countINT11–16
seedINT420–18446744073709550000
wave_overlapFLOAT0.080–0.5
meta_batchoptVHS_BatchManager

Outputs (3)

NameTypeDescription
imagesIMAGE
field_previewIMAGE
transition_edgesMASK