Nodes/Undulating Glitch/Four-Way Field Composite
ComfyUI Node

Four-Way Field Composite

The other half of the field workflow — apply an edited glitch mask to four clips

By jsterlingvids·Created 2 months ago·Updated 2 months ago· 0
Four-Way Field Composite
  • images_a
  • images_b
  • images_c
  • images_d
  • source_field
  • images
  • transition_edges
frame_alignment
blend_curve

Four-Way Field Composite is the mixer's compositing half, split out so you can get your hands on the glitch field before it's baked into pixels. Feed it four IMAGE batches plus a source_field mask, and it produces the same A → B → C → D → A undulating composite the mixer makes - except the field is something you already own, generated separately and optionally modified along the way.

If you're not doing anything to the field, skip this node and use Four-Way Undulating Glitch Mixer directly. It's one node instead of two and does the same thing faster. This node earns its keep when you've got a field you want to edit - blur it, feather it, paint over it, drive it from a completely different mask - and then still need the standard four-way composite. That's the whole point of the pack's design: the field generation and the compositing are deliberately separable.

Inputs

  • images_a, images_b, images_c, images_d - the four video batches.
  • source_field - the mask from Undulating Glitch Field, or any other mask you want to composite against. It gets resized to match your batches and its frames are aligned to your clip lengths.
  • frame_alignment - trim_shortest, loop_shorter, or stretch_shorter. This trims, loops, or stretches both your batches and the field so everything lines up.
  • blend_curve - smoothstep, linear, or hard, controlling how the wave edges blend between sources.

Notice what's missing: there are no mode, wave_*, block_*, or seed knobs here. Those all live on the field generator. If you're reaching for this node expecting glitch sliders, you went one node too far downstream - go back to Undulating Glitch Field, tweak it, and re-run.

Outputs

  • images - the composited result, straight into a VHS Video Combine.
  • transition_edges - a mask of the active blend boundaries, if you want to warp or grade just the moving edge.

A clean two-node pattern

UG_UndulatingGlitchField (source_field)
                    │  (field_preview → preview)
                    ▼
UG_FourWayFieldComposite ← images_a..d from VHS Load Video
                    │
                    ▼
             VHS Video Combine

That's the field workflow in a nutshell: generate, modify, apply. The composite node is the dumb end of it - it does exactly one job (blend four batches against a mask) and does it deterministically, so the output is stable given the same field and seeds.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/jsterlingvids/ComfyUI-UndulatingGlitch.git

Restart ComfyUI and search for "Undulating Glitch" (image/video/undulating glitch category). No model downloads and no extra Python packages - just the PyTorch that ships with ComfyUI. It's not on the Registry yet, so git clone (or install-by-URL in Manager) is the reliable path.

Gotchas

The field is resolution-agnostic but frame-sensitive: source_field and your batches need to cover the same footage, because frame_alignment will happily trim a long field or loop a short one and change the loop timing. Also watch memory - this is the same four-float-batches problem as the mixer, so for long clips at 1280×1280 use VHS Meta Batch Manager (start at frames_per_batch: 16) rather than one giant run. And it's a 0.8.0 prototype: solid for the tested paths, worth a short smoke test on your own footage first.

Categoryimage/video/undulating glitch

Inputs (7)

NameTypeDefaultDescription
images_aIMAGE
images_bIMAGE
images_cIMAGE
images_dIMAGE
source_fieldMASK
frame_alignmentCOMBO3 options: trim_shortest, loop_shorter, stretch_shorter
blend_curveCOMBO3 options: smoothstep, linear, hard

Outputs (2)

NameTypeDescription
imagesIMAGE
transition_edgesMASK