DJZ Datamosh V2
Glitching video on purpose, the block-matching way
- images
- IMAGE
Datamoshing is the glitch aesthetic where compressed video breaks and the previous frame's pixels smear into the current one - think vaporwave videos and music-video transitions. Real datamoshing happens when you strip P-frames out of an MPEG stream and let the decoder keep recycling motion vectors. This node does the same idea in image space: it analyzes motion between frames and pushes pixels around to reproduce the effect without ever touching a video codec. V2 is the second of eight (V1–V8) - this author went deep on the genre.
The core is block-matching motion estimation. It chops each frame into blocks (block_size, 4–64, default 16 - bigger blocks = chunkier, more visible distortion), searches for where each block moved between frames within a max_shift search window (1–32, default 8), and uses those motion vectors to warp pixels. shift_range (1–4) is the search step - lower is more precise but slower, higher is faster and cruder.
Three modes, and the mode is the whole game:
- glide - analyzes motion only between the first two frames, then generates a new sequence by repeatedly applying that motion.
sequence_length(up to 300) sets how many frames it creates. This is your "two-frame to 30-frame transition" tool. - movement - processes every consecutive frame pair, so the datamosh propagates through your whole clip. This is the classic continuous glitch look.
- copy - passes frames through unchanged. It's a debugging/compare mode, not an effect, and it's a nice sign this was built thoughtfully.
Output is an IMAGE batch of the same format as the input, so it slots straight into a VideoCombine.
Now the honest market check. Datamosh is a niche: across the last two-plus years of the r/StableDiffusion + r/comfyui + r/civitai corpus, the term shows up a handful of times total. There's no huge community fighting over datamosh workflows - it's a vibe people add when the edit calls for it. So the takeaway isn't "everyone's using this," it's "when you do need the glitch, this is dramatically easier than the codec-stripping alternative," which requires hand-editing binary MPEG streams. That's the real value proposition: reproducible, parameter-controlled datamosh instead of a fragile hack.
The trap to avoid: feeding it a long video and expecting V2's glide mode to handle it. glide only looks at the first two frames, so on a long clip you'd get one transition repeated. For a full-clip effect you want movement mode - or honestly, one of the later V-series nodes, since DJZ kept iterating this exact node eight times for a reason. If you own this pack you can compare V2's output against V4/V6's and the later ones are where the polish went.
Inputs that matter: mode (pick your effect), block_size (start 16, go bigger for chunky VHS-glitch energy), max_shift (crank for violent smearing). No models, no downloads - pure torch math. Install is the pack-wide route: ComfyUI Manager → "DJZ-Nodes", or clone + pip install -r requirements.txt.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| mode | COMBO | 3 options: glide, copy, movement | |
| block_size | INT | 164–64 | — |
| max_shift | INT | 81–32 | — |
| shift_range | INT | 21–4 | — |
| sequence_length | INT | 301–300 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |